AxsunOCTControl_LW 0.9.7.0
A light-weight & cross-platform alternative to the .NET-based AxsunOCTControl.dll.
AxsunOCTControl_LW_C.h
Go to the documentation of this file.
1// AxsunOCTControl_LW_C.h
2// Copyright 2020 Axsun Technologies
3
10#ifndef AXSUNOCTCONTROLLW_C_H
11#define AXSUNOCTCONTROLLW_C_H
12
13#include "AxsunCommonEnums.h"
14
15#ifdef LabVIEW_CALLBACK
16#include "extcode.h" // only required for LabVIEW callback integration
17#endif
18
19#ifdef __cplusplus
20#include <cstdint>
21extern "C" {
22#else
23#include <stdint.h>
24#endif // __cplusplus
25
27typedef enum {
30 LVDS = 2,
31 LVCMOS = 3,
33
34typedef enum {
35 NONE = 0,
36 USB = 1,
38 RS232 = 3,
39 ETHERNET = 4
41
42typedef enum {
43 UNDEFINED = 0,
44 LASER = 40,
45 CLDAQ = 41,
46 EDAQ = 42
48
50typedef enum {
54 READY = 3,
59
61typedef void(__cdecl *AxConnectCallbackFunctionC_t)(void*);
62 AXSUN_EXPORTS
70void axGetErrorExplained(AxErr errornum, char* error_string);
71 AXSUN_EXPORTS
81AxErr axOpenAxsunOCTControl(uint32_t open_all_interfaces);
82 AXSUN_EXPORTS
88 AXSUN_EXPORTS
96AxErr axNetworkInterfaceOpen(uint32_t interface_status);
97 AXSUN_EXPORTS
105AxErr axUSBInterfaceOpen(uint32_t interface_status);
106 AXSUN_EXPORTS
115AxErr axSerialInterfaceOpen(uint32_t interface_status, char* port);
116 AXSUN_EXPORTS
125AxErr axImagingCntrlEthernet(int16_t number_of_images, uint32_t which_DAQ);
126 AXSUN_EXPORTS
136AxErr axSetImageSyncSource(AxEdgeSource source, float frequency, uint32_t which_DAQ);
137 AXSUN_EXPORTS
146AxErr axSetSampleClockSource(AxEdgeSource source, uint32_t which_DAQ);
147 AXSUN_EXPORTS
156AxErr axSetSweepTriggerSource(AxEdgeSource source, uint32_t which_DAQ);
157 AXSUN_EXPORTS
167AxErr axSetPipelineMode(AxPipelineMode pipeline_mode, AxChannelMode polarization_mode, uint32_t which_DAQ);
168 AXSUN_EXPORTS
176AxErr axSetEightBitGain(float gain, uint32_t which_DAQ);
177 AXSUN_EXPORTS
185AxErr axSetEightBitOffset(float offset, uint32_t which_DAQ);
186 AXSUN_EXPORTS
194AxErr axSetSubsamplingFactor(uint8_t subsampling_factor, uint32_t which_DAQ);
195 AXSUN_EXPORTS
204AxErr axGetFPGARegister(const uint32_t regnum, uint16_t* regval, uint32_t which_DAQ);
205 AXSUN_EXPORTS
217AxErr axGetFPGARegisterRange(const uint32_t start_regnum, const uint32_t end_regnum, uint16_t* regvals, const uint32_t bytes_allocated, uint32_t which_DAQ);
218
219 AXSUN_EXPORTS
231AxErr axGetFPGARegisterDefaults(uint32_t elements_allocated, uint16_t* regnums, uint16_t* regvals, uint32_t* elements_returned, uint32_t which_DAQ);
232
233 AXSUN_EXPORTS
244AxErr axSetFPGARegisterDefaults(const uint16_t* regnums, const uint16_t* regvals, const uint32_t count, uint32_t which_DAQ);
245 AXSUN_EXPORTS
254AxErr axSetFPGARegister(const uint32_t regnum, const uint16_t regval, uint32_t which_DAQ);
255 AXSUN_EXPORTS
265AxErr axSetFPGARegisterSingleBit(const uint32_t regnum, const uint32_t bitnum, const uint32_t value, uint32_t which_DAQ);
266 AXSUN_EXPORTS
276AxErr axSetFPGADataArray(const uint32_t regnum, const uint16_t* data_array, const uint32_t number_of_words, uint32_t which_DAQ);
277 AXSUN_EXPORTS
287AxErr axReadDAQPHYRegister(uint32_t phynum, uint32_t regnum, uint16_t* regval, uint32_t which_DAQ);
288 AXSUN_EXPORTS
297AxErr axConnectionHeartbeat(uint32_t heartbeat_state, uint32_t which_device);
298 AXSUN_EXPORTS
310AxErr axDebugCommand(uint32_t command_number, uint32_t value_out, uint32_t* command_in, uint32_t* value_in, uint32_t which_device);
311 AXSUN_EXPORTS
321AxErr axFirmwareVersion(uint32_t* major, uint32_t* minor, uint32_t* patch, uint32_t which_device);
322 AXSUN_EXPORTS
334AxErr axFPGAVersion(uint32_t* major, uint32_t* minor, uint32_t* patch, uint32_t* build, uint32_t which_device);
335 AXSUN_EXPORTS
345AxErr axLibraryVersion(uint32_t* major, uint32_t* minor, uint32_t* patch, uint32_t* build);
346 AXSUN_EXPORTS
354AxErr axDeviceType(AxDevType * device_type, uint32_t which_device);
355 AXSUN_EXPORTS
363AxErr axSerialNumber(char * serial_number, uint32_t which_device);
364 AXSUN_EXPORTS
372AxErr axConnectionType(AxConnectionType * connection_type, uint32_t which_device);
373 AXSUN_EXPORTS
383AxErr axCountDeviceSettings(uint32_t* float_count, uint32_t* int_count, uint32_t* bool_count, uint32_t which_device);
384 AXSUN_EXPORTS
395AxErr axGetFloatSetting(uint32_t which_setting, float* setting_value, char * setting_string, uint32_t which_device);
396 AXSUN_EXPORTS
407AxErr axGetIntSetting(uint32_t which_setting, int32_t* setting_value, char * setting_string, uint32_t which_device);
408 AXSUN_EXPORTS
419AxErr axGetBoolSetting(uint32_t which_setting, uint8_t* setting_value, char * setting_string, uint32_t which_device);
420 AXSUN_EXPORTS
434AxErr axSettingsToDevice(uint32_t float_count, uint32_t int_count, uint32_t bool_count, float* float_values, int32_t* int_values, uint8_t* bool_values, uint32_t which_device);
435 AXSUN_EXPORTS
443 AXSUN_EXPORTS
451AxErr axSetLaserEmission(uint32_t emission_state, uint32_t which_laser);
452 AXSUN_EXPORTS
459AxErr axGetLaserEmission(uint32_t* emitting, uint32_t which_laser);
460 AXSUN_EXPORTS
468AxErr axSetPointerEmission(uint32_t emission_state, uint32_t which_laser);
469 AXSUN_EXPORTS
476AxErr axGetPointerEmission(uint32_t* emitting, uint32_t which_laser);
477 AXSUN_EXPORTS
486AxErr axSetClockDelay(uint32_t delay_code, uint32_t which_laser);
487 AXSUN_EXPORTS
495AxErr axGetClockDelay(uint32_t* delay_code, uint32_t which_laser);
496 AXSUN_EXPORTS
504AxErr axHomeVDL(uint32_t which_laser);
505 AXSUN_EXPORTS
512AxErr axStopVDL(uint32_t which_laser);
513 AXSUN_EXPORTS
522AxErr axMoveRelVDL(float rel_position, float speed, uint32_t which_laser);
523 AXSUN_EXPORTS
532AxErr axMoveAbsVDL(float abs_position, float speed, uint32_t which_laser);
533 AXSUN_EXPORTS
556AxErr axGetVDLStatus(float* current_pos, float* target_pos, float* speed,
557 int32_t* error_from_last_home, uint32_t* last_move_time,
558 uint8_t* state, uint8_t* home_switch, uint8_t* limit_switch, uint8_t* VDL_error, uint32_t which_laser);
559 AXSUN_EXPORTS
569AxErr axGetTECState(AxTECState* TEC_state, uint32_t which_TEC, uint32_t which_laser);
570 AXSUN_EXPORTS
586AxErr axSetDACTable(uint32_t points, uint32_t speed, uint32_t timer1time, uint32_t timer2time,
587 uint32_t timer1duration, uint32_t timer2duration, uint16_t* volts_currents, uint32_t which_laser);
588 AXSUN_EXPORTS
604AxErr axGetDACTable(uint32_t* points, uint32_t* speed, uint32_t* timer1time, uint32_t* timer2time,
605 uint32_t* timer1duration, uint32_t* timer2duration, uint16_t* volts_currents, uint32_t which_laser);
606 AXSUN_EXPORTS
615AxErr axSetDriveConfiguration(uint32_t which_config, uint32_t which_laser);
616 AXSUN_EXPORTS
625AxErr axGetDriveConfiguration(uint32_t * current_configuration, uint32_t which_laser);
626 AXSUN_EXPORTS
636
637#ifdef LabVIEW_CALLBACK AXSUN_EXPORTS
645AxErr axRegisterLabVIEWCallback(LVUserEventRef* refnumptr);
646#endif
647
648#ifdef __cplusplus
649} // end extern "C"
650#endif // __cplusplus
651
652#endif /* End header include guard */
653
This header file contains enums and other definitions for integrating AxsunOCTCapture....
AxChannelMode
DAQ channel selection modes.
Definition: AxsunCommonEnums.h:217
AxPipelineMode
DAQ pipeline modes.
Definition: AxsunCommonEnums.h:199
AxErr
Error codes returned from AxsunOCTCapture or AxsunOCTControl_LW functions. Use axGetErrorString() in ...
Definition: AxsunCommonEnums.h:34
AxErr axGetIntSetting(uint32_t which_setting, int32_t *setting_value, char *setting_string, uint32_t which_device)
Gets a integer setting's value and name string.
AxErr axSerialInterfaceOpen(uint32_t interface_status, char *port)
Opens, resets, or closes a RS-232 serial interface on a given port.
AxErr axSetEightBitOffset(float offset, uint32_t which_DAQ)
Set the OFFSET term during 16- to 8-bit dynamic range compression.
AxErr axGetFPGARegisterRange(const uint32_t start_regnum, const uint32_t end_regnum, uint16_t *regvals, const uint32_t bytes_allocated, uint32_t which_DAQ)
Gets (i.e. reads) current values in a range of FPGA registers.
AxTECState
Laser TEC states.
Definition: AxsunOCTControl_LW_C.h:50
@ ERROR_WENT_OUT_OF_RANGE
Definition: AxsunOCTControl_LW_C.h:57
@ WAITING_IN_RANGE
Definition: AxsunOCTControl_LW_C.h:53
@ READY
Definition: AxsunOCTControl_LW_C.h:54
@ WARMING_UP
Definition: AxsunOCTControl_LW_C.h:52
@ TEC_UNINITIALIZED
Definition: AxsunOCTControl_LW_C.h:51
@ ERROR_NEVER_GOT_TO_READY
Definition: AxsunOCTControl_LW_C.h:56
@ NOT_INSTALLED
Definition: AxsunOCTControl_LW_C.h:55
AxErr axSetLaserEmission(uint32_t emission_state, uint32_t which_laser)
Enables or disables swept laser emission.
AxErr axSetDACTable(uint32_t points, uint32_t speed, uint32_t timer1time, uint32_t timer2time, uint32_t timer1duration, uint32_t timer2duration, uint16_t *volts_currents, uint32_t which_laser)
Sets the DAC table.
AxErr axSetFPGARegisterDefaults(const uint16_t *regnums, const uint16_t *regvals, const uint32_t count, uint32_t which_DAQ)
Sets (i.e. writes) a power-on default FPGA register configuration script, overwriting the existing sc...
AxConnectionType
Definition: AxsunOCTControl_LW_C.h:34
@ RS232_PASSTHROUGH
Definition: AxsunOCTControl_LW_C.h:37
@ RS232
Definition: AxsunOCTControl_LW_C.h:38
@ USB
Definition: AxsunOCTControl_LW_C.h:36
@ ETHERNET
Definition: AxsunOCTControl_LW_C.h:39
AxErr axGetPointerEmission(uint32_t *emitting, uint32_t which_laser)
Gets pointer/aiminglaser emission status.
AxErr axFPGAVersion(uint32_t *major, uint32_t *minor, uint32_t *patch, uint32_t *build, uint32_t which_device)
Gets the device FPGA version.
AxErr axConnectionType(AxConnectionType *connection_type, uint32_t which_device)
Gets the device connection interface (e.g. USB, Ethernet, RS-232).
AxErr axSetSubsamplingFactor(uint8_t subsampling_factor, uint32_t which_DAQ)
Set the A-line subsampling factor.
void(__cdecl * AxConnectCallbackFunctionC_t)(void *)
Type defintion for a user-provided function to be called upon connection or disconnection of a device...
Definition: AxsunOCTControl_LW_C.h:61
AxErr axSetFPGARegister(const uint32_t regnum, const uint16_t regval, uint32_t which_DAQ)
Sets (i.e. writes) a FPGA register with a single value.
AxErr axGetVDLStatus(float *current_pos, float *target_pos, float *speed, int32_t *error_from_last_home, uint32_t *last_move_time, uint8_t *state, uint8_t *home_switch, uint8_t *limit_switch, uint8_t *VDL_error, uint32_t which_laser)
Gets the current status of the VDL.
AxDevType
Definition: AxsunOCTControl_LW_C.h:42
@ LASER
Definition: AxsunOCTControl_LW_C.h:44
@ CLDAQ
Definition: AxsunOCTControl_LW_C.h:45
@ EDAQ
Definition: AxsunOCTControl_LW_C.h:46
AxErr axSetSweepTriggerSource(AxEdgeSource source, uint32_t which_DAQ)
Select the sweep trigger source.
AxErr axNetworkInterfaceOpen(uint32_t interface_status)
Opens, resets, or closes the Ethernet network interface.
AxErr axMoveRelVDL(float rel_position, float speed, uint32_t which_laser)
Move the VDL relative to its current position.
AxErr axRegisterLabVIEWCallback(LVUserEventRef *refnumptr)
Registers a LabVIEW user event to be executed following a device connection or disconnection event.
AxErr axSetPointerEmission(uint32_t emission_state, uint32_t which_laser)
Enables or disables pointer/aiming laser emission.
AxErr axUSBInterfaceOpen(uint32_t interface_status)
Opens, resets, or closes the USB interface.
AxErr axGetFPGARegisterDefaults(uint32_t elements_allocated, uint16_t *regnums, uint16_t *regvals, uint32_t *elements_returned, uint32_t which_DAQ)
Gets (i.e. reads) the programmed power-on default FPGA register configuration script as register numb...
AxErr axSerialNumber(char *serial_number, uint32_t which_device)
Gets the device serial number string.
AxEdgeSource
DAQ clock and trigger sources.
Definition: AxsunOCTControl_LW_C.h:27
@ LVDS
Definition: AxsunOCTControl_LW_C.h:30
@ EXTERNAL
Definition: AxsunOCTControl_LW_C.h:28
@ LVCMOS
Definition: AxsunOCTControl_LW_C.h:31
@ INTERNAL
Definition: AxsunOCTControl_LW_C.h:29
AxErr axSetEightBitGain(float gain, uint32_t which_DAQ)
Set the GAIN term during 16- to 8-bit dynamic range compression.
AxErr axSetDriveConfiguration(uint32_t which_config, uint32_t which_laser)
Selects a pre-programmed laser drive configuration.
AxErr axDeviceType(AxDevType *device_type, uint32_t which_device)
Gets the device type (e.g. Laser, EDAQ).
AxErr axMoveAbsVDL(float abs_position, float speed, uint32_t which_laser)
Move the VDL to an absolute position.
AxErr axSetFPGADataArray(const uint32_t regnum, const uint16_t *data_array, const uint32_t number_of_words, uint32_t which_DAQ)
Sets (i.e. writes) a FPGA register with an array of multiple values.
AxErr axConnectionHeartbeat(uint32_t heartbeat_state, uint32_t which_device)
Disable or re-enable the Connection Heartbeat for a device connected by Ethernet network or RS-232.
AxErr axGetLaserEmission(uint32_t *emitting, uint32_t which_laser)
Gets swept laser emission status.
AxErr axGetFloatSetting(uint32_t which_setting, float *setting_value, char *setting_string, uint32_t which_device)
Gets a floating point setting's value and name string.
AxErr axSettingsToDevice(uint32_t float_count, uint32_t int_count, uint32_t bool_count, float *float_values, int32_t *int_values, uint8_t *bool_values, uint32_t which_device)
Write device settings to non-volatile memory (i.e. flash).
AxErr axHomeVDL(uint32_t which_laser)
Starts the VDL home operation.
AxErr axSetSampleClockSource(AxEdgeSource source, uint32_t which_DAQ)
Select the ADC sample clock source.
AxErr axSetImageSyncSource(AxEdgeSource source, float frequency, uint32_t which_DAQ)
Select the Image_sync source.
void axGetErrorExplained(AxErr errornum, char *error_string)
Gets a string which explains an error code in a more verbose fashion.
AxErr axOpenAxsunOCTControl(uint32_t open_all_interfaces)
Opens the AxsunOCTControl context for subsequent device communication.
AxErr axCountDeviceSettings(uint32_t *float_count, uint32_t *int_count, uint32_t *bool_count, uint32_t which_device)
Counts the number of individual device settings elements for each of the three data types (float,...
AxErr axGetDriveConfiguration(uint32_t *current_configuration, uint32_t which_laser)
Gets the currently selected drive configuration.
AxErr axStopVDL(uint32_t which_laser)
Stops any VDL operation (e.g. move or home) currently in progress.
AxErr axFirmwareVersion(uint32_t *major, uint32_t *minor, uint32_t *patch, uint32_t which_device)
Gets the device firmware version.
uint32_t axCountConnectedDevices()
Counts the number of devices successfully connected and enumerated by AxsunOCTControl.
AxErr axSetFPGARegisterSingleBit(const uint32_t regnum, const uint32_t bitnum, const uint32_t value, uint32_t which_DAQ)
Sets or Clears a single bit in a FPGA register.
AxErr axCloseAxsunOCTControl()
Closes an AxsunOCTControl context previously opened with axOpenAxsunOCTControl().
AxErr axGetBoolSetting(uint32_t which_setting, uint8_t *setting_value, char *setting_string, uint32_t which_device)
Gets a boolean setting's value and name string.
AxErr axImagingCntrlEthernet(int16_t number_of_images, uint32_t which_DAQ)
Control the DAQ operational mode (Live Imaging, Burst Recording, or Imaging Off) when using the Ether...
AxErr axGetFPGARegister(const uint32_t regnum, uint16_t *regval, uint32_t which_DAQ)
Gets (i.e. reads) the current value in a FPGA register.
AxErr axSetClockDelay(uint32_t delay_code, uint32_t which_laser)
Sets the electronic K-clock delay.
AxErr axGetDACTable(uint32_t *points, uint32_t *speed, uint32_t *timer1time, uint32_t *timer2time, uint32_t *timer1duration, uint32_t *timer2duration, uint16_t *volts_currents, uint32_t which_laser)
Gets the currently configured DAC table.
AxErr axDebugCommand(uint32_t command_number, uint32_t value_out, uint32_t *command_in, uint32_t *value_in, uint32_t which_device)
Send a debug command.
AxErr axGetTECState(AxTECState *TEC_state, uint32_t which_TEC, uint32_t which_laser)
Gets the current state of a Laser Thermo-Electric Cooler (TEC).
AxErr axLibraryVersion(uint32_t *major, uint32_t *minor, uint32_t *patch, uint32_t *build)
Gets the library version.
AxErr axRegisterConnectCallback(AxConnectCallbackFunctionC_t callback_function, void *userData)
Registers a callback function to be executed following a device connection or disconnection event.
AxErr axGetClockDelay(uint32_t *delay_code, uint32_t which_laser)
Gets the currently configured electronic K-clock delay.
AxErr axSetPipelineMode(AxPipelineMode pipeline_mode, AxChannelMode polarization_mode, uint32_t which_DAQ)
Select the DAQ's pipeline mode (i.e. bypass mode) and polarization channel configuration.
AxErr axReadDAQPHYRegister(uint32_t phynum, uint32_t regnum, uint16_t *regval, uint32_t which_DAQ)
Reads the current value in a DAQ PHY register.