OceanDirect  1.31.0
OceanDirect 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 /* Macros and constants */
33 #define SET_ERROR_CODE(code) do { if(NULL != errorCode) { *errorCode = code; } } while(0)
34 
35 #ifdef ERROR_SUCCESS
36 #undef ERROR_SUCCESS
37 #endif
38 
39 #define UNUSED(x) (void)(x)
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
46  extern const int ERROR_SUCCESS;
50  extern const int ERROR_INVALID_ERROR;
54  extern const int ERROR_NO_DEVICE;
58  extern const int ERROR_FAILED_TO_CLOSE;
62  extern const int ERROR_NOT_IMPLEMENTED;
66  extern const int ERROR_FEATURE_NOT_FOUND;
70  extern const int ERROR_TRANSFER_ERROR;
74  extern const int ERROR_BAD_USER_BUFFER;
78  extern const int ERROR_INPUT_OUT_OF_BOUNDS;
82  extern const int ERROR_SPECTROMETER_SATURATED;
86  extern const int ERROR_VALUE_NOT_FOUND;
90  extern const int ERROR_CODE_DIVIDE_BY_ZERO;
94  extern const int ERROR_CODE_NONINVERTIBLE_MATRIX;
98  extern const int ERROR_CODE_ARRAY_LENGTH;
102  extern const int ERROR_CODE_ARRAY_INDEX_OUT_OF_BOUNDS;
106  extern const int ERROR_CODE_INVALID_ARGUMENT;
110  extern const int ERROR_CODE_EMPTY_VECTOR;
114  extern const int ERROR_CODE_COLOR_CONVERSION_ERROR;
118  extern const int ERROR_CODE_NO_PEAK_FOUND_ERROR;
122  extern const int ERROR_CODE_ILLEGAL_STATE_ERROR;
127  extern const int ERROR_CODE_MIN_INT_TIME_REACHED;
132  extern const int ERROR_CODE_MAX_INT_TIME_REACHED;
137  extern const int ERROR_ENSURE_LAMP_IS_ON;
142  extern const int ERROR_NOT_ENOUGH_BUFFER_SPACE;
147  extern const int ERROR_COMMAND_NOT_SUPPORTED;
148 
156  extern const int ERROR_INTEGRATION_TIME_BELOW_AVERAGING_MIN;
157 
164  extern const int ERROR_DARK_NONLINEARITY_CORRECTION_CONFLICT;
165 #ifdef __cplusplus
166 }
167 #endif
168 
169 /* When a new error code is added here, make sure to
170 also add a corresponding string to OceanDirectApi.cpp
171 static const char *error_msgs[]
172 */
173 #endif /* OCEANDIRECTAPICONSTANTS_H */