OceanDirectLighthouseC++  3.1.1
OceanDirect Lighthouse C++/C API
OceanDirectAPIConstants.h
1 /*****************************************************
2  * @file OceanDirectAPIConstants.h
3  * @date January 2018
4  * @author Ocean Optics, Inc.
5  *
6  * This file defines constants for use with OceanDirect API
7  * implementations.
8  */
9  /************************************************************************
10  *
11  * OCEAN INSIGHT CONFIDENTIAL
12  * __________________
13  *
14  * [2018] - [2020] Ocean Insight Incorporated
15  * All Rights Reserved.
16  *
17  * NOTICE: All information contained herein is, and remains
18  * the property of Ocean Insight Incorporated and its suppliers,
19  * if any. The intellectual and technical concepts contained
20  * herein are proprietary to Ocean Insight Incorporated
21  * and its suppliers and may be covered by U.S. and Foreign Patents,
22  * patents in process, and are protected by trade secret or copyright law.
23  * Dissemination of this information or reproduction of this material
24  * is strictly forbidden unless prior written permission is obtained
25  * from Ocean Insight Incorporated.
26  *
27  **************************************************************************/
28 
29 #ifndef OCEANDIRECTAPICONSTANTS_H
30 #define OCEANDIRECTAPICONSTANTS_H
31 
32 #include "api/DllDecl.h"
33 
34 /* Macros and constants */
35 #define SET_ERROR_CODE(code) do { if(NULL != errorCode) { *errorCode = code; } } while(0)
36 
37 #ifdef ERROR_SUCCESS
38 #undef ERROR_SUCCESS
39 #endif
40 
41 #define UNUSED(x) (void)(x)
42 #ifdef __cplusplus
43 //extern "C" {
44 #endif
48  DLL_DECL extern const int ERROR_SUCCESS;
52  DLL_DECL extern const int ERROR_INVALID_ERROR;
56  extern DLL_DECL const int ERROR_NO_DEVICE;
60  DLL_DECL extern const int ERROR_FAILED_TO_CLOSE;
64  DLL_DECL extern const int ERROR_NOT_IMPLEMENTED;
68  DLL_DECL extern const int ERROR_FEATURE_NOT_FOUND;
72  DLL_DECL extern const int ERROR_TRANSFER_ERROR;
76  DLL_DECL extern const int ERROR_BAD_USER_BUFFER;
80  DLL_DECL extern const int ERROR_INPUT_OUT_OF_BOUNDS;
84  DLL_DECL extern const int ERROR_SPECTROMETER_SATURATED;
88  DLL_DECL extern const int ERROR_VALUE_NOT_FOUND;
92  DLL_DECL extern const int ERROR_CODE_DIVIDE_BY_ZERO;
96  DLL_DECL extern const int ERROR_CODE_NONINVERTIBLE_MATRIX;
100  DLL_DECL extern const int ERROR_CODE_ARRAY_LENGTH;
104  DLL_DECL extern const int ERROR_CODE_ARRAY_INDEX_OUT_OF_BOUNDS;
108  DLL_DECL extern const int ERROR_CODE_INVALID_ARGUMENT;
112  DLL_DECL extern const int ERROR_CODE_EMPTY_VECTOR;
116  DLL_DECL extern const int ERROR_CODE_COLOR_CONVERSION_ERROR;
120  DLL_DECL extern const int ERROR_CODE_NO_PEAK_FOUND_ERROR;
124  DLL_DECL extern const int ERROR_CODE_ILLEGAL_STATE_ERROR;
129  DLL_DECL extern const int ERROR_CODE_MIN_INT_TIME_REACHED;
134  DLL_DECL extern const int ERROR_CODE_MAX_INT_TIME_REACHED;
139  DLL_DECL extern const int ERROR_ENSURE_LAMP_IS_ON;
144  DLL_DECL extern const int ERROR_NOT_ENOUGH_BUFFER_SPACE;
149  DLL_DECL extern const int ERROR_COMMAND_NOT_SUPPORTED;
150 
158  DLL_DECL extern const int ERROR_INTEGRATION_TIME_BELOW_AVERAGING_MIN;
159 
166  DLL_DECL extern const int ERROR_DARK_NONLINEARITY_CORRECTION_CONFLICT;
167 #ifdef __cplusplus
168 //}
169 #endif
170 
171 /* When a new error code is added here, make sure to
172 also add a corresponding string to OceanDirectApi.cpp
173 static const char *error_msgs[]
174 */
175 #endif /* OCEANDIRECTAPICONSTANTS_H */