AxsunOCTCapture  3.6.0.0
Captures and buffers streamed imaged data from the Axsun Ethernet/PCIe DAQ and displays or retrieves images to a client application on request.
AxsunCommonEnums.h
Go to the documentation of this file.
1 
6 #ifndef AXSUNCOMMONENUMS_H
7 #define AXSUNCOMMONENUMS_H
8 
9 #ifdef _WIN32
10  #define AXSUN_EXPORTS __declspec(dllexport)
11 #else // linux or macOS
12 #define AXSUN_EXPORTS __attribute__((visibility("default")))
13 #include <stddef.h> // for size_t on linux
14 #define __cdecl // re-define "__cdecl" to be "" for non-Windows targets
15 #endif // _WIN32
16 
17 #ifdef __cplusplus
18 #include <cstdint> // for integer typedefs
19 #else
20 #include <stdint.h> // for integer typedefs
21 #endif // __cplusplus
22 
24 typedef struct axtimeval_t {
25  int32_t tv_sec;
26  int32_t tv_usec;
28 
30 typedef enum
31 #ifdef __cplusplus
32 class
33 #endif // __cplusplus
34 AxErr {
35  NO_AxERROR = 0,
36  UNKNOWN_ERROR = -10004,
37  INVALID_ARGUMENTS = -10007,
38  CAPABILITY_NOT_SUPPORTED = -10009,
39  UNDEFINED_BOARD_TYPE = -10013,
40 
41  CAPTURE_SESSION_NOT_SETUP = -5000,
42  CAPTURE_SESSION_ALREADY_DESTROYED = -5001,
43  CAPTURE_INTERFACE_SETUP_FAILURE = -5002,
44  CAPTURE_SESSION_HANDLE_INVALID = -5003,
45  CALLBACK_NOT_REGISTERED = -5004,
46 
47  // return codes for Main Image Buffer management
48  BUFFER_UNINITIALIZED = -5020,
49  BUFFER_ALLOCATION_FAILURE = -5021,
50  BUFFER_IS_EMPTY = -5022,
51  BUFFER_BYTE_ALLIGNMENT_ERROR = -5023,
52  DATA_RATE_MEASUREMENT_FAILURE = -5024,
53  BUFFER_TOO_SMALL = -5025,
54  BUFFER_BUSY = -5026,
55 
56  // return codes for file management
57  FILE_INCORRECT_TYPE = -5040,
58  FILE_IDENTIFIER_NOT_READ = -5041,
59  FILE_OPEN_FAILURE = -5042,
60  FILE_CREATION_FAILURE = -5043,
61  FILE_WRITING_FAILURE = -5044,
62  FILE_PATHNAME_TOO_LONG = -5045,
63  NOT_ALLOWED_WHILE_IMAGING = -5046,
64  DATA_TYPE_NOT_SUPPORTED = -5047,
65  FILE_READING_FAILURE = -5048,
66 
67  // return codes for JPEG compression/decompression and BMP export
68  JPEG_LOAD_LIBRARY_FAILED = -5050,
69  JPEG_LOAD_FUNCTION_FAILED = -5051,
70  JPEG_INIT_FAILED = -5052,
71  JPEG_DECOMPRESSION_ERROR = -5053,
72  JPEG_COMPRESSION_ERROR = -5054,
73  BMP_WRITING_FAILURE = -5055,
74  OPENCV_LOAD_LIBRARY_FAILED = -5056,
75  IMAGE_EXPORT_RESOURCES_MISSING = -5057,
76 
77  // return codes for analog waveform generation control (axScanCmd() and related functions)
78  DAQMX_LOAD_LIBRARY_FAILED = -9000,
79  DAQMX_LOAD_FUNCTION_FAILED = -9001,
80  DAQMX_GET_INFO_FAILED = -9002,
81  DAQMX_RESET_FAILED = -9003,
82  DAQMX_TASK_CREATION_FAILED = -9004,
83  DAQMX_CONFIGURATION_FAILED = -9005,
84  DAQMX_INVALID_SCAN_PARAMS = -9006,
85  DAQMX_MAX_VOLTAGE_EXCEEDED = -9007,
86  //RFU1 = -9008,
87  DAQMX_COMMAND_DEPRECATED = -9009,
88  DAQMX_BURST_RASTER_NOT_SETUP = -9010,
89  DAQMX_COMMAND_NOT_RECOGNIZED = -9011,
90  DAQMX_WAIT_TIMEOUT = -9012,
91  DAQMX_MUTEX_TIMEOUT = -9013,
92  DAQMX_UNSUPPORTED_DEVICE = -9014,
93  DAQMX_DEVICE_NOT_FOUND = -9015,
94  DAQMX_ALREADY_DESTROYED = -9016,
95 
96  // return codes for OpenGL display (axSetupDisplay() and related functions)
97  RENDER_MODULE_HANDLE_UNAVAILABLE = -8000,
98  RENDER_WINDOW_CLASS_REGISTRATION_FAILED = -8001,
99  RENDER_WINDOW_CREATION_FAILED = -8002,
100  RENDER_DEVICE_CONTEXT_CREATION_FAILED = -8003,
101  RENDER_PIXEL_SETUP_FAILED = -8004,
102  RENDER_CONTEXT_CREATION_FAILED = -8005,
103  RENDER_GLEW_INIT_FAILED = -8006,
104  RENDER_CONTEXT_CURRENT_FAILURE = -8007,
105  RENDER_OPENGL_VERSION_UNSUPPORTED = -8008,
106  RENDER_SHADER_PROGRAM_FAILED = -8009,
107  RENDER_WAITING_FOR_THREAD = -8010,
108  RENDER_THREAD_NOT_RESPONDING = -8011,
109  RENDER_OPENGL_FUNCTION_ERROR = -8012,
110  RENDER_FUNCTIONS_NOT_SETUP = -8013,
111  RENDER_WINDOW_MOVE_FAILED = -8014,
112  RENDER_WINDOW_STYLE_FAILED = -8015,
113  RENDER_WINDOW_NOT_SETUP = -8016,
114 
115  // return codes for Ethernet packet capture
116  PCAP_LOAD_LIBRARY_FAILED = -7000,
117  PCAP_LOAD_FUNCTION_FAILED = -7001,
118  PCAP_NO_DEVICES_FOUND = -7002,
119  PCAP_INTERNAL_ERROR = -7003,
120  PCAP_DEVICE_OPEN_FAILURE = -7004,
121  PCAP_DEVICE_SETUP_FAILURE = -7005,
122 
123  // return codes for PCIe packet capture
124  PCIE_LOAD_LIBRARY_FAILED = -7020,
125  PCIE_LOAD_FUNCTION_FAILED = -7021,
126  PCIE_INTERFACE_NOT_SETUP = -7022,
127  PCIE_DEVICE_SETUP_FAILURE = -7023,
128  PCIE_DRIVER_SETUP_FAILURE = -7024,
129  PCIE_DAQ_NOT_INSTALLED = -7025,
130  PCIE_DAQ_INFO_UNAVAILABLE = -7026,
131  PCIE_DEVICE_OPEN_FAILURE = -7027,
132  PCIE_BUFFER_LOCK_FAILURE = -7028,
133  PCIE_WRITE_REGISTER_FAILURE = -7029,
134  PCIE_READ_REGISTER_FAILURE = -7030,
135  PCIE_SYNC_IO_FAILURE = -7031,
136  PCIE_INTERRUPT_ENABLE_FAILURE = -7032,
137  AQDAQ_LOAD_LIBRARY_FAILED = -7033,
138  AQDAQ_LOAD_FUNCTION_FAILED = -7034,
139  AQDAQ_FUNCTION_ERROR = -7035,
140  AQDAQ_NO_IMAGE_AVAILABLE = -7036,
141 
142  // return codes for image/frame/packet request functions
143  DATA_INDEX_INVALID = -9991,
144  DATA_NOT_COMPRESSED = -9992,
145  DATA_TYPE_OR_LENGTH_CHANGED = -9993,
146  DATA_ALLOCATION_TOO_SMALL = -9994,
147  DATA_INCOMPLETE_OR_MISSING = -9996,
148  DATA_RETURNED_IN_PREVIOUS_REQUEST = -9997,
149  DATA_NOT_FOUND_IN_BUFFER = -9999,
150 
151  UNINITIALIZED = -10001,
152  CANCELLED_BY_USER = -10002,
153  COMMAND_NOT_IMPLEMENTED = -10003,
154  ALREADY_INITIALIZED = -10005,
155  INSUFFICIENT_ALLOCATION = -10006,
156  DATA_VALIDATION_FAILED = -10008,
157  COMMUNICATION_ERROR = -10010,
158 
159  COMMAND_NOT_RECOGNIZED = -55,
160  USB_CHECKSUM_ERROR = -104,
161  PAYLOAD_CHECKSUM_ERROR = -108,
162  CANNOT_START_TEC_IN_ERROR = -126,
163  INVALID_CONFIG_PARAMS = -138,
164  CONFIG_NOT_SETUP = -140,
165 
166  USB_READ_ERROR = -1000,
167  USB_WRITE_ERROR = -1001,
168  NO_DEVICE_PRESENT = -1002,
169 
170  TCP_READ_ERROR = -1020,
171  TCP_WRITE_ERROR = -1021,
172  TCP_CONNECT_ERROR = -1022,
173 
174  SERIAL_READ_ERROR = -1025,
175  SERIAL_WRITE_ERROR = -10250,
176 
177  DATA_SIZE_TOO_BIG = -1029,
178  HOSTSIDE_USB_ERROR = -1033,
179  USB_COMMUNICATION_ERROR = -1038,
180  MUTEX_TIMEOUT = -1039,
181  DAC_TABLE_NOT_LOADED = -1048,
182  USB_LOAD_LIBRARY_FAILED = -10011,
183  USB_LOAD_FUNCTION_FAILED = -10012
184 
186 
187 
189 typedef enum
190 #ifdef __cplusplus
191 class
192 #endif // __cplusplus
194  UNKNOWN = 0,
195  RAW_ADC = 1,
196  WINDOWED = 2,
197  IFFT = 3,
199  SQRT = 5,
200  LOG = 6,
201  EIGHT_BIT = 7,
202  JPEG_COMP = 8,
203  PIPELINEMODE_RFU = 9
205 
207 typedef enum
208 #ifdef __cplusplus
209 class
210 #endif // __cplusplus
212  CHAN_1 = 0,
213  CHAN_2 = 1,
216  CHANNELMODE_RFU = 4
218 
220 typedef enum
221 #ifdef __cplusplus
222 class
223 #endif // __cplusplus
224 AxDataType {
226  U8,
248 
249 
250 #endif //AXSUNCOMMONENUMS_H include guard
axtimeval_t
Structure for packet time stamp with platform-independent size (for internal use.)
Definition: AxsunCommonEnums.h:24
CHANNELMODE_RFU
@ CHANNELMODE_RFU
Definition: AxsunCommonEnums.h:216
RAW_ADC
@ RAW_ADC
Definition: AxsunCommonEnums.h:195
IFFT
@ IFFT
Definition: AxsunCommonEnums.h:197
CHAN_1
@ CHAN_1
Definition: AxsunCommonEnums.h:212
SQRT
@ SQRT
Definition: AxsunCommonEnums.h:199
U8
@ U8
Definition: AxsunCommonEnums.h:226
EIGHT_BIT
@ EIGHT_BIT
Definition: AxsunCommonEnums.h:201
UNKNOWN
@ UNKNOWN
Definition: AxsunCommonEnums.h:194
AxChannelMode
AxChannelMode
DAQ channel selection modes.
Definition: AxsunCommonEnums.h:211
SUM_CHANNELS
@ SUM_CHANNELS
Definition: AxsunCommonEnums.h:214
PIPELINEMODE_RFU
@ PIPELINEMODE_RFU
Definition: AxsunCommonEnums.h:203
INTERLEAVE_CHANNELS
@ INTERLEAVE_CHANNELS
Definition: AxsunCommonEnums.h:215
LOG
@ LOG
Definition: AxsunCommonEnums.h:200
I16_le
@ I16_le
Definition: AxsunCommonEnums.h:242
I16
@ I16
Definition: AxsunCommonEnums.h:234
WINDOWED
@ WINDOWED
Definition: AxsunCommonEnums.h:196
CHAN_2
@ CHAN_2
Definition: AxsunCommonEnums.h:213
AxPipelineMode
AxPipelineMode
DAQ pipeline modes.
Definition: AxsunCommonEnums.h:193
CMPLX
@ CMPLX
Definition: AxsunCommonEnums.h:232
I32_le
@ I32_le
Definition: AxsunCommonEnums.h:244
U32
@ U32
Definition: AxsunCommonEnums.h:230
U16_le
@ U16_le
Definition: AxsunCommonEnums.h:236
AxErr
AxErr
Error codes returned from AxsunOCTCapture or AxsunOCTControl_LW functions. Use axGetErrorString() in ...
Definition: AxsunCommonEnums.h:34
MOD_SQUARED
@ MOD_SQUARED
Definition: AxsunCommonEnums.h:198
axtimeval_t
struct axtimeval_t axtimeval_t
Structure for packet time stamp with platform-independent size (for internal use.)
U32_le
@ U32_le
Definition: AxsunCommonEnums.h:238
AxDataType
AxDataType
Integer data types which may be generated by the Axsun DAQ depending on selected pipeline bypass mode...
Definition: AxsunCommonEnums.h:224
CMPLX_le
@ CMPLX_le
Definition: AxsunCommonEnums.h:240
U16
@ U16
Definition: AxsunCommonEnums.h:228
JPEG_COMP
@ JPEG_COMP
Definition: AxsunCommonEnums.h:202
AXDATATYPE_RFU
@ AXDATATYPE_RFU
Definition: AxsunCommonEnums.h:246