orbbec_sdk/sys/
enums.rs

1//! This module defines various enums used in the Orbbec SDK.
2use super::orb;
3
4/// Sensor Type
5#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
6pub enum OBSensorType {
7    /// Unknown Sensor
8    Unknown = orb::OBSensorType_OB_SENSOR_UNKNOWN as isize,
9    /// Infrared Sensor
10    Infrared = orb::OBSensorType_OB_SENSOR_IR as isize,
11    /// Depth Sensor
12    Depth = orb::OBSensorType_OB_SENSOR_DEPTH as isize,
13    /// Color Sensor
14    Color = orb::OBSensorType_OB_SENSOR_COLOR as isize,
15    /// Accelerometer Sensor
16    Accelerometer = orb::OBSensorType_OB_SENSOR_ACCEL as isize,
17    /// Gyroscope Sensor
18    Gyroscope = orb::OBSensorType_OB_SENSOR_GYRO as isize,
19    /// Left IR Sensor
20    LeftInfrared = orb::OBSensorType_OB_SENSOR_IR_LEFT as isize,
21    /// Right IR Sensor
22    RightInfrared = orb::OBSensorType_OB_SENSOR_IR_RIGHT as isize,
23    /// Confidence Sensor
24    Confidence = orb::OBSensorType_OB_SENSOR_CONFIDENCE as isize,
25}
26
27/// Pixel Format
28#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
29pub enum OBFormat {
30    /// Unknown format
31    Unknown = orb::OBFormat_OB_FORMAT_UNKNOWN as isize,
32    /// YUYV format
33    YUYV = orb::OBFormat_OB_FORMAT_YUYV as isize,
34    /// YUY2 format (the actual format is the same as YUYV)
35    YUY2 = orb::OBFormat_OB_FORMAT_YUY2 as isize,
36    /// UYVY format
37    UYVY = orb::OBFormat_OB_FORMAT_UYVY as isize,
38    /// NV12 format
39    NV12 = orb::OBFormat_OB_FORMAT_NV12 as isize,
40    /// NV21 format
41    NV21 = orb::OBFormat_OB_FORMAT_NV21 as isize,
42    /// MJPEG encoding format
43    MJPG = orb::OBFormat_OB_FORMAT_MJPG as isize,
44    /// H.264 encoding format
45    H264 = orb::OBFormat_OB_FORMAT_H264 as isize,
46    /// H.265 encoding format
47    H265 = orb::OBFormat_OB_FORMAT_H265 as isize,
48    /// Y16 format, 16-bit per pixel, single-channel
49    Y16 = orb::OBFormat_OB_FORMAT_Y16 as isize,
50    /// Y8 format, 8-bit per pixel, single-channel
51    Y8 = orb::OBFormat_OB_FORMAT_Y8 as isize,
52    /// Y10 format, 10-bit per pixel, single-channel (SDK will unpack into Y16 by default)
53    Y10 = orb::OBFormat_OB_FORMAT_Y10 as isize,
54    /// Y11 format, 11-bit per pixel, single-channel (SDK will unpack into Y16 by default)
55    Y11 = orb::OBFormat_OB_FORMAT_Y11 as isize,
56    /// Y12 format, 12-bit per pixel, single-channel (SDK will unpack into Y16 by default)
57    Y12 = orb::OBFormat_OB_FORMAT_Y12 as isize,
58    /// GRAY (the actual format is the same as YUYV)
59    Gray = orb::OBFormat_OB_FORMAT_GRAY as isize,
60    /// HEVC encoding format (the actual format is the same as H265)
61    HEVC = orb::OBFormat_OB_FORMAT_HEVC as isize,
62    /// I420 format
63    I420 = orb::OBFormat_OB_FORMAT_I420 as isize,
64    /// Acceleration data format
65    Accel = orb::OBFormat_OB_FORMAT_ACCEL as isize,
66    /// Gyroscope data format
67    Gyro = orb::OBFormat_OB_FORMAT_GYRO as isize,
68    /// XYZ 3D coordinate point format, @ref OBPoint
69    Point = orb::OBFormat_OB_FORMAT_POINT as isize,
70    /// XYZ 3D coordinate point format with RGB information, @ref OBColorPoint
71    RGBPoint = orb::OBFormat_OB_FORMAT_RGB_POINT as isize,
72    /// RLE pressure test format (SDK will be unpacked into Y16 by default)
73    RLE = orb::OBFormat_OB_FORMAT_RLE as isize,
74    /// RGB format (actual RGB888)
75    RGB = orb::OBFormat_OB_FORMAT_RGB as isize,
76    /// BGR format (actual BGR888)
77    BGR = orb::OBFormat_OB_FORMAT_BGR as isize,
78    /// Y14 format, 14-bit per pixel, single-channel (SDK will unpack into Y16 by default)
79    Y14 = orb::OBFormat_OB_FORMAT_Y14 as isize,
80    /// BGRA format
81    BGRA = orb::OBFormat_OB_FORMAT_BGRA as isize,
82    /// Compression format
83    Compressed = orb::OBFormat_OB_FORMAT_COMPRESSED as isize,
84    /// RVL pressure test format (SDK will be unpacked into Y16 by default)
85    RVL = orb::OBFormat_OB_FORMAT_RVL as isize,
86    /// Is same as Y16
87    Z16 = orb::OBFormat_OB_FORMAT_Z16 as isize,
88    /// Is same as Y12, using for right ir stream
89    YV12 = orb::OBFormat_OB_FORMAT_YV12 as isize,
90    /// Is same as Y8, using for right ir stream
91    BA81 = orb::OBFormat_OB_FORMAT_BA81 as isize,
92    /// RGBA format
93    RGBA = orb::OBFormat_OB_FORMAT_RGBA as isize,
94    /// byr2 format
95    BYR2 = orb::OBFormat_OB_FORMAT_BYR2 as isize,
96    /// RAW16 format
97    RW16 = orb::OBFormat_OB_FORMAT_RW16 as isize,
98    /// Y12C4 format
99    Y12C4 = orb::OBFormat_OB_FORMAT_Y12C4 as isize,
100}
101
102impl From<orb::OBFormat> for OBFormat {
103    fn from(format: orb::OBFormat) -> Self {
104        match format {
105            orb::OBFormat_OB_FORMAT_UNKNOWN => OBFormat::Unknown,
106            orb::OBFormat_OB_FORMAT_YUYV => OBFormat::YUYV,
107            orb::OBFormat_OB_FORMAT_YUY2 => OBFormat::YUY2,
108            orb::OBFormat_OB_FORMAT_UYVY => OBFormat::UYVY,
109            orb::OBFormat_OB_FORMAT_NV12 => OBFormat::NV12,
110            orb::OBFormat_OB_FORMAT_NV21 => OBFormat::NV21,
111            orb::OBFormat_OB_FORMAT_MJPG => OBFormat::MJPG,
112            orb::OBFormat_OB_FORMAT_H264 => OBFormat::H264,
113            orb::OBFormat_OB_FORMAT_H265 => OBFormat::H265,
114            orb::OBFormat_OB_FORMAT_Y16 => OBFormat::Y16,
115            orb::OBFormat_OB_FORMAT_Y8 => OBFormat::Y8,
116            orb::OBFormat_OB_FORMAT_Y10 => OBFormat::Y10,
117            orb::OBFormat_OB_FORMAT_Y11 => OBFormat::Y11,
118            orb::OBFormat_OB_FORMAT_Y12 => OBFormat::Y12,
119            orb::OBFormat_OB_FORMAT_GRAY => OBFormat::Gray,
120            orb::OBFormat_OB_FORMAT_HEVC => OBFormat::HEVC,
121            orb::OBFormat_OB_FORMAT_I420 => OBFormat::I420,
122            orb::OBFormat_OB_FORMAT_ACCEL => OBFormat::Accel,
123            orb::OBFormat_OB_FORMAT_GYRO => OBFormat::Gyro,
124            orb::OBFormat_OB_FORMAT_POINT => OBFormat::Point,
125            orb::OBFormat_OB_FORMAT_RGB_POINT => OBFormat::RGBPoint,
126            orb::OBFormat_OB_FORMAT_RLE => OBFormat::RLE,
127            orb::OBFormat_OB_FORMAT_RGB => OBFormat::RGB,
128            orb::OBFormat_OB_FORMAT_BGR => OBFormat::BGR,
129            orb::OBFormat_OB_FORMAT_Y14 => OBFormat::Y14,
130            orb::OBFormat_OB_FORMAT_BGRA => OBFormat::BGRA,
131            orb::OBFormat_OB_FORMAT_COMPRESSED => OBFormat::Compressed,
132            orb::OBFormat_OB_FORMAT_RVL => OBFormat::RVL,
133            orb::OBFormat_OB_FORMAT_Z16 => OBFormat::Z16,
134            orb::OBFormat_OB_FORMAT_YV12 => OBFormat::YV12,
135            orb::OBFormat_OB_FORMAT_BA81 => OBFormat::BA81,
136            orb::OBFormat_OB_FORMAT_RGBA => OBFormat::RGBA,
137            orb::OBFormat_OB_FORMAT_BYR2 => OBFormat::BYR2,
138            orb::OBFormat_OB_FORMAT_RW16 => OBFormat::RW16,
139            orb::OBFormat_OB_FORMAT_Y12C4 => OBFormat::Y12C4,
140            _ => OBFormat::Unknown,
141        }
142    }
143}
144
145/// Property ID
146#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
147pub enum OBPropertyID {
148    /// LDP switch
149    LDPBool = orb::OBPropertyID_OB_PROP_LDP_BOOL as isize,
150    /// Laser switch
151    LaserBool = orb::OBPropertyID_OB_PROP_LASER_BOOL as isize,
152    /// Laser pulse width
153    LaserPulseWidthInt = orb::OBPropertyID_OB_PROP_LASER_PULSE_WIDTH_INT as isize,
154    /// Laser current (unit: mA)
155    LaserCurrentFloat = orb::OBPropertyID_OB_PROP_LASER_CURRENT_FLOAT as isize,
156    /// IR flood switch
157    FloodBool = orb::OBPropertyID_OB_PROP_FLOOD_BOOL as isize,
158    /// IR flood level
159    FloodLevelInt = orb::OBPropertyID_OB_PROP_FLOOD_LEVEL_INT as isize,
160    /// Enable/disable temperature compensation
161    TemperatureCompensationBool = orb::OBPropertyID_OB_PROP_TEMPERATURE_COMPENSATION_BOOL as isize,
162    /// Depth mirror
163    DepthMirrorBool = orb::OBPropertyID_OB_PROP_DEPTH_MIRROR_BOOL as isize,
164    /// Depth flip
165    DepthFlipBool = orb::OBPropertyID_OB_PROP_DEPTH_FLIP_BOOL as isize,
166    /// Depth Postfilter
167    DepthPostfilterBool = orb::OBPropertyID_OB_PROP_DEPTH_POSTFILTER_BOOL as isize,
168    /// Depth Holefilter
169    DepthHolefilterBool = orb::OBPropertyID_OB_PROP_DEPTH_HOLEFILTER_BOOL as isize,
170    /// IR mirror
171    IRMirrorBool = orb::OBPropertyID_OB_PROP_IR_MIRROR_BOOL as isize,
172    /// IR flip
173    IRFlipBool = orb::OBPropertyID_OB_PROP_IR_FLIP_BOOL as isize,
174    /// Minimum depth threshold
175    MinDepthInt = orb::OBPropertyID_OB_PROP_MIN_DEPTH_INT as isize,
176    /// Maximum depth threshold
177    MaxDepthInt = orb::OBPropertyID_OB_PROP_MAX_DEPTH_INT as isize,
178    /// Software filter switch
179    DepthNoiseRemovalFilterBool =
180        orb::OBPropertyID_OB_PROP_DEPTH_NOISE_REMOVAL_FILTER_BOOL as isize,
181    /// LDP status
182    LDPStatusBool = orb::OBPropertyID_OB_PROP_LDP_STATUS_BOOL as isize,
183    /// Maxdiff for depth noise removal filter
184    DepthNoiseRemovalFilterMaxDiffInt =
185        orb::OBPropertyID_OB_PROP_DEPTH_NOISE_REMOVAL_FILTER_MAX_DIFF_INT as isize,
186    /// MaxSpeckleSize for depth noise removal filter
187    DepthNoiseRemovalFilterMaxSpeckleSizeInt =
188        orb::OBPropertyID_OB_PROP_DEPTH_NOISE_REMOVAL_FILTER_MAX_SPECKLE_SIZE_INT as isize,
189    /// Hardware d2c is on
190    DepthAlignHardwareBool = orb::OBPropertyID_OB_PROP_DEPTH_ALIGN_HARDWARE_BOOL as isize,
191    /// Timestamp adjustment
192    TimestampOffsetInt = orb::OBPropertyID_OB_PROP_TIMESTAMP_OFFSET_INT as isize,
193    /// Hardware distortion switch Rectify
194    HardwareDistortionSwitchBool =
195        orb::OBPropertyID_OB_PROP_HARDWARE_DISTORTION_SWITCH_BOOL as isize,
196    /// Fan mode switch
197    FanWorkModeInt = orb::OBPropertyID_OB_PROP_FAN_WORK_MODE_INT as isize,
198    /// Multi-resolution D2C mode
199    DepthAlignHardwareModeInt = orb::OBPropertyID_OB_PROP_DEPTH_ALIGN_HARDWARE_MODE_INT as isize,
200    /// Anti-collusion activation status
201    AntiCollusionActivationStatusBool =
202        orb::OBPropertyID_OB_PROP_ANTI_COLLUSION_ACTIVATION_STATUS_BOOL as isize,
203    /// Depth precision level
204    DepthPrecisionLevelInt = orb::OBPropertyID_OB_PROP_DEPTH_PRECISION_LEVEL_INT as isize,
205    /// TOF filter range configuration
206    TofFilterRangeInt = orb::OBPropertyID_OB_PROP_TOF_FILTER_RANGE_INT as isize,
207    /// Laser mode
208    LaserModeInt = orb::OBPropertyID_OB_PROP_LASER_MODE_INT as isize,
209    /// brt2r-rectify function switch
210    Rectify2Bool = orb::OBPropertyID_OB_PROP_RECTIFY2_BOOL as isize,
211    /// Color mirror
212    ColorMirrorBool = orb::OBPropertyID_OB_PROP_COLOR_MIRROR_BOOL as isize,
213    /// Color flip
214    ColorFlipBool = orb::OBPropertyID_OB_PROP_COLOR_FLIP_BOOL as isize,
215    /// Indicator switch
216    IndicatorLightBool = orb::OBPropertyID_OB_PROP_INDICATOR_LIGHT_BOOL as isize,
217    /// Disparity to depth switch
218    DisparityToDepthBool = orb::OBPropertyID_OB_PROP_DISPARITY_TO_DEPTH_BOOL as isize,
219    /// BRT function switch
220    BRTBool = orb::OBPropertyID_OB_PROP_BRT_BOOL as isize,
221    /// Watchdog function switch
222    WatchdogBool = orb::OBPropertyID_OB_PROP_WATCHDOG_BOOL as isize,
223    /// External signal trigger restart function switch
224    ExternalSignalResetBool = orb::OBPropertyID_OB_PROP_EXTERNAL_SIGNAL_RESET_BOOL as isize,
225    /// Heartbeat monitoring function switch
226    HeartbeatBool = orb::OBPropertyID_OB_PROP_HEARTBEAT_BOOL as isize,
227    /// Depth cropping mode device
228    DepthCroppingModeInt = orb::OBPropertyID_OB_PROP_DEPTH_CROPPING_MODE_INT as isize,
229    /// D2C preprocessing switch
230    D2CPreprocessBool = orb::OBPropertyID_OB_PROP_D2C_PREPROCESS_BOOL as isize,
231    /// Enable/disable GPM function
232    GPMBool = orb::OBPropertyID_OB_PROP_GPM_BOOL as isize,
233    /// Custom RGB cropping switch
234    RGBCustomCropBool = orb::OBPropertyID_OB_PROP_RGB_CUSTOM_CROP_BOOL as isize,
235    /// Device operating mode (power consumption)
236    DeviceWorkModeInt = orb::OBPropertyID_OB_PROP_DEVICE_WORK_MODE_INT as isize,
237    /// Device communication type
238    DeviceCommunicationTypeInt = orb::OBPropertyID_OB_PROP_DEVICE_COMMUNICATION_TYPE_INT as isize,
239    /// Switch infrared imaging mode
240    SwitchIRModeInt = orb::OBPropertyID_OB_PROP_SWITCH_IR_MODE_INT as isize,
241    /// Laser power level
242    LaserPowerLevelControlInt = orb::OBPropertyID_OB_PROP_LASER_POWER_LEVEL_CONTROL_INT as isize,
243    /// LDP's measure distance
244    LDPMeasureDistanceInt = orb::OBPropertyID_OB_PROP_LDP_MEASURE_DISTANCE_INT as isize,
245    /// Reset device time to zero
246    TimerResetSignalBool = orb::OBPropertyID_OB_PROP_TIMER_RESET_SIGNAL_BOOL as isize,
247    /// Enable send reset device time signal to other device
248    TimerResetTriggerOutEnableBool =
249        orb::OBPropertyID_OB_PROP_TIMER_RESET_TRIGGER_OUT_ENABLE_BOOL as isize,
250    /// Delay to reset device time
251    TimerResetDelayUsInt = orb::OBPropertyID_OB_PROP_TIMER_RESET_DELAY_US_INT as isize,
252    /// Signal to capture image
253    CaptureImageSignalBool = orb::OBPropertyID_OB_PROP_CAPTURE_IMAGE_SIGNAL_BOOL as isize,
254    /// Right IR sensor mirror state
255    IRRightMirrorBool = orb::OBPropertyID_OB_PROP_IR_RIGHT_MIRROR_BOOL as isize,
256    /// Number frame to capture once a 'OB_PROP_CAPTURE_IMAGE_SIGNAL_BOOL' effect
257    CaptureImageFrameNumberInt = orb::OBPropertyID_OB_PROP_CAPTURE_IMAGE_FRAME_NUMBER_INT as isize,
258    /// Right IR sensor flip state
259    IRRightFlipBool = orb::OBPropertyID_OB_PROP_IR_RIGHT_FLIP_BOOL as isize,
260    /// Color sensor rotation
261    ColorRotateInt = orb::OBPropertyID_OB_PROP_COLOR_ROTATE_INT as isize,
262    /// IR/Left-IR sensor rotation
263    IRRotateInt = orb::OBPropertyID_OB_PROP_IR_ROTATE_INT as isize,
264    /// Right IR sensor rotation
265    IRRightRotateInt = orb::OBPropertyID_OB_PROP_IR_RIGHT_ROTATE_INT as isize,
266    /// Depth sensor rotation
267    DepthRotateInt = orb::OBPropertyID_OB_PROP_DEPTH_ROTATE_INT as isize,
268    /// Get hardware laser power actual level
269    LaserPowerActualLevelInt = orb::OBPropertyID_OB_PROP_LASER_POWER_ACTUAL_LEVEL_INT as isize,
270    /// USB's power state
271    USBPowerStateInt = orb::OBPropertyID_OB_PROP_USB_POWER_STATE_INT as isize,
272    /// DC's power state
273    DCPowerStateInt = orb::OBPropertyID_OB_PROP_DC_POWER_STATE_INT as isize,
274    /// Device development mode switch
275    DeviceDevelopmentModeInt = orb::OBPropertyID_OB_PROP_DEVICE_DEVELOPMENT_MODE_INT as isize,
276    /// Multi-DeviceSync synchronized signal trigger out is enable state
277    SyncSignalTriggerOutBool = orb::OBPropertyID_OB_PROP_SYNC_SIGNAL_TRIGGER_OUT_BOOL as isize,
278    /// Restore factory settings and factory parameters
279    RestoreFactorySettingsBool = orb::OBPropertyID_OB_PROP_RESTORE_FACTORY_SETTINGS_BOOL as isize,
280    /// Enter recovery mode when boot the device
281    BootIntoRecoveryModeBool = orb::OBPropertyID_OB_PROP_BOOT_INTO_RECOVERY_MODE_BOOL as isize,
282    /// Query whether the current device is running in recovery mode
283    DeviceInRecoveryModeBool = orb::OBPropertyID_OB_PROP_DEVICE_IN_RECOVERY_MODE_BOOL as isize,
284    /// Capture interval mode
285    CaptureIntervalModeInt = orb::OBPropertyID_OB_PROP_CAPTURE_INTERVAL_MODE_INT as isize,
286    /// Capture time interval
287    CaptureImageTimeIntervalInt =
288        orb::OBPropertyID_OB_PROP_CAPTURE_IMAGE_TIME_INTERVAL_INT as isize,
289    /// Capture number interval
290    CaptureImageNumberIntervalInt =
291        orb::OBPropertyID_OB_PROP_CAPTURE_IMAGE_NUMBER_INTERVAL_INT as isize,
292    /// Timer reset enable
293    TimerResetEnableBool = orb::OBPropertyID_OB_PROP_TIMER_RESET_ENABLE_BOOL as isize,
294    /// Enable or disable the device to retry USB2.0 re-identification
295    DeviceUSB2RepeatIdentifyBool =
296        orb::OBPropertyID_OB_PROP_DEVICE_USB2_REPEAT_IDENTIFY_BOOL as isize,
297    /// Reboot device delay mode
298    DeviceRebootDelayInt = orb::OBPropertyID_OB_PROP_DEVICE_REBOOT_DELAY_INT as isize,
299    /// Query the status of laser overcurrent protection
300    LaserOvercurrentProtectionStatusBool =
301        orb::OBPropertyID_OB_PROP_LASER_OVERCURRENT_PROTECTION_STATUS_BOOL as isize,
302    /// Query the status of laser pulse width protection
303    LaserPulseWidthProtectionStatusBool =
304        orb::OBPropertyID_OB_PROP_LASER_PULSE_WIDTH_PROTECTION_STATUS_BOOL as isize,
305    /// Laser always on
306    LaserAlwaysOnBool = orb::OBPropertyID_OB_PROP_LASER_ALWAYS_ON_BOOL as isize,
307    /// Laser on/off alternate mode
308    LaserOnOffPatternInt = orb::OBPropertyID_OB_PROP_LASER_ON_OFF_PATTERN_INT as isize,
309    /// Depth unit flexible adjustment
310    DepthUnitFlexibleAdjustmentFloat =
311        orb::OBPropertyID_OB_PROP_DEPTH_UNIT_FLEXIBLE_ADJUSTMENT_FLOAT as isize,
312    /// Laser control
313    LaserControlInt = orb::OBPropertyID_OB_PROP_LASER_CONTROL_INT as isize,
314    /// IR brightness
315    IRBrightnessInt = orb::OBPropertyID_OB_PROP_IR_BRIGHTNESS_INT as isize,
316    /// Slave/secondary device synchronization status
317    SlaveDeviceSyncStatusBool = orb::OBPropertyID_OB_PROP_SLAVE_DEVICE_SYNC_STATUS_BOOL as isize,
318    /// Color AE max exposure
319    ColorAEMaxExposureInt = orb::OBPropertyID_OB_PROP_COLOR_AE_MAX_EXPOSURE_INT as isize,
320    /// Max exposure time of IR auto exposure
321    IRAEMaxExposureInt = orb::OBPropertyID_OB_PROP_IR_AE_MAX_EXPOSURE_INT as isize,
322    /// Disparity search range mode
323    DispSearchRangeModeInt = orb::OBPropertyID_OB_PROP_DISP_SEARCH_RANGE_MODE_INT as isize,
324    /// Laser high temperature protection
325    LaserHighTemperatureProtectBool =
326        orb::OBPropertyID_OB_PROP_LASER_HIGH_TEMPERATURE_PROTECT_BOOL as isize,
327    /// Low exposure laser control
328    LowExposureLaserControlBool =
329        orb::OBPropertyID_OB_PROP_LOW_EXPOSURE_LASER_CONTROL_BOOL as isize,
330    /// Check pps sync in signal
331    CheckPPSSyncInSignalBool = orb::OBPropertyID_OB_PROP_CHECK_PPS_SYNC_IN_SIGNAL_BOOL as isize,
332    /// Disparity search range offset
333    DispSearchOffsetInt = orb::OBPropertyID_OB_PROP_DISP_SEARCH_OFFSET_INT as isize,
334    /// Repower device
335    DeviceRepowerBool = orb::OBPropertyID_OB_PROP_DEVICE_REPOWER_BOOL as isize,
336    /// Frame interleave config index
337    FrameInterleaveConfigIndexInt =
338        orb::OBPropertyID_OB_PROP_FRAME_INTERLEAVE_CONFIG_INDEX_INT as isize,
339    /// Frame interleave enable
340    FrameInterleaveEnableBool = orb::OBPropertyID_OB_PROP_FRAME_INTERLEAVE_ENABLE_BOOL as isize,
341    /// Laser pattern sync with delay
342    FrameInterleaveLaserPatternSyncDelayInt =
343        orb::OBPropertyID_OB_PROP_FRAME_INTERLEAVE_LASER_PATTERN_SYNC_DELAY_INT as isize,
344    /// Get the health check result from device
345    OnChipCalibrationHealthCheckFloat =
346        orb::OBPropertyID_OB_PROP_ON_CHIP_CALIBRATION_HEALTH_CHECK_FLOAT as isize,
347    /// Enable or disable on-chip calibration
348    OnChipCalibrationEnableBool =
349        orb::OBPropertyID_OB_PROP_ON_CHIP_CALIBRATION_ENABLE_BOOL as isize,
350    /// Hardware noise remove filter switch
351    HWNoiseRemoveFilterEnableBool =
352        orb::OBPropertyID_OB_PROP_HW_NOISE_REMOVE_FILTER_ENABLE_BOOL as isize,
353    /// Hardware noise remove filter threshold
354    HWNoiseRemoveFilterThresholdFloat =
355        orb::OBPropertyID_OB_PROP_HW_NOISE_REMOVE_FILTER_THRESHOLD_FLOAT as isize,
356    /// Soft trigger auto capture enable
357    DeviceAutoCaptureEnableBool = orb::OBPropertyID_OB_DEVICE_AUTO_CAPTURE_ENABLE_BOOL as isize,
358    /// Soft trigger auto capture interval time
359    DeviceAutoCaptureIntervalTimeInt =
360        orb::OBPropertyID_OB_DEVICE_AUTO_CAPTURE_INTERVAL_TIME_INT as isize,
361    /// PTP time synchronization enable
362    DevicePTPClockSyncEnableBool = orb::OBPropertyID_OB_DEVICE_PTP_CLOCK_SYNC_ENABLE_BOOL as isize,
363    /// Depth with confidence stream enable
364    DepthWithConfidenceStreamEnableBool =
365        orb::OBPropertyID_OB_PROP_DEPTH_WITH_CONFIDENCE_STREAM_ENABLE_BOOL as isize,
366    /// Enable or disable confidence stream filter
367    ConfidenceStreamFilterBool = orb::OBPropertyID_OB_PROP_CONFIDENCE_STREAM_FILTER_BOOL as isize,
368    /// Confidence stream filter threshold
369    ConfidenceStreamFilterThresholdInt =
370        orb::OBPropertyID_OB_PROP_CONFIDENCE_STREAM_FILTER_THRESHOLD_INT as isize,
371    /// Confidence stream mirror enable
372    ConfidenceMirrorBool = orb::OBPropertyID_OB_PROP_CONFIDENCE_MIRROR_BOOL as isize,
373    /// Confidence stream flip enable
374    ConfidenceFlipBool = orb::OBPropertyID_OB_PROP_CONFIDENCE_FLIP_BOOL as isize,
375    /// Confidence stream rotate
376    ConfidenceRotateInt = orb::OBPropertyID_OB_PROP_CONFIDENCE_ROTATE_INT as isize,
377    /// Color camera auto exposure
378    ColorAutoExposureBool = orb::OBPropertyID_OB_PROP_COLOR_AUTO_EXPOSURE_BOOL as isize,
379    /// Color camera exposure adjustment
380    ColorExposureInt = orb::OBPropertyID_OB_PROP_COLOR_EXPOSURE_INT as isize,
381    /// Color camera gain adjustment
382    ColorGainInt = orb::OBPropertyID_OB_PROP_COLOR_GAIN_INT as isize,
383    /// Color camera automatic white balance
384    ColorAutoWhiteBalanceBool = orb::OBPropertyID_OB_PROP_COLOR_AUTO_WHITE_BALANCE_BOOL as isize,
385    /// Color camera white balance adjustment
386    ColorWhiteBalanceInt = orb::OBPropertyID_OB_PROP_COLOR_WHITE_BALANCE_INT as isize,
387    /// Color camera brightness adjustment
388    ColorBrightnessInt = orb::OBPropertyID_OB_PROP_COLOR_BRIGHTNESS_INT as isize,
389    /// Color camera sharpness adjustment
390    ColorSharpnessInt = orb::OBPropertyID_OB_PROP_COLOR_SHARPNESS_INT as isize,
391    /// Color camera shutter adjustment
392    ColorShutterInt = orb::OBPropertyID_OB_PROP_COLOR_SHUTTER_INT as isize,
393    /// Color camera saturation adjustment
394    ColorSaturationInt = orb::OBPropertyID_OB_PROP_COLOR_SATURATION_INT as isize,
395    /// Color camera contrast adjustment
396    ColorContrastInt = orb::OBPropertyID_OB_PROP_COLOR_CONTRAST_INT as isize,
397    /// Color camera gamma adjustment
398    ColorGammaInt = orb::OBPropertyID_OB_PROP_COLOR_GAMMA_INT as isize,
399    /// Color camera image rotation
400    ColorRollInt = orb::OBPropertyID_OB_PROP_COLOR_ROLL_INT as isize,
401    /// Color camera auto exposure priority
402    ColorAutoExposurePriorityInt =
403        orb::OBPropertyID_OB_PROP_COLOR_AUTO_EXPOSURE_PRIORITY_INT as isize,
404    /// Color camera brightness compensation
405    ColorBacklightCompensationInt =
406        orb::OBPropertyID_OB_PROP_COLOR_BACKLIGHT_COMPENSATION_INT as isize,
407    /// Color camera color tint
408    ColorHueInt = orb::OBPropertyID_OB_PROP_COLOR_HUE_INT as isize,
409    /// Color Camera Power Line Frequency
410    ColorPowerLineFrequencyInt = orb::OBPropertyID_OB_PROP_COLOR_POWER_LINE_FREQUENCY_INT as isize,
411    /// Automatic exposure of depth camera
412    DepthAutoExposureBool = orb::OBPropertyID_OB_PROP_DEPTH_AUTO_EXPOSURE_BOOL as isize,
413    /// Depth camera exposure adjustment
414    DepthExposureInt = orb::OBPropertyID_OB_PROP_DEPTH_EXPOSURE_INT as isize,
415    /// Depth camera gain adjustment
416    DepthGainInt = orb::OBPropertyID_OB_PROP_DEPTH_GAIN_INT as isize,
417    /// Infrared camera auto exposure
418    IRAutoExposureBool = orb::OBPropertyID_OB_PROP_IR_AUTO_EXPOSURE_BOOL as isize,
419    /// Infrared camera exposure adjustment
420    IRExposureInt = orb::OBPropertyID_OB_PROP_IR_EXPOSURE_INT as isize,
421    /// Infrared camera gain adjustment
422    IRGainInt = orb::OBPropertyID_OB_PROP_IR_GAIN_INT as isize,
423    /// Select Infrared camera data source channel
424    IRChannelDataSourceInt = orb::OBPropertyID_OB_PROP_IR_CHANNEL_DATA_SOURCE_INT as isize,
425    /// Depth effect dedistortion
426    DepthRMFilterBool = orb::OBPropertyID_OB_PROP_DEPTH_RM_FILTER_BOOL as isize,
427    /// Color camera maximal gain
428    ColorMaximalGainInt = orb::OBPropertyID_OB_PROP_COLOR_MAXIMAL_GAIN_INT as isize,
429    /// Color camera shutter gain
430    ColorMaximalShutterInt = orb::OBPropertyID_OB_PROP_COLOR_MAXIMAL_SHUTTER_INT as isize,
431    /// Enable/disable IR short exposure function
432    IRShortExposureBool = orb::OBPropertyID_OB_PROP_IR_SHORT_EXPOSURE_BOOL as isize,
433    /// Color camera HDR
434    ColorHDRBool = orb::OBPropertyID_OB_PROP_COLOR_HDR_BOOL as isize,
435    /// IR long exposure mode switch
436    IRLongExposureBool = orb::OBPropertyID_OB_PROP_IR_LONG_EXPOSURE_BOOL as isize,
437    /// Setting and getting the USB device frame skipping mode status
438    SkipFrameBool = orb::OBPropertyID_OB_PROP_SKIP_FRAME_BOOL as isize,
439    /// Depth HDR merge
440    HDRMergeBool = orb::OBPropertyID_OB_PROP_HDR_MERGE_BOOL as isize,
441    /// Color camera FOCUS
442    ColorFocusInt = orb::OBPropertyID_OB_PROP_COLOR_FOCUS_INT as isize,
443    /// IR rectify status
444    IRRectifyBool = orb::OBPropertyID_OB_PROP_IR_RECTIFY_BOOL as isize,
445    /// Depth camera priority
446    DepthAutoExposurePriorityInt =
447        orb::OBPropertyID_OB_PROP_DEPTH_AUTO_EXPOSURE_PRIORITY_INT as isize,
448    /// Software disparity to depth
449    SDKDisparityToDepthBool = orb::OBPropertyID_OB_PROP_SDK_DISPARITY_TO_DEPTH_BOOL as isize,
450    /// Depth data unpacking function switch
451    SDKDepthFrameUnpackBool = orb::OBPropertyID_OB_PROP_SDK_DEPTH_FRAME_UNPACK_BOOL as isize,
452    /// IR data unpacking function switch
453    SDKIRFrameUnpackBool = orb::OBPropertyID_OB_PROP_SDK_IR_FRAME_UNPACK_BOOL as isize,
454    /// Accel data conversion function switch
455    SDKAccelFrameTransformedBool =
456        orb::OBPropertyID_OB_PROP_SDK_ACCEL_FRAME_TRANSFORMED_BOOL as isize,
457    /// Gyro data conversion function switch
458    SDKGyroFrameTransformedBool =
459        orb::OBPropertyID_OB_PROP_SDK_GYRO_FRAME_TRANSFORMED_BOOL as isize,
460    /// Left IR frame data unpacking function switch
461    SDKIRLeftFrameUnpackBool = orb::OBPropertyID_OB_PROP_SDK_IR_LEFT_FRAME_UNPACK_BOOL as isize,
462    /// Right IR frame data unpacking function switch
463    SDKIRRightFrameUnpackBool = orb::OBPropertyID_OB_PROP_SDK_IR_RIGHT_FRAME_UNPACK_BOOL as isize,
464    /// Read the current network bandwidth type of the network device
465    NetworkBandwidthTypeInt = orb::OBPropertyID_OB_PROP_NETWORK_BANDWIDTH_TYPE_INT as isize,
466    /// Switch device performance mode
467    DevicePerformanceModeInt = orb::OBPropertyID_OB_PROP_DEVICE_PERFORMANCE_MODE_INT as isize,
468    /// Calibration JSON file read from device
469    RawDataCameraCalibJsonFile = orb::OBPropertyID_OB_RAW_DATA_CAMERA_CALIB_JSON_FILE as isize,
470    /// Confidence degree
471    DebugESGMConfidenceFloat = orb::OBPropertyID_OB_PROP_DEBUG_ESGM_CONFIDENCE_FLOAT as isize,
472}
473
474/// Filter configuration value type
475#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
476pub enum OBFilterConfigValueType {
477    /// Invalid Type
478    Invalid = orb::OBFilterConfigValueType_OB_FILTER_CONFIG_VALUE_TYPE_INVALID as isize,
479    /// Integer Type
480    Int = orb::OBFilterConfigValueType_OB_FILTER_CONFIG_VALUE_TYPE_INT as isize,
481    /// Float Type
482    Float = orb::OBFilterConfigValueType_OB_FILTER_CONFIG_VALUE_TYPE_FLOAT as isize,
483    /// Boolean Type
484    Bool = orb::OBFilterConfigValueType_OB_FILTER_CONFIG_VALUE_TYPE_BOOLEAN as isize,
485}
486
487impl From<orb::OBFilterConfigValueType> for OBFilterConfigValueType {
488    fn from(value: orb::OBFilterConfigValueType) -> Self {
489        match value {
490            orb::OBFilterConfigValueType_OB_FILTER_CONFIG_VALUE_TYPE_INVALID => {
491                OBFilterConfigValueType::Invalid
492            }
493            orb::OBFilterConfigValueType_OB_FILTER_CONFIG_VALUE_TYPE_INT => {
494                OBFilterConfigValueType::Int
495            }
496            orb::OBFilterConfigValueType_OB_FILTER_CONFIG_VALUE_TYPE_FLOAT => {
497                OBFilterConfigValueType::Float
498            }
499            orb::OBFilterConfigValueType_OB_FILTER_CONFIG_VALUE_TYPE_BOOLEAN => {
500                OBFilterConfigValueType::Bool
501            }
502            _ => OBFilterConfigValueType::Invalid,
503        }
504    }
505}
506
507/// Format conversion types
508#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
509pub enum OBConvertFormat {
510    /// YUYV to RGB
511    YUYVToRGB = orb::OBConvertFormat_FORMAT_YUYV_TO_RGB as isize,
512    /// I420 to RGB
513    I420ToRGB = orb::OBConvertFormat_FORMAT_I420_TO_RGB as isize,
514    /// NV21 to RGB
515    NV21ToRGB = orb::OBConvertFormat_FORMAT_NV21_TO_RGB as isize,
516    /// NV12 to RGB
517    NV12ToRGB = orb::OBConvertFormat_FORMAT_NV12_TO_RGB as isize,
518    /// MJPG to I420
519    MJPGToI420 = orb::OBConvertFormat_FORMAT_MJPG_TO_I420 as isize,
520    /// RGB to BGR
521    RGBToBGR = orb::OBConvertFormat_FORMAT_RGB_TO_BGR as isize,
522    /// MJPG to NV21
523    MJPGToNV21 = orb::OBConvertFormat_FORMAT_MJPG_TO_NV21 as isize,
524    /// MJPG to RGB
525    MJPGToRGB = orb::OBConvertFormat_FORMAT_MJPG_TO_RGB as isize,
526    /// MJPG to BGR
527    MJPGToBGR = orb::OBConvertFormat_FORMAT_MJPG_TO_BGR as isize,
528    /// MJPG to BGRA
529    MJPGToBGRA = orb::OBConvertFormat_FORMAT_MJPG_TO_BGRA as isize,
530    /// UYVY to RGB
531    UYVYToRGB = orb::OBConvertFormat_FORMAT_UYVY_TO_RGB as isize,
532    /// BGR to RGB
533    BGRToRGB = orb::OBConvertFormat_FORMAT_BGR_TO_RGB as isize,
534    /// MJPG to NV12
535    MJPGToNV12 = orb::OBConvertFormat_FORMAT_MJPG_TO_NV12 as isize,
536    /// YUYV to BGR
537    YUYVToBGR = orb::OBConvertFormat_FORMAT_YUYV_TO_BGR as isize,
538    /// YUYV to RGBA
539    YUYVToRGBA = orb::OBConvertFormat_FORMAT_YUYV_TO_RGBA as isize,
540    /// YUYV to BGRA
541    YUYVToBGRA = orb::OBConvertFormat_FORMAT_YUYV_TO_BGRA as isize,
542    /// YUYV to Y16
543    YUYVToY16 = orb::OBConvertFormat_FORMAT_YUYV_TO_Y16 as isize,
544    /// YUYV to Y8
545    YUYVToY8 = orb::OBConvertFormat_FORMAT_YUYV_TO_Y8 as isize,
546    /// RGBA to RGB
547    RGBAToRGB = orb::OBConvertFormat_FORMAT_RGBA_TO_RGB as isize,
548    /// BGRA to BGR
549    BGRAToBGR = orb::OBConvertFormat_FORMAT_BGRA_TO_BGR as isize,
550    /// Y16 to RGB
551    Y16ToRGB = orb::OBConvertFormat_FORMAT_Y16_TO_RGB as isize,
552    /// Y8 to RGB
553    Y8ToRGB = orb::OBConvertFormat_FORMAT_Y8_TO_RGB as isize,
554}
555
556/// Exception types
557#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
558pub enum OBExceptionType {
559    /// Unknown error, an error not clearly defined by the SDK
560    Unknown = orb::OBExceptionType_OB_EXCEPTION_TYPE_UNKNOWN as isize,
561    /// Standard exception, an error caused by the standard library
562    StdException = orb::OBExceptionType_OB_EXCEPTION_STD_EXCEPTION as isize,
563    /// Camera/Device has been disconnected, the camera/device is not available
564    CameraDisconnected = orb::OBExceptionType_OB_EXCEPTION_TYPE_CAMERA_DISCONNECTED as isize,
565    /// An error in the SDK adaptation platform layer, which means an error in the implementation of a specific system platform
566    PlatformException = orb::OBExceptionType_OB_EXCEPTION_TYPE_PLATFORM as isize,
567    /// Invalid parameter type exception, need to check input parameter
568    InvalidValue = orb::OBExceptionType_OB_EXCEPTION_TYPE_INVALID_VALUE as isize,
569    /// Wrong API call sequence, the API is called in the wrong order or the wrong parameter is passed
570    WrongAPICallSequence = orb::OBExceptionType_OB_EXCEPTION_TYPE_WRONG_API_CALL_SEQUENCE as isize,
571    /// SDK and firmware have not yet implemented this function or feature
572    NotImplemented = orb::OBExceptionType_OB_EXCEPTION_TYPE_NOT_IMPLEMENTED as isize,
573    /// SDK access I/O exception error
574    IOException = orb::OBExceptionType_OB_EXCEPTION_TYPE_IO as isize,
575    /// SDK access and use memory errors. For example, the frame fails to allocate memory
576    MemoryException = orb::OBExceptionType_OB_EXCEPTION_TYPE_MEMORY as isize,
577    /// Unsupported operation type error by SDK or device
578    UnsupportedOperation = orb::OBExceptionType_OB_EXCEPTION_TYPE_UNSUPPORTED_OPERATION as isize,
579}
580
581impl From<orb::OBExceptionType> for OBExceptionType {
582    fn from(value: orb::OBExceptionType) -> Self {
583        match value {
584            orb::OBExceptionType_OB_EXCEPTION_TYPE_UNKNOWN => OBExceptionType::Unknown,
585            orb::OBExceptionType_OB_EXCEPTION_STD_EXCEPTION => OBExceptionType::StdException,
586            orb::OBExceptionType_OB_EXCEPTION_TYPE_CAMERA_DISCONNECTED => {
587                OBExceptionType::CameraDisconnected
588            }
589            orb::OBExceptionType_OB_EXCEPTION_TYPE_PLATFORM => OBExceptionType::PlatformException,
590            orb::OBExceptionType_OB_EXCEPTION_TYPE_INVALID_VALUE => OBExceptionType::InvalidValue,
591            orb::OBExceptionType_OB_EXCEPTION_TYPE_WRONG_API_CALL_SEQUENCE => {
592                OBExceptionType::WrongAPICallSequence
593            }
594            orb::OBExceptionType_OB_EXCEPTION_TYPE_NOT_IMPLEMENTED => {
595                OBExceptionType::NotImplemented
596            }
597            orb::OBExceptionType_OB_EXCEPTION_TYPE_IO => OBExceptionType::IOException,
598            orb::OBExceptionType_OB_EXCEPTION_TYPE_MEMORY => OBExceptionType::MemoryException,
599            orb::OBExceptionType_OB_EXCEPTION_TYPE_UNSUPPORTED_OPERATION => {
600                OBExceptionType::UnsupportedOperation
601            }
602            _ => OBExceptionType::Unknown,
603        }
604    }
605}
606
607/// Device type
608#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
609pub enum OBDeviceType {
610    /// Unknown device type
611    Unknown = orb::OBDeviceType_OB_DEVICE_TYPE_UNKNOWN as isize,
612    /// Monocular structured light camera
613    SLMonocularCamera = orb::OBDeviceType_OB_STRUCTURED_LIGHT_MONOCULAR_CAMERA as isize,
614    /// Binocular structured light camera
615    SLBinocularCamera = orb::OBDeviceType_OB_STRUCTURED_LIGHT_BINOCULAR_CAMERA as isize,
616    /// Time-of-Flight camera
617    TOFCamera = orb::OBDeviceType_OB_TOF_CAMERA as isize,
618}
619
620impl From<orb::OBDeviceType> for OBDeviceType {
621    fn from(value: orb::OBDeviceType) -> Self {
622        match value {
623            orb::OBDeviceType_OB_DEVICE_TYPE_UNKNOWN => OBDeviceType::Unknown,
624            orb::OBDeviceType_OB_STRUCTURED_LIGHT_MONOCULAR_CAMERA => {
625                OBDeviceType::SLMonocularCamera
626            }
627            orb::OBDeviceType_OB_STRUCTURED_LIGHT_BINOCULAR_CAMERA => {
628                OBDeviceType::SLBinocularCamera
629            }
630            orb::OBDeviceType_OB_TOF_CAMERA => OBDeviceType::TOFCamera,
631            _ => OBDeviceType::Unknown,
632        }
633    }
634}
635
636/// Stream Type
637#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
638pub enum OBStreamType {
639    /// Unknown stream type
640    Unknown = orb::OBStreamType_OB_STREAM_UNKNOWN as isize,
641    /// Video stream
642    Video = orb::OBStreamType_OB_STREAM_VIDEO as isize,
643    /// Infrared stream
644    Infrared = orb::OBStreamType_OB_STREAM_IR as isize,
645    /// Color stream
646    Color = orb::OBStreamType_OB_STREAM_COLOR as isize,
647    /// Depth stream
648    Depth = orb::OBStreamType_OB_STREAM_DEPTH as isize,
649    /// Accelerometer stream
650    Accelerometer = orb::OBStreamType_OB_STREAM_ACCEL as isize,
651    /// Gyroscope stream
652    Gyroscope = orb::OBStreamType_OB_STREAM_GYRO as isize,
653    /// Left infrared stream
654    LeftInfrared = orb::OBStreamType_OB_STREAM_IR_LEFT as isize,
655    /// Right infrared stream
656    RightInfrared = orb::OBStreamType_OB_STREAM_IR_RIGHT as isize,
657    /// Raw phase stream
658    RawPhase = orb::OBStreamType_OB_STREAM_RAW_PHASE as isize,
659    /// Confidence stream
660    Confidence = orb::OBStreamType_OB_STREAM_CONFIDENCE as isize,
661}
662
663/// Permission type
664#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
665pub enum OBPermissionType {
666    Read = orb::OBPermissionType_OB_PERMISSION_READ as isize,
667    Write = orb::OBPermissionType_OB_PERMISSION_WRITE as isize,
668    ReadWrite = orb::OBPermissionType_OB_PERMISSION_READ_WRITE as isize,
669}
670
671/// Hole Fill Mode
672#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
673pub enum OBHoleFillMode {
674    /// Fill with the top pixel value
675    Top = orb::OBHoleFillingMode_OB_HOLE_FILL_TOP as isize,
676    /// Fill with the nearest pixel (distance to camera) value
677    Nearest = orb::OBHoleFillingMode_OB_HOLE_FILL_NEAREST as isize,
678    /// Fill with the farthest pixel (distance to camera) value
679    Farthest = orb::OBHoleFillingMode_OB_HOLE_FILL_FAREST as isize,
680}