![]() |
AxsunOCTControl_LW 1.6.0
A light-weight & cross-platform alternative to the .NET-based AxsunOCTControl.dll.
|
This header file defines the usage of the AxsunOCTControl_LW "lightweight" library in a C or C++ application. More...
Go to the source code of this file.
Data Structures | |
struct | AxDeviceInfo |
Structure for device information available in connect or disconnect callback functions. More... | |
Typedefs | |
typedef enum AxConnectionType | AxConnectionType |
Connection types (interfaces) supported by AxsunOCTControl_LW. | |
typedef enum AxDevType | AxDevType |
Axsun device types supported by AxsunOCTControl_LW. | |
typedef enum AxTECState | AxTECState |
Laser TEC states. | |
typedef enum AxPowerUpBehavior | AxPowerUpBehavior |
Laser engine default/power-up behaviors. | |
typedef void(__cdecl * | AxConnectCallbackFunctionC_t) (void *) |
Type defintion for a user-provided function to be invoked upon connection or disconnection of a device, when registered using axRegisterConnectCallback(). | |
typedef void(__cdecl * | AxCallbackConnectOrDisconnect_t) (AxDeviceInfo, int32_t, void *) |
Type defintion for a user-provided function to be invoked upon device connection if registered using axRegCallbackConnectOnly() or upon device disconnection if registered using axRegCallbackDisconnectOnly(). | |
Enumerations | |
enum | AxConnectionType { } |
Connection types (interfaces) supported by AxsunOCTControl_LW. More... | |
enum | AxDevType { } |
Axsun device types supported by AxsunOCTControl_LW. More... | |
enum | AxTECState { TEC_UNINITIALIZED = 0 , WARMING_UP = 1 , WAITING_IN_RANGE = 2 , READY = 3 , NOT_INSTALLED = 5 , ERROR_NEVER_GOT_TO_READY = 16 , ERROR_WENT_OUT_OF_RANGE = 17 , TEC_STATE_UNAVAILABLE = 99 } |
Laser TEC states. More... | |
enum | AxPowerUpBehavior { } |
Laser engine default/power-up behaviors. More... | |
Functions | |
Generic Library Functions | |
These functions are not directly related to a connected device, but are used for opening & closing the Control_LW session, opening & closing communication interfaces, and other session management. | |
AxErr __cdecl | axOpenAxsunOCTControl (uint32_t open_all_interfaces) |
Opens the AxsunOCTControl_LW session. More... | |
AxErr __cdecl | axCloseAxsunOCTControl () |
Closes an AxsunOCTControl_LW session previously opened with axOpenAxsunOCTControl(). More... | |
uint32_t __cdecl | axCountConnectedDevices () |
Counts the number of devices successfully connected and enumerated by AxsunOCTControl_LW. More... | |
void __cdecl | axGetErrorExplained (AxErr errornum, char *error_string) |
Gets a string which explains an error code in a more verbose fashion. More... | |
AxErr __cdecl | axUSBInterfaceOpen (uint32_t interface_status) |
Opens, resets, or closes the USB interface. More... | |
AxErr __cdecl | axNetworkInterfaceOpen (uint32_t interface_status) |
Opens, resets, or closes the Ethernet network interface. More... | |
AxErr __cdecl | axSerialInterfaceOpen (uint32_t interface_status, const char *port) |
Opens, resets, or closes a RS-232 serial interface on a given port. More... | |
AxErr __cdecl | axLibraryVersion (uint32_t *major, uint32_t *minor, uint32_t *patch, uint32_t *build) |
Gets the AxsunOCTControl_LW library version. More... | |
int32_t __cdecl | axGetLWBuildDateTime (char *datetime_str) |
Get a string describing the time and date that the AxsunOCTControl_LW library was built. More... | |
int32_t __cdecl | axGetLWBuildCfg () |
Get the build configuration of the AxsunOCTControl_LW library. More... | |
AxErr __cdecl | axGetLibusbVersion (uint32_t *major, uint32_t *minor, uint32_t *patch, uint32_t *build) |
Gets the version of the libusb library loaded with axUSBInterfaceOpen(). More... | |
AxErr __cdecl | axRegisterConnectCallback (AxConnectCallbackFunctionC_t callback_function, void *userData) |
Registers a callback function to be executed following a device connection or disconnection event. More... | |
AxErr __cdecl | axRegCallbackConnectOnly (AxCallbackConnectOrDisconnect_t callback_function, void *userData) |
Registers a callback function to be executed following a device connection event. More... | |
AxErr __cdecl | axRegCallbackDisconnectOnly (AxCallbackConnectOrDisconnect_t callback_function, void *userData) |
Registers a callback function to be executed following a device disconnection event. More... | |
AxErr __cdecl | axRegisterLabVIEWCallback (uint32_t *refnumptr) |
Registers a LabVIEW user event to be executed following a device connection or disconnection event. More... | |
Generic Device Functions | |
These functions access connected devices (either laser engine or DAQ). | |
AxErr __cdecl | axFirmwareVersion (uint32_t *major, uint32_t *minor, uint32_t *patch, uint32_t which_device) |
Gets the device firmware version. More... | |
AxErr __cdecl | axFPGAVersion (uint32_t *major, uint32_t *minor, uint32_t *patch, uint32_t *build, uint32_t which_device) |
Gets the device FPGA version. More... | |
AxErr __cdecl | axDeviceType (AxDevType *device_type, uint32_t which_device) |
Gets the device type (e.g. Laser, EDAQ). More... | |
AxErr __cdecl | axSerialNumber (char *serial_number, uint32_t which_device) |
Gets the device serial number string. More... | |
AxErr __cdecl | axConnectionType (AxConnectionType *connection_type, uint32_t which_device) |
Gets the device connection interface (e.g. USB, Ethernet, RS-232). More... | |
AxErr __cdecl | axGetDeviceInfo (AxDeviceInfo *device_info, uint32_t which_device) |
Gets info about a connected device. More... | |
Laser Device Functions | |
These functions access laser engine devices only. | |
AxErr __cdecl | axSetLaserEmission (uint32_t emission_state, uint32_t which_laser) |
Enables or disables swept laser emission. More... | |
AxErr __cdecl | axGetLaserEmission (uint32_t *emitting, uint32_t which_laser) |
Gets swept laser emission status. More... | |
AxErr __cdecl | axSetPointerEmission (uint32_t emission_state, uint32_t which_laser) |
Enables or disables pointer/aiming laser emission. More... | |
AxErr __cdecl | axGetPointerEmission (uint32_t *emitting, uint32_t which_laser) |
Gets pointer/aiming laser emission status. More... | |
AxErr __cdecl | axSetLaserPowerUp (AxPowerUpBehavior behavior, uint32_t which_laser) |
Sets swept laser emission power-up default behavior. More... | |
AxErr __cdecl | axGetLaserPowerUp (AxPowerUpBehavior *behavior, uint32_t which_laser) |
Gets swept laser emission power-up default behavior. More... | |
AxErr __cdecl | axSetPointerPowerUp (AxPowerUpBehavior behavior, uint32_t which_laser) |
Sets pointer/aiming laser emission power-up default behavior. More... | |
AxErr __cdecl | axGetPointerPowerUp (AxPowerUpBehavior *behavior, uint32_t which_laser) |
Gets pointer/aiming laser emission power-up default behavior. More... | |
AxErr __cdecl | axSetClockDelay (uint32_t delay_code, uint32_t which_laser) |
Sets the electronic K-clock delay. More... | |
AxErr __cdecl | axGetClockDelay (uint32_t *delay_code, uint32_t which_laser) |
Gets the currently configured electronic K-clock delay. More... | |
AxErr __cdecl | axSetDriveConfiguration (uint32_t which_config, uint32_t which_laser) |
Selects a pre-programmed laser drive configuration. More... | |
AxErr __cdecl | axGetDriveConfiguration (uint32_t *current_configuration, uint32_t which_laser) |
Gets the currently selected drive configuration. More... | |
AxErr __cdecl | axGetElapsedTimers (uint32_t *cum_emission_sec, uint32_t *cum_system_sec, uint32_t *uptime_msec, uint32_t which_laser) |
Gets elapsed timer values from a laser engine. More... | |
AxErr __cdecl | axGetTECState (AxTECState *TEC_state, uint32_t which_TEC, uint32_t which_laser) |
Gets the current state of a Laser Thermo-Electric Cooler (TEC). More... | |
AxErr __cdecl | axGetLaserErrorState (uint32_t *error_bitfield, uint32_t which_laser) |
Gets the current error state of a Laser device. More... | |
AxErr __cdecl | axHomeVDL (uint32_t which_laser) |
Starts the VDL home operation. More... | |
AxErr __cdecl | axStopVDL (uint32_t which_laser) |
Stops any VDL operation (e.g. move or home) currently in progress. More... | |
AxErr __cdecl | axMoveRelVDL (float rel_position, float speed, uint32_t which_laser) |
Move the VDL relative to its current position. More... | |
AxErr __cdecl | axMoveAbsVDL (float abs_position, float speed, uint32_t which_laser) |
Move the VDL to an absolute position. More... | |
AxErr __cdecl | 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. More... | |
DAQ Device Functions | |
These functions access DAQ devices only. | |
AxErr __cdecl | 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 Ethernet interface. More... | |
AxErr __cdecl | axSetImageSyncSource (AxEdgeSource source, float frequency, uint32_t which_DAQ) |
Select the Image_sync source. More... | |
AxErr __cdecl | axSetSampleClockSource (AxEdgeSource source, uint32_t which_DAQ) |
Select the ADC sample clock source. More... | |
AxErr __cdecl | axSetSweepTriggerSource (AxEdgeSource source, uint32_t which_DAQ) |
Select the sweep trigger source. More... | |
AxErr __cdecl | 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. More... | |
AxErr __cdecl | axSetEightBitGain (float gain, uint32_t which_DAQ) |
Set the GAIN term during 16- to 8-bit dynamic range compression. More... | |
AxErr __cdecl | axSetEightBitOffset (float offset, uint32_t which_DAQ) |
Set the OFFSET term during 16- to 8-bit dynamic range compression. More... | |
AxErr __cdecl | axSetSubsamplingFactor (uint8_t subsampling_factor, uint32_t which_DAQ) |
Set the A-line subsampling factor. More... | |
AxErr __cdecl | axGetFPGARegister (const uint32_t regnum, uint16_t *regval, uint32_t which_DAQ) |
Gets (i.e. reads) the current value in a FPGA register. More... | |
AxErr __cdecl | 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. More... | |
AxErr __cdecl | 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 number-value pairs. More... | |
AxErr __cdecl | axSetFPGARegisterDefaults (const uint16_t *regnums, const uint16_t *regvals, uint32_t count, uint32_t which_DAQ) |
Sets (i.e. writes) a power-on default FPGA register configuration script, overwriting the existing script. More... | |
AxErr __cdecl | axSetFPGARegister (uint32_t regnum, uint16_t regval, uint32_t which_DAQ) |
Sets (i.e. writes) a FPGA register with a single value. More... | |
AxErr __cdecl | axSetFPGARegisterMasked (uint32_t regnum, uint16_t regval, uint16_t bitmask, uint32_t which_DAQ) |
Sets (i.e. writes) FPGA register bits based on a bitmask. More... | |
AxErr __cdecl | axSetFPGARegisterSingleBit (uint32_t regnum, uint32_t which_bit, uint32_t value, uint32_t which_DAQ) |
Sets or Clears a single bit in a FPGA register. More... | |
AxErr __cdecl | axSetFPGARegisterSingleByte (uint32_t regnum, uint32_t which_byte, uint32_t value, uint32_t which_DAQ) |
Sets (i.e. writes) the low or high byte of an FPGA register, leaving the other byte unchanged. More... | |
AxErr __cdecl | axSetFPGARegisterSingleNibble (uint32_t regnum, uint32_t which_nibble, uint32_t value, uint32_t which_DAQ) |
Sets (i.e. writes) one nibble (4 bits) of an FPGA register, leaving the other 12 bits unchanged. More... | |
AxErr __cdecl | axSetFPGADataArray (uint32_t regnum, const uint16_t *data_array, uint32_t number_of_words, uint32_t which_DAQ) |
Sets (i.e. writes) a FPGA register with an array of multiple values. More... | |
AxErr __cdecl | axSetFPGAWindowFunction (AxChannelMode channel, const float *window_real, const float *window_imag, uint32_t window_length, uint32_t which_DAQ) |
Sets (i.e. writes) an apodization window function to the FPGA. More... | |
Internal Functions | |
These functions are for internal or advanced users only. Please contact Excelitas-Axsun for additional support. | |
typedef void(__cdecl * | AxProgressCallbackFcn) (int32_t, int32_t, void *) |
AxErr __cdecl | axCountDeviceSettings (uint32_t *float_count, uint32_t *int_count, uint32_t *bool_count, uint32_t which_device) |
AxErr __cdecl | axGetFloatSetting (uint32_t which_setting, float *setting_value, char *setting_string, uint32_t which_device) |
AxErr __cdecl | axGetIntSetting (uint32_t which_setting, int32_t *setting_value, char *setting_string, uint32_t which_device) |
AxErr __cdecl | axGetBoolSetting (uint32_t which_setting, uint8_t *setting_value, char *setting_string, uint32_t which_device) |
AxErr __cdecl | axSettingsToDevice (uint32_t float_count, uint32_t int_count, uint32_t bool_count, const float *float_values, const int32_t *int_values, const uint8_t *bool_values, uint32_t which_device) |
AxErr __cdecl | axConnectionHeartbeat (uint32_t heartbeat_state, uint32_t which_device) |
AxErr __cdecl | axDebugCommand (uint32_t command_number, uint32_t value_out, uint32_t *command_in, uint32_t *value_in, uint32_t which_device) |
AxErr __cdecl | axGetDebugInfo (int32_t code, uint32_t *field1, uint32_t *field2, uint32_t *field3, uint32_t *field4, uint32_t *field5, uint32_t *field6, uint32_t *field7, uint32_t *field8, uint32_t *field9, uint32_t *field10, void *data1, void *data2, uint32_t which_device) |
AxErr __cdecl | axSetDACTable (uint32_t points, uint32_t speed, uint32_t timer1time, uint32_t timer2time, uint32_t timer1duration, uint32_t timer2duration, const uint16_t *volts_currents, uint32_t save_to_flash, uint32_t which_laser) |
AxErr __cdecl | 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) |
AxErr __cdecl | axReadDAQPHYRegister (uint32_t phynum, uint32_t regnum, uint16_t *regval, uint32_t which_DAQ) |
AxErr __cdecl | axUpdateMicroprocessorFW (const char *file, uint32_t which_device) |
AxErr __cdecl | axUpdateFPGABitstream (const char *file, AxProgressCallbackFcn callback, void *user_data, uint32_t which_device) |
AxErr __cdecl | axUpdateFPGABitstreamLabVIEW (const char *file, uint32_t *refnumptr, uint32_t which_device) |
This header file defines the usage of the AxsunOCTControl_LW "lightweight" library in a C or C++ application.
Refer to the Main Page for C API Usage Guidelines .
DETAILED RELEASE NOTES
Version 1.0.0
Version 1.0.1
Version 1.1.0
Version 1.2.0
Version 1.3.0
Version 1.3.1
Version 1.4.0
Version 1.5.0
Version 1.6.0
enum AxConnectionType |
enum AxDevType |
enum AxPowerUpBehavior |
Laser engine default/power-up behaviors.
enum AxTECState |
Laser TEC states.
AxErr __cdecl axCloseAxsunOCTControl | ( | ) |
Closes an AxsunOCTControl_LW session previously opened with axOpenAxsunOCTControl().
AxErr __cdecl axConnectionType | ( | AxConnectionType * | connection_type, |
uint32_t | which_device | ||
) |
Gets the device connection interface (e.g. USB, Ethernet, RS-232).
[out] | connection_type | The interface on which the device is connected. |
[in] | which_device | The numeric index of the desired device. |
uint32_t __cdecl axCountConnectedDevices | ( | ) |
Counts the number of devices successfully connected and enumerated by AxsunOCTControl_LW.
Count includes Laser engine and DAQ boards. A device connected on two interfaces concurrently will be counted twice and thus is not a recommended configuration.
Gets the device type (e.g. Laser, EDAQ).
[out] | device_type | The type of device. |
[in] | which_device | The numeric index of the desired device. |
AxErr __cdecl axFirmwareVersion | ( | uint32_t * | major, |
uint32_t * | minor, | ||
uint32_t * | patch, | ||
uint32_t | which_device | ||
) |
Gets the device firmware version.
[out] | major | Version number major element. |
[out] | minor | Version number minor element. |
[out] | patch | Version number patch element. |
[in] | which_device | The numeric index of the desired device. |
AxErr __cdecl axFPGAVersion | ( | uint32_t * | major, |
uint32_t * | minor, | ||
uint32_t * | patch, | ||
uint32_t * | build, | ||
uint32_t | which_device | ||
) |
Gets the device FPGA version.
[out] | major | Version number major element. |
[out] | minor | Version number minor element. |
[out] | patch | Version number patch element. |
[out] | build | Version number build element. |
[in] | which_device | The numeric index of the desired device. |
Devices which do not have an FPGA will return all version elements = 0.
AxErr __cdecl axGetClockDelay | ( | uint32_t * | delay_code, |
uint32_t | which_laser | ||
) |
Gets the currently configured electronic K-clock delay.
[out] | delay_code | Will contain a 6-bit code representing the configured delay value. |
[in] | which_laser | The numeric index of the desired Laser. |
See details for axSetClockDelay().
AxErr __cdecl axGetDeviceInfo | ( | AxDeviceInfo * | device_info, |
uint32_t | which_device | ||
) |
Gets info about a connected device.
[out] | device_info | Information about the desired device. |
[in] | which_device | The numeric index of the desired device. |
AxErr __cdecl axGetDriveConfiguration | ( | uint32_t * | current_configuration, |
uint32_t | which_laser | ||
) |
Gets the currently selected drive configuration.
[out] | current_configuration | The currently selected drive configuration. |
[in] | which_laser | The numeric index of the desired Laser. |
Laser Engines must be programmed during manufacture to support multiple drive configurations. Contact Axsun technical support for more information.
AxErr __cdecl axGetElapsedTimers | ( | uint32_t * | cum_emission_sec, |
uint32_t * | cum_system_sec, | ||
uint32_t * | uptime_msec, | ||
uint32_t | which_laser | ||
) |
Gets elapsed timer values from a laser engine.
[out] | cum_emission_sec | Number of seconds elapsed with laser in emission-on state (cumulative lifetime). |
[out] | cum_system_sec | Number of seconds elapsed with engine in powered-on state (cumulative lifetime). |
[out] | uptime_msec | Number of milliseconds elapsed in current session (since last power-up). |
[in] | which_laser | The numeric index of the desired Laser. |
void __cdecl axGetErrorExplained | ( | AxErr | errornum, |
char * | error_string | ||
) |
Gets a string which explains an error code in a more verbose fashion.
[in] | errornum | An error code number returned from other "ax" functions in this library. |
[out] | error_string | A char array pre-allocated with at least 512 bytes into which the error explanation will be copied as a nul-terminated string. |
axGetErrorExplained() can be called at any time. It is unsafe to pass a error_string output buffer allocated with fewer than 512 bytes.
AxErr __cdecl axGetFPGARegister | ( | const uint32_t | regnum, |
uint16_t * | regval, | ||
uint32_t | which_DAQ | ||
) |
Gets (i.e. reads) the current value in a FPGA register.
[in] | regnum | The FPGA register number to read. |
[out] | regval | The value read back from the FPGA register. |
[in] | which_DAQ | The numeric index of the desired DAQ. |
AxErr __cdecl 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 number-value pairs.
[in] | elements_allocated | Indicates the size (in number of U16 elements, NOT bytes) of the pre-allocated regnums and regvals arrays. |
[out] | regnums | Pointer to a pre-allocated array to hold the 16-bit register numbers read back from the device. |
[out] | regvals | Pointer to a pre-allocated array to hold the 16-bit register values read back from the device. |
[out] | elements_returned | The number of register number-value pairs read back from the device. |
[in] | which_DAQ | The numeric index of the desired DAQ. |
regnums
and regvals
are arrays which must be pre-allocated by the user. elements_returned
will never be higher than elements_allocated
, however if elements_returned == elements_allocated
, there may be more register number-value pairs stored on the device which were not returned (indicating elements_allocated
was too small to hold the full FPGA register configuration script).
AxErr __cdecl 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.
[in] | start_regnum | The first FPGA register to read in the range. |
[in] | end_regnum | The last FPGA register to read in the range; must be greater than or equal to start_regnum . |
[out] | regvals | Pointer to a pre-allocated array to hold the 16-bit register values read back from the requested range of FPGA registers. |
[in] | bytes_allocated | The number of bytes pre-allocated by the user in the array pointed to by regvals . |
[in] | which_DAQ | The numeric index of the desired DAQ. |
The size of the pre-allocated memory pointed to by regvals
must be 2 bytes per register in the included range: bytes_allocated
should equal 2 * (end_regnum - start_regnum + 1)
.
AxErr __cdecl axGetLaserEmission | ( | uint32_t * | emitting, |
uint32_t | which_laser | ||
) |
Gets swept laser emission status.
[out] | emitting | =0 if both laser emission and sweep are disabled, =1 if both laser emission and sweep are enabled, =2 if laser emission is disabled but sweep is enabled. |
[in] | which_laser | The numeric index of the desired Laser. |
AxErr __cdecl axGetLaserErrorState | ( | uint32_t * | error_bitfield, |
uint32_t | which_laser | ||
) |
Gets the current error state of a Laser device.
[out] | error_bitfield | Current error state of the laser. |
[in] | which_laser | The numeric index of the desired Laser. |
When error_bitfield is equal to zero, there are no errors reported by the device. To decode a non-zero value of error_bitfield, contact Axsun technical support. Use axGetTECState() to debug TEC-related errors potentially caused by insufficient thermal management.
AxErr __cdecl axGetLaserPowerUp | ( | AxPowerUpBehavior * | behavior, |
uint32_t | which_laser | ||
) |
Gets swept laser emission power-up default behavior.
[out] | behavior | The currently configured power-up behavior |
[in] | which_laser | The numeric index of the desired Laser. |
AxErr __cdecl axGetLibusbVersion | ( | uint32_t * | major, |
uint32_t * | minor, | ||
uint32_t * | patch, | ||
uint32_t * | build | ||
) |
Gets the version of the libusb library loaded with axUSBInterfaceOpen().
[out] | major | Version number major element. |
[out] | minor | Version number minor element. |
[out] | patch | Version number patch element. |
[out] | build | Version number build element. |
int32_t __cdecl axGetLWBuildCfg | ( | ) |
Get the build configuration of the AxsunOCTControl_LW library.
int32_t __cdecl axGetLWBuildDateTime | ( | char * | datetime_str | ) |
Get a string describing the time and date that the AxsunOCTControl_LW library was built.
[out] | datetime_str | A pointer to a pre-allocated output buffer of characters with size at least 100 bytes into which a nul-terminated date & time string will be copied. |
It is unsafe to pass a datetime_str output buffer allocated with fewer than 100 bytes.
AxErr __cdecl axGetPointerEmission | ( | uint32_t * | emitting, |
uint32_t | which_laser | ||
) |
Gets pointer/aiming laser emission status.
[out] | emitting | Will be non-zero if pointer/aiming laser is emitting or =0 if pointer/aiming laser is not emitting. |
[in] | which_laser | The numeric index of the desired Laser. |
AxErr __cdecl axGetPointerPowerUp | ( | AxPowerUpBehavior * | behavior, |
uint32_t | which_laser | ||
) |
Gets pointer/aiming laser emission power-up default behavior.
[out] | behavior | The currently configured power-up behavior |
[in] | which_laser | The numeric index of the desired Laser. |
AxErr __cdecl axGetTECState | ( | AxTECState * | TEC_state, |
uint32_t | which_TEC, | ||
uint32_t | which_laser | ||
) |
Gets the current state of a Laser Thermo-Electric Cooler (TEC).
[out] | TEC_state | Current state of the queried laser TEC as described by the AxsunOCTControl_LW::TECState enum. |
[in] | which_TEC | The index of which TEC to query (1 or 2). |
[in] | which_laser | The numeric index of the desired Laser. |
Some Laser Engines support more than one TEC. To query the state of the primary "TEC 1", use which_TEC
= 1, or for a secondary TEC use which_TEC
= 2.
AxErr __cdecl 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.
[out] | current_pos | Current VDL position (mm). |
[out] | target_pos | Target VDL position (mm). Will be different than the current position during a move or home operation. |
[out] | speed | Current speed of VDL (mm/sec). |
[out] | error_from_last_home | Accumulated error since last home operation (number of microsteps). |
[out] | last_move_time | Time for last move operation (sec). |
[out] | state | Integer codes to represent VDL state.
|
[out] | home_switch | Non-zero if home (minimum position) limit switch is activated, =0 otherwise. |
[out] | limit_switch | Non-zero if maximum position limit switch is activated, =0 otherwise. |
[out] | VDL_error | Debugging information for VDL errors. |
[in] | which_laser | The numeric index of the desired Laser. |
AxErr __cdecl axHomeVDL | ( | uint32_t | which_laser | ) |
Starts the VDL home operation.
[in] | which_laser | The numeric index of the desired Laser. |
This function returns after requesting the homing operation from the VDL controller; it does not wait for the mechanical homing operation to complete before returning.
AxErr __cdecl 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 Ethernet interface.
[in] | number_of_images | =0 for Imaging Off (idle), =-1 for Live Imaging (no record), or any positive value between 1 and 32767 to request the desired number of images in a Burst Record operation. |
[in] | which_DAQ | The numeric index of the desired DAQ. |
This function does NOT control the laser and therefore the laser emission must be enabled/disabled separately using axSetLaserEmission(). To control the DAQ operational mode when using the PCIe interface, call axImagingCntrlPCIe() in the AxsunOCTCapture library.
AxErr __cdecl axLibraryVersion | ( | uint32_t * | major, |
uint32_t * | minor, | ||
uint32_t * | patch, | ||
uint32_t * | build | ||
) |
Gets the AxsunOCTControl_LW library version.
[out] | major | Version number major element. |
[out] | minor | Version number minor element. |
[out] | patch | Version number patch element. |
[out] | build | Version number build element. |
AxErr __cdecl axMoveAbsVDL | ( | float | abs_position, |
float | speed, | ||
uint32_t | which_laser | ||
) |
Move the VDL to an absolute position.
[in] | abs_position | The new desired position in mm. |
[in] | speed | The speed at which to move in mm/sec. |
[in] | which_laser | The numeric index of the desired Laser. |
AxErr __cdecl axMoveRelVDL | ( | float | rel_position, |
float | speed, | ||
uint32_t | which_laser | ||
) |
Move the VDL relative to its current position.
[in] | rel_position | The distance to move from the current position in mm. |
[in] | speed | The speed at which to move in mm/sec. |
[in] | which_laser | The numeric index of the desired Laser. |
AxErr __cdecl axNetworkInterfaceOpen | ( | uint32_t | interface_status | ) |
Opens, resets, or closes the Ethernet network interface.
[in] | interface_status | =1 opens the interface or resets an existing open interface, =0 closes the interface. |
When the interface is open, devices present on this interface will be detected, enumerated, and trigger the execution of a callback function (if previously registered). Use this function if the interface was not opened automatically during the initial axOpenAxsunOCTControl() call.
AxErr __cdecl axOpenAxsunOCTControl | ( | uint32_t | open_all_interfaces | ) |
Opens the AxsunOCTControl_LW session.
[in] | open_all_interfaces | If TRUE the USB and Ethernet interfaces will be started automatically. If FALSE no interfaces will be started. |
See C API Usage Guidelines on the Main Page for more information.
If interfaces are not opened at the time of this function call, they can be opened later using axNetworkInterfaceOpen(), axUSBInterfaceOpen(), or axSerialInterfaceOpen(). This allows the registration of connection/disconnection callback function(s) prior to opening interfaces and gives the user individual control over which interface(s) to use.
AxErr __cdecl axRegCallbackConnectOnly | ( | AxCallbackConnectOrDisconnect_t | callback_function, |
void * | userData | ||
) |
Registers a callback function to be executed following a device connection event.
[in] | callback_function | A user-supplied function to be called. |
[in] | userData | An arbitrary structure to be made available inside the callback function (or NULL if unused). |
The supplied callback function will be executed by a background thread when a new device is detected. Within the callback function, access is provided to arbitrary user data passed as a void* parameter to this function.
AxErr __cdecl axRegCallbackDisconnectOnly | ( | AxCallbackConnectOrDisconnect_t | callback_function, |
void * | userData | ||
) |
Registers a callback function to be executed following a device disconnection event.
[in] | callback_function | A user-supplied function to be called. |
[in] | userData | An arbitrary structure to be made available inside the callback function (or NULL if unused). |
The supplied callback function will be executed by a background thread when an existing device is disconnected. Within the callback function, access is provided to arbitrary user data passed as a void* parameter to this function.
AxErr __cdecl axRegisterConnectCallback | ( | AxConnectCallbackFunctionC_t | callback_function, |
void * | userData | ||
) |
Registers a callback function to be executed following a device connection or disconnection event.
[in] | callback_function | A user-supplied function to be called. |
[in] | userData | An arbitrary structure to be made available inside the callback function (or NULL if unused). |
The supplied callback function will be executed by a background thread when a new device is detected or when an existing device is disconnected. Within the callback function, access is provided to arbitrary user data passed as a void* parameter to this function. It is recommended that new designs use axRegCallbackConnectOnly() and axRegCallbackDisconnectOnly() if discrimination between device connection and disconnection events is desired.
AxErr __cdecl axRegisterLabVIEWCallback | ( | uint32_t * | refnumptr | ) |
Registers a LabVIEW user event to be executed following a device connection or disconnection event.
[in] | refnumptr | A refnum pointer of a LabVIEW user event. |
LabVIEW code can be called directly from this library when a new device is detected or when an existing device is disconnected, similar to a C-based callback function registered using axRegisterConnectCallback(). See the AxsunOCTControl_LW LabVIEW example project and extcode.h header file (provided by National Instruments) for more details.
AxErr __cdecl axSerialInterfaceOpen | ( | uint32_t | interface_status, |
const char * | port | ||
) |
Opens, resets, or closes a RS-232 serial interface on a given port.
[in] | interface_status | =1 opens an interface or resets an existing open interface, =0 closes an interface if a port is provided, or closes all interfaces if port is "" (empty string). |
[in] | port | Nul-terminated char array describing the name of the port (e.g. typically "COM_" on Windows or "/dev/tty.___" on Linux/macOS; UTF8-encoded) |
When the interface is open, a device present on this interface will be detected, enumerated, and trigger the execution of a callback function (if previously registered).
AxErr __cdecl axSerialNumber | ( | char * | serial_number, |
uint32_t | which_device | ||
) |
Gets the device serial number string.
[out] | serial_number | A char array pre-allocated with at least 40 bytes into which the device serial number will be copied as a nul-terminated string. |
[in] | which_device | The numeric index of the desired device. |
AxErr __cdecl axSetClockDelay | ( | uint32_t | delay_code, |
uint32_t | which_laser | ||
) |
Sets the electronic K-clock delay.
[in] | delay_code | A 6-bit code representing the desired delay value. |
[in] | which_laser | The numeric index of the desired Laser. |
Discussion of the delay_code value can be found at https://docs.axsun.com (OCT Host page, Clock Delay subsection)
AxErr __cdecl axSetDriveConfiguration | ( | uint32_t | which_config, |
uint32_t | which_laser | ||
) |
Selects a pre-programmed laser drive configuration.
[in] | which_config | The desired configuration number (0, 1, 2, or 3). |
[in] | which_laser | The numeric index of the desired Laser. |
Laser Engines must be programmed during manufacture to support multiple drive configurations. Contact Axsun technical support for more information.
AxErr __cdecl axSetEightBitGain | ( | float | gain, |
uint32_t | which_DAQ | ||
) |
Set the GAIN term during 16- to 8-bit dynamic range compression.
[in] | gain | Gain must be between 0 and 15.999756. |
[in] | which_DAQ | The numeric index of the desired DAQ. |
AxErr __cdecl axSetEightBitOffset | ( | float | offset, |
uint32_t | which_DAQ | ||
) |
Set the OFFSET term during 16- to 8-bit dynamic range compression.
[in] | offset | Offset must be between -128.0 and 127.996094. |
[in] | which_DAQ | The numeric index of the desired DAQ. |
AxErr __cdecl axSetFPGADataArray | ( | uint32_t | regnum, |
const uint16_t * | data_array, | ||
uint32_t | number_of_words, | ||
uint32_t | which_DAQ | ||
) |
Sets (i.e. writes) a FPGA register with an array of multiple values.
[in] | regnum | The FPGA register number in which to write. |
[in] | data_array | Pointer to an array containing 16-bit values to be written. |
[in] | number_of_words | The number of 16-bit register values pointed to by data_array . |
[in] | which_DAQ | The numeric index of the desired DAQ. |
AxErr __cdecl axSetFPGARegister | ( | uint32_t | regnum, |
uint16_t | regval, | ||
uint32_t | which_DAQ | ||
) |
Sets (i.e. writes) a FPGA register with a single value.
[in] | regnum | The FPGA register number in which to write. |
[in] | regval | The value to be written. |
[in] | which_DAQ | The numeric index of the desired DAQ. |
AxErr __cdecl axSetFPGARegisterDefaults | ( | const uint16_t * | regnums, |
const uint16_t * | regvals, | ||
uint32_t | count, | ||
uint32_t | which_DAQ | ||
) |
Sets (i.e. writes) a power-on default FPGA register configuration script, overwriting the existing script.
[in] | regnums | Pointer to an array containing 16-bit register numbers. |
[in] | regvals | Pointer to an array containing 16-bit register values. |
[in] | count | The number of register number-value pairs to be written to the device. |
[in] | which_DAQ | The numeric index of the desired DAQ. |
regnums
points to an array containing count
register numbers and regvals
points to an equal-sized array of corresponding register default values.
AxErr __cdecl axSetFPGARegisterMasked | ( | uint32_t | regnum, |
uint16_t | regval, | ||
uint16_t | bitmask, | ||
uint32_t | which_DAQ | ||
) |
Sets (i.e. writes) FPGA register bits based on a bitmask.
[in] | regnum | The FPGA register number in which to write. |
[in] | regval | The value to be written, subject to the provided bitmask. |
[in] | bitmask | A mask indicating which bits to write (1) and which to leave unaffected (0). |
[in] | which_DAQ | The numeric index of the desired DAQ. |
AxErr __cdecl axSetFPGARegisterSingleBit | ( | uint32_t | regnum, |
uint32_t | which_bit, | ||
uint32_t | value, | ||
uint32_t | which_DAQ | ||
) |
Sets or Clears a single bit in a FPGA register.
[in] | regnum | The FPGA register number in which to set or clear a bit. |
[in] | which_bit | The bit number in the interval [0..15] to set or clear. |
[in] | value | =1 to Set the bit, =0 to Clear the bit. |
[in] | which_DAQ | The numeric index of the desired DAQ. |
AxErr __cdecl axSetFPGARegisterSingleByte | ( | uint32_t | regnum, |
uint32_t | which_byte, | ||
uint32_t | value, | ||
uint32_t | which_DAQ | ||
) |
Sets (i.e. writes) the low or high byte of an FPGA register, leaving the other byte unchanged.
[in] | regnum | The FPGA register number in which to write. |
[in] | which_byte | Set to = 0 for low byte, = 1 for high byte. |
[in] | value | The value to be written (must be in range of 0 to 255). |
[in] | which_DAQ | The numeric index of the desired DAQ. |
AxErr __cdecl axSetFPGARegisterSingleNibble | ( | uint32_t | regnum, |
uint32_t | which_nibble, | ||
uint32_t | value, | ||
uint32_t | which_DAQ | ||
) |
Sets (i.e. writes) one nibble (4 bits) of an FPGA register, leaving the other 12 bits unchanged.
[in] | regnum | The FPGA register number in which to write. |
[in] | which_nibble | Set to = 0 for lowest nibble, ... , = 3 for highest nibble. |
[in] | value | The value to be written (must be in range of 0 to 15). |
[in] | which_DAQ | The numeric index of the desired DAQ. |
AxErr __cdecl axSetFPGAWindowFunction | ( | AxChannelMode | channel, |
const float * | window_real, | ||
const float * | window_imag, | ||
uint32_t | window_length, | ||
uint32_t | which_DAQ | ||
) |
Sets (i.e. writes) an apodization window function to the FPGA.
[in] | channel | The acquisition channels to which the window function is written. |
[in] | window_real | Pointer to an array containing the real component of the window function. |
[in] | window_imag | Pointer to an array containing the imaginary component of the window function. |
[in] | window_length | The length of the window function (i.e. the number of elements in each array describing its real and imaginary components). |
[in] | which_DAQ | The numeric index of the desired DAQ. |
A selected AxChannelMode of SUM_CHANNELS or INTERLEAVE_CHANNELS will load the provided window function into both Ch1 and Ch2 (call this function twice if each channel needs to have a differnet window function). The values in the window_real and window_imag arrays must be on the interval from negative unity to unity (-1.0, 1.0) otherwise clipping will occur and likely result in signal distortion. If window_length is less-than the appropriate 2^n FFT size (e.g. 2048 samples), the loaded window function will be zero-padded accordingly.
AxErr __cdecl axSetImageSyncSource | ( | AxEdgeSource | source, |
float | frequency, | ||
uint32_t | which_DAQ | ||
) |
Select the Image_sync source.
[in] | source | The desired Image_sync source. Must be either INTERNAL, LVCMOS, LVDS, or INTERNAL_SYNC. |
[in] | frequency | The Image_sync frequency; this parameter is optional and is ignored when source is not INTERNAL or INTERNAL_SYNC. If the source is INTERNAL, this value is interpreted in Hz and the generated Image_sync is asynchronous with the sweep trigger. If the source is INTERNAL_SYNC, this value is interpreted in sweep triggers per image and the generated Image_sync is synchronous with the sweep trigger. |
[in] | which_DAQ | The numeric index of the desired DAQ. |
Use INTERNAL or INTERNAL_SYNC Image_sync source only for simulation and troubleshooting. INTERNAL_SYNC requires FPGA version 6.71.0.42 or later.
AxErr __cdecl axSetLaserEmission | ( | uint32_t | emission_state, |
uint32_t | which_laser | ||
) |
Enables or disables swept laser emission.
[in] | emission_state | =0 disables both laser emission and sweep, =1 enables both laser emission and sweep, =2 enables sweep but disables laser emission. |
[in] | which_laser | The numeric index of the desired Laser. |
AxErr __cdecl axSetLaserPowerUp | ( | AxPowerUpBehavior | behavior, |
uint32_t | which_laser | ||
) |
Sets swept laser emission power-up default behavior.
[in] | behavior | The desired power-up behavior |
[in] | which_laser | The numeric index of the desired Laser. |
Saves setting to non-volatile RAM. Restart engine to observe selected power-upbehavior.
AxErr __cdecl 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.
[in] | pipeline_mode | The desired pipeline mode. |
[in] | polarization_mode | The desired polarization channel (horizontal, vertical, diverse, or interleaved). |
[in] | which_DAQ | The numeric index of the desired DAQ. |
Insure that A-line subsampling has been configured with SetSubsamplingFactor() prior to setting a pipeline mode which could saturate the data interface bandwidth if subsampling is insufficient.
AxErr __cdecl axSetPointerEmission | ( | uint32_t | emission_state, |
uint32_t | which_laser | ||
) |
Enables or disables pointer/aiming laser emission.
[in] | emission_state | =1 enables pointer/aiming laser emission, =0 disables pointer/aiming laser emission. |
[in] | which_laser | The numeric index of the desired Laser. |
AxErr __cdecl axSetPointerPowerUp | ( | AxPowerUpBehavior | behavior, |
uint32_t | which_laser | ||
) |
Sets pointer/aiming laser emission power-up default behavior.
[in] | behavior | The desired power-up behavior |
[in] | which_laser | The numeric index of the desired Laser. |
Saves setting to non-volatile RAM. Restart engine to observe selected power-up behavior.
AxErr __cdecl axSetSampleClockSource | ( | AxEdgeSource | source, |
uint32_t | which_DAQ | ||
) |
Select the ADC sample clock source.
[in] | source | The desired sample clock source. Must be either EXTERNAL (Laser k-clock) or INTERNAL (500 MS/s). |
[in] | which_DAQ | The numeric index of the desired DAQ. |
Use INTERNAL sample clock source only for simulation and troubleshooting.
AxErr __cdecl axSetSubsamplingFactor | ( | uint8_t | subsampling_factor, |
uint32_t | which_DAQ | ||
) |
Set the A-line subsampling factor.
[in] | subsampling_factor | Subsampling factor must be between 1 and 166. |
[in] | which_DAQ | The numeric index of the desired DAQ. |
AxErr __cdecl axSetSweepTriggerSource | ( | AxEdgeSource | source, |
uint32_t | which_DAQ | ||
) |
Select the sweep trigger source.
[in] | source | The desired sweep trigger source. Must be either EXTERNAL (from Laser) or INTERNAL (100 kHz). |
[in] | which_DAQ | The numeric index of the desired DAQ. |
Use INTERNAL sweep trigger source only for simulation and troubleshooting.
AxErr __cdecl axStopVDL | ( | uint32_t | which_laser | ) |
Stops any VDL operation (e.g. move or home) currently in progress.
[in] | which_laser | The numeric index of the desired Laser. |
AxErr __cdecl axUSBInterfaceOpen | ( | uint32_t | interface_status | ) |
Opens, resets, or closes the USB interface.
[in] | interface_status | =1 opens the interface or resets an existing open interface, =0 closes the interface. |
When the interface is open, devices present on this interface will be detected, enumerated, and trigger the execution of a callback function (if previously registered). Use this function if the interface was not opened automatically during the initial axOpenAxsunOCTControl() call.