orbbec-sdk 0.1.0

High-level bindings to Orbbec SDK v2
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
//! Device properties
use crate::sys::enums::OBPropertyID;

/// Property value
#[derive(Debug, PartialEq)]
pub enum PropertyValue<'a> {
    Bool(&'a mut bool),
    Int(&'a mut i32),
    Float(&'a mut f32),
}

/// Device property
#[derive(Debug, Clone, Copy, PartialEq)]
pub enum DeviceProperty {
    /// LDP switch
    LDP(bool),
    /// Laser switch
    Laser(bool),
    /// Laser pulse width
    LaserPulseWidth(i32),
    /// Laser current (unit: mA)
    LaserCurrent(f32),
    /// IR flood switch
    Flood(bool),
    /// IR flood level
    FloodLevel(i32),
    /// Enable/disable temperature compensation
    TemperatureCompensation(bool),
    /// Depth mirror
    DepthMirror(bool),
    /// Depth flip
    DepthFlip(bool),
    /// Depth Postfilter
    DepthPostfilter(bool),
    /// Depth Holefilter
    DepthHolefilter(bool),
    /// IR mirror
    IRMirror(bool),
    /// IR flip
    IRFlip(bool),
    /// Minimum depth threshold
    MinDepth(i32),
    /// Maximum depth threshold
    MaxDepth(i32),
    /// Software filter switch
    DepthNoiseRemovalFilter(bool),
    /// LDP status
    LDPStatus(bool),
    /// Maxdiff for depth noise removal filter
    DepthNoiseRemovalFilterMaxDiff(i32),
    /// MaxSpeckleSize for depth noise removal filter
    DepthNoiseRemovalFilterMaxSpeckleSize(i32),
    /// Hardware d2c is on
    DepthAlignHardware(bool),
    /// Timestamp adjustment
    TimestampOffset(i32),
    /// Hardware distortion switch Rectify
    HardwareDistortionSwitch(bool),
    /// Fan mode switch
    FanWorkMode(i32),
    /// Multi-resolution D2C mode
    DepthAlignHardwareMode(i32),
    /// Anti-collusion activation status
    AntiCollusionActivationStatus(bool),
    /// Depth precision level
    DepthPrecisionLevel(i32),
    /// TOF filter range configuration
    TofFilterRange(i32),
    /// Laser mode
    LaserMode(i32),
    /// brt2r-rectify function switch
    Rectify2(bool),
    /// Color mirror
    ColorMirror(bool),
    /// Color flip
    ColorFlip(bool),
    /// Indicator switch
    IndicatorLight(bool),
    /// Disparity to depth switch
    DisparityToDepth(bool),
    /// BRT function switch
    BRT(bool),
    /// Watchdog function switch
    Watchdog(bool),
    /// External signal trigger restart function switch
    ExternalSignalReset(bool),
    /// Heartbeat monitoring function switch
    Heartbeat(bool),
    /// Depth cropping mode device
    DepthCroppingMode(i32),
    /// D2C preprocessing switch
    D2CPreprocess(bool),
    /// Enable/disable GPM function
    GPM(bool),
    /// Custom RGB cropping switch
    RGBCustomCrop(bool),
    /// Device operating mode (power consumption)
    DeviceWorkMode(i32),
    /// Device communication type
    DeviceCommunicationType(i32),
    /// Switch infrared imaging mode
    SwitchIRMode(i32),
    /// Laser power level
    LaserPowerLevelControl(i32),
    /// LDP's measure distance
    LDPMeasureDistance(i32),
    /// Reset device time to zero
    TimerResetSignal(bool),
    /// Enable send reset device time signal to other device
    TimerResetTriggerOutEnable(bool),
    /// Delay to reset device time
    TimerResetDelayUs(i32),
    /// Signal to capture image
    CaptureImageSignal(bool),
    /// Right IR sensor mirror state
    IRRightMirror(bool),
    /// Number frame to capture once a 'OB_PROP_CAPTURE_IMAGE_SIGNAL_BOOL' effect
    CaptureImageFrameNumber(i32),
    /// Right IR sensor flip state
    IRRightFlip(bool),
    /// Color sensor rotation
    ColorRotate(i32),
    /// IR/Left-IR sensor rotation
    IRRotate(i32),
    /// Right IR sensor rotation
    IRRightRotate(i32),
    /// Depth sensor rotation
    DepthRotate(i32),
    /// Get hardware laser power actual level
    LaserPowerActualLevel(i32),
    /// USB's power state
    USBPowerState(i32),
    /// DC's power state
    DCPowerState(i32),
    /// Device development mode switch
    DeviceDevelopmentMode(i32),
    /// Multi-DeviceSync synchronized signal trigger out is enable state
    SyncSignalTriggerOut(bool),
    /// Restore factory settings and factory parameters
    RestoreFactorySettings(bool),
    /// Enter recovery mode when boot the device
    BootIntoRecoveryMode(bool),
    /// Query whether the current device is running in recovery mode
    DeviceInRecoveryMode(bool),
    /// Capture interval mode
    CaptureIntervalMode(i32),
    /// Capture time interval
    CaptureImageTimeInterval(i32),
    /// Capture number interval
    CaptureImageNumberInterval(i32),
    /// Timer reset enable
    TimerResetEnable(bool),
    /// Enable or disable the device to retry USB2.0 re-identification
    DeviceUSB2RepeatIdentify(bool),
    /// Reboot device delay mode
    DeviceRebootDelay(i32),
    /// Query the status of laser overcurrent protection
    LaserOvercurrentProtectionStatus(bool),
    /// Query the status of laser pulse width protection
    LaserPulseWidthProtectionStatus(bool),
    /// Laser always on
    LaserAlwaysOn(bool),
    /// Laser on/off alternate mode
    LaserOnOffPattern(i32),
    /// Depth unit flexible adjustment
    DepthUnitFlexibleAdjustment(f32),
    /// Laser control
    LaserControl(i32),
    /// IR brightness
    IRBrightness(i32),
    /// Slave/secondary device synchronization status
    SlaveDeviceSyncStatus(bool),
    /// Color AE max exposure
    ColorAEMaxExposure(i32),
    /// Max exposure time of IR auto exposure
    IRAEMaxExposure(i32),
    /// Disparity search range mode
    DispSearchRangeMode(i32),
    /// Laser high temperature protection
    LaserHighTemperatureProtect(bool),
    /// Low exposure laser control
    LowExposureLaserControl(bool),
    /// Check pps sync in signal
    CheckPPSSyncInSignal(bool),
    /// Disparity search range offset
    DispSearchOffset(i32),
    /// Repower device
    DeviceRepower(bool),
    /// Frame interleave config index
    FrameInterleaveConfigIndex(i32),
    /// Frame interleave enable
    FrameInterleaveEnable(bool),
    /// Laser pattern sync with delay
    FrameInterleaveLaserPatternSyncDelay(i32),
    /// Get the health check result from device
    OnChipCalibrationHealthCheck(f32),
    /// Enable or disable on-chip calibration
    OnChipCalibrationEnable(bool),
    /// Hardware noise remove filter switch
    HWNoiseRemoveFilterEnable(bool),
    /// Hardware noise remove filter threshold
    HWNoiseRemoveFilterThreshold(f32),
    /// Soft trigger auto capture enable
    DeviceAutoCaptureEnable(bool),
    /// Soft trigger auto capture interval time
    DeviceAutoCaptureIntervalTime(i32),
    /// PTP time synchronization enable
    DevicePTPClockSyncEnable(bool),
    /// Depth with confidence stream enable
    DepthWithConfidenceStreamEnable(bool),
    /// Enable or disable confidence stream filter
    ConfidenceStreamFilter(bool),
    /// Confidence stream filter threshold
    ConfidenceStreamFilterThreshold(i32),
    /// Confidence stream mirror enable
    ConfidenceMirror(bool),
    /// Confidence stream flip enable
    ConfidenceFlip(bool),
    /// Confidence stream rotate
    ConfidenceRotate(i32),
    /// Color camera auto exposure
    ColorAutoExposure(bool),
    /// Color camera exposure adjustment
    ColorExposure(i32),
    /// Color camera gain adjustment
    ColorGain(i32),
    /// Color camera automatic white balance
    ColorAutoWhiteBalance(bool),
    /// Color camera white balance adjustment
    ColorWhiteBalance(i32),
    /// Color camera brightness adjustment
    ColorBrightness(i32),
    /// Color camera sharpness adjustment
    ColorSharpness(i32),
    /// Color camera shutter adjustment
    ColorShutter(i32),
    /// Color camera saturation adjustment
    ColorSaturation(i32),
    /// Color camera contrast adjustment
    ColorContrast(i32),
    /// Color camera gamma adjustment
    ColorGamma(i32),
    /// Color camera image rotation
    ColorRoll(i32),
    /// Color camera auto exposure priority
    ColorAutoExposurePriority(i32),
    /// Color camera brightness compensation
    ColorBacklightCompensation(i32),
    /// Color camera color tint
    ColorHue(i32),
    /// Color Camera Power Line Frequency
    ColorPowerLineFrequency(i32),
    /// Automatic exposure of depth camera
    DepthAutoExposure(bool),
    /// Depth camera exposure adjustment
    DepthExposure(i32),
    /// Depth camera gain adjustment
    DepthGain(i32),
    /// Infrared camera auto exposure
    IRAutoExposure(bool),
    /// Infrared camera exposure adjustment
    IRExposure(i32),
    /// Infrared camera gain adjustment
    IRGain(i32),
    /// Select Infrared camera data source channel
    IRChannelDataSource(i32),
    /// Depth effect dedistortion
    DepthRMFilter(bool),
    /// Color camera maximal gain
    ColorMaximalGain(i32),
    /// Color camera shutter gain
    ColorMaximalShutter(i32),
    /// Enable/disable IR short exposure function
    IRShortExposure(bool),
    /// Color camera HDR
    ColorHDR(bool),
    /// IR long exposure mode switch
    IRLongExposure(bool),
    /// Setting and getting the USB device frame skipping mode status
    SkipFrame(bool),
    /// Depth HDR merge
    HDRMerge(bool),
    /// Color camera FOCUS
    ColorFocus(i32),
    /// IR rectify status
    IRRectify(bool),
    /// Depth camera priority
    DepthAutoExposurePriority(i32),
    /// Software disparity to depth
    SDKDisparityToDepth(bool),
    /// Depth data unpacking function switch
    SDKDepthFrameUnpack(bool),
    /// IR data unpacking function switch
    SDKIRFrameUnpack(bool),
    /// Accel data conversion function switch
    SDKAccelFrameTransformed(bool),
    /// Gyro data conversion function switch
    SDKGyroFrameTransformed(bool),
    /// Left IR frame data unpacking function switch
    SDKIRLeftFrameUnpack(bool),
    /// Right IR frame data unpacking function switch
    SDKIRRightFrameUnpack(bool),
    /// Read the current network bandwidth type of the network device
    NetworkBandwidthType(i32),
    /// Switch device performance mode
    DevicePerformanceMode(i32),
    /// Calibration JSON file read from device
    RawDataCameraCalibJsonFile(i32),
    /// Confidence degree
    DebugESGMConfidence(f32),
}

impl<'a> DeviceProperty {
    /// Decompose to (property_id, property_value)
    pub(crate) fn decompose(&'a mut self) -> (OBPropertyID, PropertyValue<'a>) {
        match self {
            DeviceProperty::LDP(value) => (OBPropertyID::LDPBool, PropertyValue::Bool(value)),
            DeviceProperty::Laser(value) => (OBPropertyID::LaserBool, PropertyValue::Bool(value)),
            DeviceProperty::LaserPulseWidth(value) => {
                (OBPropertyID::LaserPulseWidthInt, PropertyValue::Int(value))
            }
            DeviceProperty::LaserCurrent(value) => {
                (OBPropertyID::LaserCurrentFloat, PropertyValue::Float(value))
            }
            DeviceProperty::Flood(value) => (OBPropertyID::FloodBool, PropertyValue::Bool(value)),
            DeviceProperty::FloodLevel(value) => {
                (OBPropertyID::FloodLevelInt, PropertyValue::Int(value))
            }
            DeviceProperty::TemperatureCompensation(value) => (
                OBPropertyID::TemperatureCompensationBool,
                PropertyValue::Bool(value),
            ),
            DeviceProperty::DepthMirror(value) => {
                (OBPropertyID::DepthMirrorBool, PropertyValue::Bool(value))
            }
            DeviceProperty::DepthFlip(value) => {
                (OBPropertyID::DepthFlipBool, PropertyValue::Bool(value))
            }
            DeviceProperty::DepthPostfilter(value) => (
                OBPropertyID::DepthPostfilterBool,
                PropertyValue::Bool(value),
            ),
            DeviceProperty::DepthHolefilter(value) => (
                OBPropertyID::DepthHolefilterBool,
                PropertyValue::Bool(value),
            ),
            DeviceProperty::IRMirror(value) => {
                (OBPropertyID::IRMirrorBool, PropertyValue::Bool(value))
            }
            DeviceProperty::IRFlip(value) => (OBPropertyID::IRFlipBool, PropertyValue::Bool(value)),
            DeviceProperty::MinDepth(value) => {
                (OBPropertyID::MinDepthInt, PropertyValue::Int(value))
            }
            DeviceProperty::MaxDepth(value) => {
                (OBPropertyID::MaxDepthInt, PropertyValue::Int(value))
            }
            DeviceProperty::DepthNoiseRemovalFilter(value) => (
                OBPropertyID::DepthNoiseRemovalFilterBool,
                PropertyValue::Bool(value),
            ),
            DeviceProperty::LDPStatus(value) => {
                (OBPropertyID::LDPStatusBool, PropertyValue::Bool(value))
            }
            DeviceProperty::DepthNoiseRemovalFilterMaxDiff(value) => (
                OBPropertyID::DepthNoiseRemovalFilterMaxDiffInt,
                PropertyValue::Int(value),
            ),
            DeviceProperty::DepthNoiseRemovalFilterMaxSpeckleSize(value) => (
                OBPropertyID::DepthNoiseRemovalFilterMaxSpeckleSizeInt,
                PropertyValue::Int(value),
            ),
            DeviceProperty::DepthAlignHardware(value) => (
                OBPropertyID::DepthAlignHardwareBool,
                PropertyValue::Bool(value),
            ),
            DeviceProperty::TimestampOffset(value) => {
                (OBPropertyID::TimestampOffsetInt, PropertyValue::Int(value))
            }
            DeviceProperty::HardwareDistortionSwitch(value) => (
                OBPropertyID::HardwareDistortionSwitchBool,
                PropertyValue::Bool(value),
            ),
            DeviceProperty::FanWorkMode(value) => {
                (OBPropertyID::FanWorkModeInt, PropertyValue::Int(value))
            }
            DeviceProperty::DepthAlignHardwareMode(value) => (
                OBPropertyID::DepthAlignHardwareModeInt,
                PropertyValue::Int(value),
            ),
            DeviceProperty::AntiCollusionActivationStatus(value) => (
                OBPropertyID::AntiCollusionActivationStatusBool,
                PropertyValue::Bool(value),
            ),
            DeviceProperty::DepthPrecisionLevel(value) => (
                OBPropertyID::DepthPrecisionLevelInt,
                PropertyValue::Int(value),
            ),
            DeviceProperty::TofFilterRange(value) => {
                (OBPropertyID::TofFilterRangeInt, PropertyValue::Int(value))
            }
            DeviceProperty::LaserMode(value) => {
                (OBPropertyID::LaserModeInt, PropertyValue::Int(value))
            }
            DeviceProperty::Rectify2(value) => {
                (OBPropertyID::Rectify2Bool, PropertyValue::Bool(value))
            }
            DeviceProperty::ColorMirror(value) => {
                (OBPropertyID::ColorMirrorBool, PropertyValue::Bool(value))
            }
            DeviceProperty::ColorFlip(value) => {
                (OBPropertyID::ColorFlipBool, PropertyValue::Bool(value))
            }
            DeviceProperty::IndicatorLight(value) => {
                (OBPropertyID::IndicatorLightBool, PropertyValue::Bool(value))
            }
            DeviceProperty::DisparityToDepth(value) => (
                OBPropertyID::DisparityToDepthBool,
                PropertyValue::Bool(value),
            ),
            DeviceProperty::BRT(value) => (OBPropertyID::BRTBool, PropertyValue::Bool(value)),
            DeviceProperty::Watchdog(value) => {
                (OBPropertyID::WatchdogBool, PropertyValue::Bool(value))
            }
            DeviceProperty::ExternalSignalReset(value) => (
                OBPropertyID::ExternalSignalResetBool,
                PropertyValue::Bool(value),
            ),
            DeviceProperty::Heartbeat(value) => {
                (OBPropertyID::HeartbeatBool, PropertyValue::Bool(value))
            }
            DeviceProperty::DepthCroppingMode(value) => (
                OBPropertyID::DepthCroppingModeInt,
                PropertyValue::Int(value),
            ),
            DeviceProperty::D2CPreprocess(value) => {
                (OBPropertyID::D2CPreprocessBool, PropertyValue::Bool(value))
            }
            DeviceProperty::GPM(value) => (OBPropertyID::GPMBool, PropertyValue::Bool(value)),
            DeviceProperty::RGBCustomCrop(value) => {
                (OBPropertyID::RGBCustomCropBool, PropertyValue::Bool(value))
            }
            DeviceProperty::DeviceWorkMode(value) => {
                (OBPropertyID::DeviceWorkModeInt, PropertyValue::Int(value))
            }
            DeviceProperty::DeviceCommunicationType(value) => (
                OBPropertyID::DeviceCommunicationTypeInt,
                PropertyValue::Int(value),
            ),
            DeviceProperty::SwitchIRMode(value) => {
                (OBPropertyID::SwitchIRModeInt, PropertyValue::Int(value))
            }
            DeviceProperty::LaserPowerLevelControl(value) => (
                OBPropertyID::LaserPowerLevelControlInt,
                PropertyValue::Int(value),
            ),
            DeviceProperty::LDPMeasureDistance(value) => (
                OBPropertyID::LDPMeasureDistanceInt,
                PropertyValue::Int(value),
            ),
            DeviceProperty::TimerResetSignal(value) => (
                OBPropertyID::TimerResetSignalBool,
                PropertyValue::Bool(value),
            ),
            DeviceProperty::TimerResetTriggerOutEnable(value) => (
                OBPropertyID::TimerResetTriggerOutEnableBool,
                PropertyValue::Bool(value),
            ),
            DeviceProperty::TimerResetDelayUs(value) => (
                OBPropertyID::TimerResetDelayUsInt,
                PropertyValue::Int(value),
            ),
            DeviceProperty::CaptureImageSignal(value) => (
                OBPropertyID::CaptureImageSignalBool,
                PropertyValue::Bool(value),
            ),
            DeviceProperty::IRRightMirror(value) => {
                (OBPropertyID::IRRightMirrorBool, PropertyValue::Bool(value))
            }
            DeviceProperty::CaptureImageFrameNumber(value) => (
                OBPropertyID::CaptureImageFrameNumberInt,
                PropertyValue::Int(value),
            ),
            DeviceProperty::IRRightFlip(value) => {
                (OBPropertyID::IRRightFlipBool, PropertyValue::Bool(value))
            }
            DeviceProperty::ColorRotate(value) => {
                (OBPropertyID::ColorRotateInt, PropertyValue::Int(value))
            }
            DeviceProperty::IRRotate(value) => {
                (OBPropertyID::IRRotateInt, PropertyValue::Int(value))
            }
            DeviceProperty::IRRightRotate(value) => {
                (OBPropertyID::IRRightRotateInt, PropertyValue::Int(value))
            }
            DeviceProperty::DepthRotate(value) => {
                (OBPropertyID::DepthRotateInt, PropertyValue::Int(value))
            }
            DeviceProperty::LaserPowerActualLevel(value) => (
                OBPropertyID::LaserPowerActualLevelInt,
                PropertyValue::Int(value),
            ),
            DeviceProperty::USBPowerState(value) => {
                (OBPropertyID::USBPowerStateInt, PropertyValue::Int(value))
            }
            DeviceProperty::DCPowerState(value) => {
                (OBPropertyID::DCPowerStateInt, PropertyValue::Int(value))
            }
            DeviceProperty::DeviceDevelopmentMode(value) => (
                OBPropertyID::DeviceDevelopmentModeInt,
                PropertyValue::Int(value),
            ),
            DeviceProperty::SyncSignalTriggerOut(value) => (
                OBPropertyID::SyncSignalTriggerOutBool,
                PropertyValue::Bool(value),
            ),
            DeviceProperty::RestoreFactorySettings(value) => (
                OBPropertyID::RestoreFactorySettingsBool,
                PropertyValue::Bool(value),
            ),
            DeviceProperty::BootIntoRecoveryMode(value) => (
                OBPropertyID::BootIntoRecoveryModeBool,
                PropertyValue::Bool(value),
            ),
            DeviceProperty::DeviceInRecoveryMode(value) => (
                OBPropertyID::DeviceInRecoveryModeBool,
                PropertyValue::Bool(value),
            ),
            DeviceProperty::CaptureIntervalMode(value) => (
                OBPropertyID::CaptureIntervalModeInt,
                PropertyValue::Int(value),
            ),
            DeviceProperty::CaptureImageTimeInterval(value) => (
                OBPropertyID::CaptureImageTimeIntervalInt,
                PropertyValue::Int(value),
            ),
            DeviceProperty::CaptureImageNumberInterval(value) => (
                OBPropertyID::CaptureImageNumberIntervalInt,
                PropertyValue::Int(value),
            ),
            DeviceProperty::TimerResetEnable(value) => (
                OBPropertyID::TimerResetEnableBool,
                PropertyValue::Bool(value),
            ),
            DeviceProperty::DeviceUSB2RepeatIdentify(value) => (
                OBPropertyID::DeviceUSB2RepeatIdentifyBool,
                PropertyValue::Bool(value),
            ),
            DeviceProperty::DeviceRebootDelay(value) => (
                OBPropertyID::DeviceRebootDelayInt,
                PropertyValue::Int(value),
            ),
            DeviceProperty::LaserOvercurrentProtectionStatus(value) => (
                OBPropertyID::LaserOvercurrentProtectionStatusBool,
                PropertyValue::Bool(value),
            ),
            DeviceProperty::LaserPulseWidthProtectionStatus(value) => (
                OBPropertyID::LaserPulseWidthProtectionStatusBool,
                PropertyValue::Bool(value),
            ),
            DeviceProperty::LaserAlwaysOn(value) => {
                (OBPropertyID::LaserAlwaysOnBool, PropertyValue::Bool(value))
            }
            DeviceProperty::LaserOnOffPattern(value) => (
                OBPropertyID::LaserOnOffPatternInt,
                PropertyValue::Int(value),
            ),
            DeviceProperty::DepthUnitFlexibleAdjustment(value) => (
                OBPropertyID::DepthUnitFlexibleAdjustmentFloat,
                PropertyValue::Float(value),
            ),
            DeviceProperty::LaserControl(value) => {
                (OBPropertyID::LaserControlInt, PropertyValue::Int(value))
            }
            DeviceProperty::IRBrightness(value) => {
                (OBPropertyID::IRBrightnessInt, PropertyValue::Int(value))
            }
            DeviceProperty::SlaveDeviceSyncStatus(value) => (
                OBPropertyID::SlaveDeviceSyncStatusBool,
                PropertyValue::Bool(value),
            ),
            DeviceProperty::ColorAEMaxExposure(value) => (
                OBPropertyID::ColorAEMaxExposureInt,
                PropertyValue::Int(value),
            ),
            DeviceProperty::IRAEMaxExposure(value) => {
                (OBPropertyID::IRAEMaxExposureInt, PropertyValue::Int(value))
            }
            DeviceProperty::DispSearchRangeMode(value) => (
                OBPropertyID::DispSearchRangeModeInt,
                PropertyValue::Int(value),
            ),
            DeviceProperty::LaserHighTemperatureProtect(value) => (
                OBPropertyID::LaserHighTemperatureProtectBool,
                PropertyValue::Bool(value),
            ),
            DeviceProperty::LowExposureLaserControl(value) => (
                OBPropertyID::LowExposureLaserControlBool,
                PropertyValue::Bool(value),
            ),
            DeviceProperty::CheckPPSSyncInSignal(value) => (
                OBPropertyID::CheckPPSSyncInSignalBool,
                PropertyValue::Bool(value),
            ),
            DeviceProperty::DispSearchOffset(value) => {
                (OBPropertyID::DispSearchOffsetInt, PropertyValue::Int(value))
            }
            DeviceProperty::DeviceRepower(value) => {
                (OBPropertyID::DeviceRepowerBool, PropertyValue::Bool(value))
            }
            DeviceProperty::FrameInterleaveConfigIndex(value) => (
                OBPropertyID::FrameInterleaveConfigIndexInt,
                PropertyValue::Int(value),
            ),
            DeviceProperty::FrameInterleaveEnable(value) => (
                OBPropertyID::FrameInterleaveEnableBool,
                PropertyValue::Bool(value),
            ),
            DeviceProperty::FrameInterleaveLaserPatternSyncDelay(value) => (
                OBPropertyID::FrameInterleaveLaserPatternSyncDelayInt,
                PropertyValue::Int(value),
            ),
            DeviceProperty::OnChipCalibrationHealthCheck(value) => (
                OBPropertyID::OnChipCalibrationHealthCheckFloat,
                PropertyValue::Float(value),
            ),
            DeviceProperty::OnChipCalibrationEnable(value) => (
                OBPropertyID::OnChipCalibrationEnableBool,
                PropertyValue::Bool(value),
            ),
            DeviceProperty::HWNoiseRemoveFilterEnable(value) => (
                OBPropertyID::HWNoiseRemoveFilterEnableBool,
                PropertyValue::Bool(value),
            ),
            DeviceProperty::HWNoiseRemoveFilterThreshold(value) => (
                OBPropertyID::HWNoiseRemoveFilterThresholdFloat,
                PropertyValue::Float(value),
            ),
            DeviceProperty::DeviceAutoCaptureEnable(value) => (
                OBPropertyID::DeviceAutoCaptureEnableBool,
                PropertyValue::Bool(value),
            ),
            DeviceProperty::DeviceAutoCaptureIntervalTime(value) => (
                OBPropertyID::DeviceAutoCaptureIntervalTimeInt,
                PropertyValue::Int(value),
            ),
            DeviceProperty::DevicePTPClockSyncEnable(value) => (
                OBPropertyID::DevicePTPClockSyncEnableBool,
                PropertyValue::Bool(value),
            ),
            DeviceProperty::DepthWithConfidenceStreamEnable(value) => (
                OBPropertyID::DepthWithConfidenceStreamEnableBool,
                PropertyValue::Bool(value),
            ),
            DeviceProperty::ConfidenceStreamFilter(value) => (
                OBPropertyID::ConfidenceStreamFilterBool,
                PropertyValue::Bool(value),
            ),
            DeviceProperty::ConfidenceStreamFilterThreshold(value) => (
                OBPropertyID::ConfidenceStreamFilterThresholdInt,
                PropertyValue::Int(value),
            ),
            DeviceProperty::ConfidenceMirror(value) => (
                OBPropertyID::ConfidenceMirrorBool,
                PropertyValue::Bool(value),
            ),
            DeviceProperty::ConfidenceFlip(value) => {
                (OBPropertyID::ConfidenceFlipBool, PropertyValue::Bool(value))
            }
            DeviceProperty::ConfidenceRotate(value) => {
                (OBPropertyID::ConfidenceRotateInt, PropertyValue::Int(value))
            }
            DeviceProperty::ColorAutoExposure(value) => (
                OBPropertyID::ColorAutoExposureBool,
                PropertyValue::Bool(value),
            ),
            DeviceProperty::ColorExposure(value) => {
                (OBPropertyID::ColorExposureInt, PropertyValue::Int(value))
            }
            DeviceProperty::ColorGain(value) => {
                (OBPropertyID::ColorGainInt, PropertyValue::Int(value))
            }
            DeviceProperty::ColorAutoWhiteBalance(value) => (
                OBPropertyID::ColorAutoWhiteBalanceBool,
                PropertyValue::Bool(value),
            ),
            DeviceProperty::ColorWhiteBalance(value) => (
                OBPropertyID::ColorWhiteBalanceInt,
                PropertyValue::Int(value),
            ),
            DeviceProperty::ColorBrightness(value) => {
                (OBPropertyID::ColorBrightnessInt, PropertyValue::Int(value))
            }
            DeviceProperty::ColorSharpness(value) => {
                (OBPropertyID::ColorSharpnessInt, PropertyValue::Int(value))
            }
            DeviceProperty::ColorShutter(value) => {
                (OBPropertyID::ColorShutterInt, PropertyValue::Int(value))
            }
            DeviceProperty::ColorSaturation(value) => {
                (OBPropertyID::ColorSaturationInt, PropertyValue::Int(value))
            }
            DeviceProperty::ColorContrast(value) => {
                (OBPropertyID::ColorContrastInt, PropertyValue::Int(value))
            }
            DeviceProperty::ColorGamma(value) => {
                (OBPropertyID::ColorGammaInt, PropertyValue::Int(value))
            }
            DeviceProperty::ColorRoll(value) => {
                (OBPropertyID::ColorRollInt, PropertyValue::Int(value))
            }
            DeviceProperty::ColorAutoExposurePriority(value) => (
                OBPropertyID::ColorAutoExposurePriorityInt,
                PropertyValue::Int(value),
            ),
            DeviceProperty::ColorBacklightCompensation(value) => (
                OBPropertyID::ColorBacklightCompensationInt,
                PropertyValue::Int(value),
            ),
            DeviceProperty::ColorHue(value) => {
                (OBPropertyID::ColorHueInt, PropertyValue::Int(value))
            }
            DeviceProperty::ColorPowerLineFrequency(value) => (
                OBPropertyID::ColorPowerLineFrequencyInt,
                PropertyValue::Int(value),
            ),
            DeviceProperty::DepthAutoExposure(value) => (
                OBPropertyID::DepthAutoExposureBool,
                PropertyValue::Bool(value),
            ),
            DeviceProperty::DepthExposure(value) => {
                (OBPropertyID::DepthExposureInt, PropertyValue::Int(value))
            }
            DeviceProperty::DepthGain(value) => {
                (OBPropertyID::DepthGainInt, PropertyValue::Int(value))
            }
            DeviceProperty::IRAutoExposure(value) => {
                (OBPropertyID::IRAutoExposureBool, PropertyValue::Bool(value))
            }
            DeviceProperty::IRExposure(value) => {
                (OBPropertyID::IRExposureInt, PropertyValue::Int(value))
            }
            DeviceProperty::IRGain(value) => (OBPropertyID::IRGainInt, PropertyValue::Int(value)),
            DeviceProperty::IRChannelDataSource(value) => (
                OBPropertyID::IRChannelDataSourceInt,
                PropertyValue::Int(value),
            ),
            DeviceProperty::DepthRMFilter(value) => {
                (OBPropertyID::DepthRMFilterBool, PropertyValue::Bool(value))
            }
            DeviceProperty::ColorMaximalGain(value) => {
                (OBPropertyID::ColorMaximalGainInt, PropertyValue::Int(value))
            }
            DeviceProperty::ColorMaximalShutter(value) => (
                OBPropertyID::ColorMaximalShutterInt,
                PropertyValue::Int(value),
            ),
            DeviceProperty::IRShortExposure(value) => (
                OBPropertyID::IRShortExposureBool,
                PropertyValue::Bool(value),
            ),
            DeviceProperty::ColorHDR(value) => {
                (OBPropertyID::ColorHDRBool, PropertyValue::Bool(value))
            }
            DeviceProperty::IRLongExposure(value) => {
                (OBPropertyID::IRLongExposureBool, PropertyValue::Bool(value))
            }
            DeviceProperty::SkipFrame(value) => {
                (OBPropertyID::SkipFrameBool, PropertyValue::Bool(value))
            }
            DeviceProperty::HDRMerge(value) => {
                (OBPropertyID::HDRMergeBool, PropertyValue::Bool(value))
            }
            DeviceProperty::ColorFocus(value) => {
                (OBPropertyID::ColorFocusInt, PropertyValue::Int(value))
            }
            DeviceProperty::IRRectify(value) => {
                (OBPropertyID::IRRectifyBool, PropertyValue::Bool(value))
            }
            DeviceProperty::DepthAutoExposurePriority(value) => (
                OBPropertyID::DepthAutoExposurePriorityInt,
                PropertyValue::Int(value),
            ),
            DeviceProperty::SDKDisparityToDepth(value) => (
                OBPropertyID::SDKDisparityToDepthBool,
                PropertyValue::Bool(value),
            ),
            DeviceProperty::SDKDepthFrameUnpack(value) => (
                OBPropertyID::SDKDepthFrameUnpackBool,
                PropertyValue::Bool(value),
            ),
            DeviceProperty::SDKIRFrameUnpack(value) => (
                OBPropertyID::SDKIRFrameUnpackBool,
                PropertyValue::Bool(value),
            ),
            DeviceProperty::SDKAccelFrameTransformed(value) => (
                OBPropertyID::SDKAccelFrameTransformedBool,
                PropertyValue::Bool(value),
            ),
            DeviceProperty::SDKGyroFrameTransformed(value) => (
                OBPropertyID::SDKGyroFrameTransformedBool,
                PropertyValue::Bool(value),
            ),
            DeviceProperty::SDKIRLeftFrameUnpack(value) => (
                OBPropertyID::SDKIRLeftFrameUnpackBool,
                PropertyValue::Bool(value),
            ),
            DeviceProperty::SDKIRRightFrameUnpack(value) => (
                OBPropertyID::SDKIRRightFrameUnpackBool,
                PropertyValue::Bool(value),
            ),
            DeviceProperty::NetworkBandwidthType(value) => (
                OBPropertyID::NetworkBandwidthTypeInt,
                PropertyValue::Int(value),
            ),
            DeviceProperty::DevicePerformanceMode(value) => (
                OBPropertyID::DevicePerformanceModeInt,
                PropertyValue::Int(value),
            ),
            DeviceProperty::RawDataCameraCalibJsonFile(value) => (
                OBPropertyID::RawDataCameraCalibJsonFile,
                PropertyValue::Int(value),
            ),
            DeviceProperty::DebugESGMConfidence(value) => (
                OBPropertyID::DebugESGMConfidenceFloat,
                PropertyValue::Float(value),
            ),
        }
    }
}