MYNT EYE D SDK  1.7.1
http://www.myntai.com/mynteye/depth
types.h
1 // Copyright 2018 Slightech Co., Ltd. All rights reserved.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 #ifndef MYNTEYE_TYPES_H_
15 #define MYNTEYE_TYPES_H_
16 #pragma once
17 
18 #include <cstdint>
19 
20 #include "mynteyed/device/types.h"
21 #include "mynteyed/types_data.h"
22 
23 MYNTEYE_BEGIN_NAMESPACE
24 
29 enum class ErrorCode : std::int32_t {
31  SUCCESS = 0,
33  ERROR_FAILURE,
38  ERROR_FILE_OPEN_FAILED,
40  ERROR_CAMERA_OPEN_FAILED,
42  ERROR_CAMERA_NOT_OPENED,
44  ERROR_CAMERA_RETRIEVE_FAILED,
46  ERROR_IMU_OPEN_FAILED,
48  ERROR_IMU_RECV_TIMEOUT,
50  ERROR_IMU_DATA_ERROR,
52  ERROR_CODE_LAST
53 };
54 
59 enum class Descriptor : std::int32_t {
61  DEVICE_NAME,
63  SERIAL_NUMBER,
65  FIRMWARE_VERSION,
67  HARDWARE_VERSION,
69  SPEC_VERSION,
71  LENS_TYPE,
73  IMU_TYPE,
75  NOMINAL_BASELINE,
77  DESC_LAST
78 };
79 
84 enum class ProcessMode : std::int32_t {
85  PROC_NONE = 0,
86  PROC_IMU_ASSEMBLY = 1,
87  PROC_IMU_TEMP_DRIFT = 2,
88  PROC_IMU_ALL = PROC_IMU_ASSEMBLY | PROC_IMU_TEMP_DRIFT
89 };
90 
91 inline
92 std::int32_t operator&(const std::int32_t& lhs, const ProcessMode& rhs) {
93  return lhs & static_cast<std::int32_t>(rhs);
94 }
95 inline
96 std::int32_t operator&(const ProcessMode& lhs, const std::int32_t& rhs) {
97  return static_cast<std::int32_t>(lhs) & rhs;
98 }
99 inline
100 std::int32_t operator&(const ProcessMode& lhs, const ProcessMode& rhs) {
101  return static_cast<std::int32_t>(lhs) & static_cast<std::int32_t>(rhs);
102 }
103 
104 MYNTEYE_END_NAMESPACE
105 
106 #endif // MYNTEYE_TYPES_H_