AxsunOCTControl_LW 2.0.0
A light-weight & cross-platform alternative to the .NET-based AxsunOCTControl.dll.
Loading...
Searching...
No Matches
Data Structures | Typedefs | Enumerations
AxsunOCTControl_LW_C.h File Reference

This header file defines the usage of the AxsunOCTControl_LW "lightweight" library in a C or C++ application. More...

#include "AxsunCommonEnums.h"
#include <stdint.h>
#include <stdbool.h>

Go to the source code of this file.

Data Structures

struct  AxDeviceInfo
 Structure for device information available in connect or disconnect callback functions. More...
 
union  AxNamedDataValue
 Union for Named Data field value. 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 enum AxNamedDataType AxNamedDataType
 Available data types for Named Data field values.
 
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...
 
enum  AxNamedDataType { UNINIT_TYPE = 0 , INTEGER_TYPE = 1 , BOOL_TYPE = 2 , SINGLE_TYPE = 3 }
 Available data types for Named Data field values. 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.
 
AxErr __cdecl axCloseAxsunOCTControl ()
 Closes an AxsunOCTControl_LW session previously opened with axOpenAxsunOCTControl().
 
uint32_t __cdecl axCountConnectedDevices ()
 Counts the number of devices successfully connected and enumerated by AxsunOCTControl_LW.
 
void __cdecl axGetErrorExplained (AxErr errornum, char *error_string)
 Gets a string which explains an error code in a more verbose fashion.
 
AxErr __cdecl axUSBInterfaceOpen (uint32_t interface_status)
 Opens, resets, or closes the USB interface.
 
AxErr __cdecl axNetworkInterfaceOpen (uint32_t interface_status)
 Opens, resets, or closes the Ethernet network interface.
 
AxErr __cdecl axSerialInterfaceOpen (uint32_t interface_status, const char *port)
 Opens, resets, or closes a RS-232 serial interface on a given port.
 
AxErr __cdecl axLibraryVersion (uint32_t *major, uint32_t *minor, uint32_t *patch, uint32_t *build)
 Gets the AxsunOCTControl_LW library version as numeric elements.
 
const char * axLWLibVersion ()
 Get a string describing the AxsunOCTControl_LW library version.
 
int32_t __cdecl axGetLWBuildDateTime (char *datetime_str)
 Get a string describing the time and date that the AxsunOCTControl_LW library was built.
 
const char * axLWBuildDateTime ()
 Get a string describing the time and date that the AxsunOCTControl_LW library was built.
 
int32_t __cdecl axGetLWBuildCfg ()
 Get the build configuration of the AxsunOCTControl_LW library.
 
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().
 
AxErr __cdecl axRegisterConnectCallback (AxConnectCallbackFunctionC_t callback_function, void *userData)
 Registers a callback function to be executed following a device connection or disconnection event.
 
AxErr __cdecl axRegCallbackConnectOnly (AxCallbackConnectOrDisconnect_t callback_function, void *userData)
 Registers a callback function to be executed following a device connection event.
 
AxErr __cdecl axRegCallbackDisconnectOnly (AxCallbackConnectOrDisconnect_t callback_function, void *userData)
 Registers a callback function to be executed following a device disconnection event.
 
AxErr __cdecl axRegisterLabVIEWCallback (uint32_t *refnumptr)
 Registers a LabVIEW user event to be executed following a device connection or disconnection event.
 
Generic Device Functions

These functions access connected devices (either laser engine or DAQ).

AxErr __cdecl axGetDeviceHandle (AxDeviceHandle *handle, uint32_t which_device)
 Gets the device unique handle.
 
AxErr __cdecl axFirmwareVersion (uint32_t *major, uint32_t *minor, uint32_t *patch, uint32_t which_device)
 Gets the device firmware version.
 
AxErr __cdecl axFPGAVersion (uint32_t *major, uint32_t *minor, uint32_t *patch, uint32_t *build, uint32_t which_device)
 Gets the device FPGA version.
 
AxErr __cdecl axDeviceType (AxDevType *device_type, uint32_t which_device)
 Gets the device type (e.g. Laser, EDAQ).
 
AxErr __cdecl axSerialNumber (char *serial_number, uint32_t which_device)
 Gets the device serial number string.
 
AxErr __cdecl axPartNumber (char *part_number, uint32_t which_device)
 Gets the device part number string.
 
AxErr __cdecl axConnectionType (AxConnectionType *connection_type, uint32_t which_device)
 Gets the device connection interface (e.g. USB, Ethernet, RS-232).
 
AxErr __cdecl axGetDeviceInfo (AxDeviceInfo *device_info, uint32_t which_device)
 Gets info about a connected device.
 
AxErr __cdecl axGetNamedData (uint32_t named_index, AxNamedDataType *named_type, AxNamedDataValue *named_value, char *field_name, uint32_t which_device)
 Retrieves a Named Data field from a connected device.
 
AxErr __cdecl axSetNamedData (uint32_t named_index, AxNamedDataType named_type, AxNamedDataValue named_value, const char *field_name, uint32_t which_device)
 Store a Named Data field on a connected device.
 
AxErr __cdecl axClearNamedData (uint32_t named_index, uint32_t which_device)
 Clears a Named Data field on a connected device.
 
AxErr __cdecl axClearAllNamedData (uint32_t which_device)
 Clears all 50 Named Data fields on a connected device.
 
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.
 
AxErr __cdecl axGetLaserEmission (uint32_t *emitting, uint32_t which_laser)
 Gets swept laser emission status.
 
AxErr __cdecl axSetPointerEmission (uint32_t emission_state, uint32_t which_laser)
 Enables or disables pointer/aiming laser emission.
 
AxErr __cdecl axGetPointerEmission (uint32_t *emitting, uint32_t which_laser)
 Gets pointer/aiming laser emission status.
 
AxErr __cdecl axSetLaserPowerUp (AxPowerUpBehavior behavior, uint32_t which_laser)
 Sets swept laser emission power-up default behavior.
 
AxErr __cdecl axGetLaserPowerUp (AxPowerUpBehavior *behavior, uint32_t which_laser)
 Gets swept laser emission power-up default behavior.
 
AxErr __cdecl axSetPointerPowerUp (AxPowerUpBehavior behavior, uint32_t which_laser)
 Sets pointer/aiming laser emission power-up default behavior.
 
AxErr __cdecl axGetPointerPowerUp (AxPowerUpBehavior *behavior, uint32_t which_laser)
 Gets pointer/aiming laser emission power-up default behavior.
 
AxErr __cdecl axSetClockDelay (uint32_t delay_code, uint32_t which_laser)
 Sets the electronic K-clock delay.
 
AxErr __cdecl axGetClockDelay (uint32_t *delay_code, uint32_t which_laser)
 Gets the currently configured electronic K-clock delay.
 
AxErr __cdecl axSetDriveConfiguration (uint32_t which_config, uint32_t which_laser)
 Selects a pre-programmed laser drive configuration.
 
AxErr __cdecl axGetDriveConfiguration (uint32_t *current_configuration, uint32_t which_laser)
 Gets the currently selected drive configuration.
 
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.
 
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).
 
AxErr __cdecl axGetLaserErrorState (uint32_t *error_bitfield, uint32_t which_laser)
 Gets the current error state of a Laser device.
 
AxErr __cdecl axGetLaserDiagnostics (uint32_t *num_of_values, float *values, char **names, uint32_t which_laser)
 Gets diagnostic values and their field names from a Laser device.
 
AxErr __cdecl axHomeVDL (uint32_t which_laser)
 Starts the VDL home operation.
 
AxErr __cdecl axStopVDL (uint32_t which_laser)
 Stops any VDL operation (e.g. move or home) currently in progress.
 
AxErr __cdecl axMoveRelVDL (float rel_position, float speed, uint32_t which_laser)
 Move the VDL relative to its current position.
 
AxErr __cdecl axMoveAbsVDL (float abs_position, float speed, uint32_t which_laser)
 Move the VDL to an absolute position.
 
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.
 
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.
 
AxErr __cdecl axSetImageSyncSource (AxEdgeSource source, float frequency, uint32_t which_DAQ)
 Select the Image_sync source.
 
AxErr __cdecl axSetBurstRecordSource (AxEdgeSource source, AxRcrdTrigBehavior behavior, uint32_t which_DAQ)
 Select the Burst Record trigger source and behavior.
 
AxErr __cdecl axSetSampleClockSource (AxEdgeSource source, uint32_t which_DAQ)
 Select the ADC sample clock source.
 
AxErr __cdecl axSetSweepTriggerSource (AxEdgeSource source, uint32_t which_DAQ)
 Select the sweep trigger source.
 
AxErr __cdecl axSetSwpTrigSrcAndEdge (AxEdgeSource source, AxSwpTrgMode trig_edge, uint32_t trig_freq_Hz, uint32_t which_DAQ)
 Select the sweep trigger source.
 
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.
 
AxErr __cdecl axSetEightBitGain (float gain, uint32_t which_DAQ)
 Set the GAIN term during 16- to 8-bit dynamic range compression.
 
AxErr __cdecl axSetEightBitOffset (float offset, uint32_t which_DAQ)
 Set the OFFSET term during 16- to 8-bit dynamic range compression.
 
AxErr __cdecl axSetSubsamplingFactor (uint8_t subsampling_factor, uint32_t which_DAQ)
 Set the A-line subsampling factor.
 
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.
 
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.
 
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.
 
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.
 
AxErr __cdecl axSetFPGARegister (uint32_t regnum, uint16_t regval, uint32_t which_DAQ)
 Sets (i.e. writes) a FPGA register with a single value.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
AxErr __cdecl axSetFPGAWindowFunc (AxChannelMode channel, AxSwpTrgMode trig_edge, 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.
 
AxErr __cdecl axCalcWindowFunc (window_func_t params, float *window_real_out, float *window_imag_out)
 Calculates a window function according to parameterized description and returns generated values to the caller.
 
AxErr __cdecl axCalcWindowFuncToFPGA (AxChannelMode channel, AxSwpTrgMode trig_edge, window_func_t params, const float *shape, float *window_real_out, float *window_imag_out, uint32_t which_DAQ)
 Calculates a window function according to parameterized description and writes it to the FPGA.
 

Detailed Description

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

Version 1.6.1

Version 1.7.0

Version 1.7.1

Version 1.8.0

Version 2.0.0

Enumeration Type Documentation

◆ AxConnectionType

Connection types (interfaces) supported by AxsunOCTControl_LW.

Enumerator
USB 

USB 2.0 interface.

RS232_PASSTHROUGH 

via DAQ's Ethernet interface.

RS232 

RS-232 serial interface.

ETHERNET 

TCP/IP Ethernet interface.

◆ AxDevType

enum AxDevType

Axsun device types supported by AxsunOCTControl_LW.

Enumerator
LASER 

Axsun Laser Engine Device.

CLDAQ 

Axsun Camera Link DAQ Device.

EDAQ 

Axsun Ethernet/PCIe DAQ Device.

AZMYTH_LASER 

Axsun Azmyth Laser Engine Device.

◆ AxNamedDataType

Available data types for Named Data field values.

Enumerator
UNINIT_TYPE 

type is uninitialized

INTEGER_TYPE 

32-bit signed integer type

BOOL_TYPE 

Boolean type

SINGLE_TYPE 

Single-precision floating point type

◆ AxPowerUpBehavior

Laser engine default/power-up behaviors.

Enumerator
OFF_AT_POWER_UP 

Laser emission disabled at power-up.

ON_AT_POWER_UP 

Laser emission enabled at power-up.

USE_DIGITAL_INPUT 

Swept laser state depends on digital input (Pin 1 on engine's Auxiliary & Interlocks connector).

LINK_TO_SWEPT_LASER 

Aiming laser emission state tracks that of swept laser

◆ AxTECState

enum AxTECState

Laser TEC states.

Enumerator
TEC_UNINITIALIZED 

TEC has not been initialized.

WARMING_UP 

TEC is stabilizing.

WAITING_IN_RANGE 

TEC is stabilizing.

READY 

TEC is ready.

NOT_INSTALLED 

TEC is not installed.

ERROR_NEVER_GOT_TO_READY 

TEC error: never got to ready state.

ERROR_WENT_OUT_OF_RANGE 

TEC error: temperature went out of range.

Function Documentation

◆ axCalcWindowFunc()

AxErr __cdecl axCalcWindowFunc ( window_func_t params,
float * window_real_out,
float * window_imag_out )

Calculates a window function according to parameterized description and returns generated values to the caller.

Parameters
[in]paramsParameters describing the complex-valued window function to be generated.
[out]window_real_outPointer to pre-allocated storage for receiving the real component of the generated window function.
[out]window_imag_outPointer to pre-allocated storage for receiving the imaginary component of the generated window function.
Returns
NO_AxERROR on success or other AxErr error code on failure.

Calling this function without pre-allocating storage for 'params.padded_width' float-sized elements for each of the window_real and the window_imag outputs is unsafe and will result in undefined behavior. This function does NOT write the generated window function to a connected DAQ FPGA; it only returns the generated window function to the caller. To write a window function to a connected DAQ FPGA, use axSetFPGAWindowFunction() to upload value arrays (such as those generated by this function) or use axCalcWindowFuncToFPGA() to write a window function based on a parameterized description in window_func_t.

◆ axCalcWindowFuncToFPGA()

AxErr __cdecl axCalcWindowFuncToFPGA ( AxChannelMode channel,
AxSwpTrgMode trig_edge,
window_func_t params,
const float * shape,
float * window_real_out,
float * window_imag_out,
uint32_t which_DAQ )

Calculates a window function according to parameterized description and writes it to the FPGA.

Parameters
[in]channelThe acquisition channels to which the written window function applies.
[in]trig_edgeThe sweep trigger edge to which the written window function applies (FALLING and DUALEDGE modes require compatible laser engine).
[in]paramsParameters describing the complex-valued window function to generate and write to the FPGA.
[in]shapePointer to an array of values used for arbitrary spectral shaping (optional).
[out]window_real_outPointer to pre-allocated storage for receiving the real component of the generated window function (optional).
[out]window_imag_outPointer to pre-allocated storage for receiving the imaginary component of the generated window function (optional).
[in]which_DAQThe numeric index of the desired DAQ or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.

After calculating the requested window function with the number of points determined by 'params.window_width', the array subsequently written to the DAQ FPGA is zero-padded to 'params.padded_width' and then rotated right by 'params.right_shift' points. For example if params.window_width = 1600, this function will add an additional 448 zeros after the requested 1600 points in order to generate a window function appropriate for the subsequent 2048-point FFT computation. Those 2048 points can be rotated right by using a non-zero value of 'params.right_shift'; this moves the center of the requested window function higher than sample number 800. The shape pointer argument must be NULL to disable spectral shaping, or otherwise refer to an array of float values with length params.window_width which will be multiplied by the requested window function magnitude. The values in the shape array must be on the interval from zero to unity [0.0, 1.0] otherwise signal distortion from numeric saturation may occur. If non-NULL pointer values are passed in window_real_out and window_imag_out, these pointers must each refer to pre-allocated storage of 'params.padded_width' float-sized elements.

◆ axClearAllNamedData()

AxErr __cdecl axClearAllNamedData ( uint32_t which_device)

Clears all 50 Named Data fields on a connected device.

Parameters
[in]which_deviceThe numeric index of the desired device or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.

◆ axClearNamedData()

AxErr __cdecl axClearNamedData ( uint32_t named_index,
uint32_t which_device )

Clears a Named Data field on a connected device.

Parameters
[in]named_indexThe numeric index of the desired Named Data field to clear. Must be on the interval from 0 to 49.
[in]which_deviceThe numeric index of the desired device or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.

◆ axCloseAxsunOCTControl()

AxErr __cdecl axCloseAxsunOCTControl ( )

Closes an AxsunOCTControl_LW session previously opened with axOpenAxsunOCTControl().

Returns
NO_AxERROR on success or other AxErr error code on failure.
Examples
AxsunOCTControl_LW_ExampleConsoleApp.cpp.

◆ axConnectionType()

AxErr __cdecl axConnectionType ( AxConnectionType * connection_type,
uint32_t which_device )

Gets the device connection interface (e.g. USB, Ethernet, RS-232).

Parameters
[out]connection_typeThe interface on which the device is connected.
[in]which_deviceThe numeric index of the desired device or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.

◆ axCountConnectedDevices()

uint32_t __cdecl axCountConnectedDevices ( )

Counts the number of devices successfully connected and enumerated by AxsunOCTControl_LW.

Returns
The number of connected devices.

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.

Examples
AxsunOCTControl_LW_ExampleConsoleApp.cpp.

◆ axDeviceType()

AxErr __cdecl axDeviceType ( AxDevType * device_type,
uint32_t which_device )

Gets the device type (e.g. Laser, EDAQ).

Parameters
[out]device_typeThe type of device.
[in]which_deviceThe numeric index of the desired device or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.

◆ axFirmwareVersion()

AxErr __cdecl axFirmwareVersion ( uint32_t * major,
uint32_t * minor,
uint32_t * patch,
uint32_t which_device )

Gets the device firmware version.

Parameters
[out]majorVersion number major element.
[out]minorVersion number minor element.
[out]patchVersion number patch element.
[in]which_deviceThe numeric index of the desired device or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.

◆ axFPGAVersion()

AxErr __cdecl axFPGAVersion ( uint32_t * major,
uint32_t * minor,
uint32_t * patch,
uint32_t * build,
uint32_t which_device )

Gets the device FPGA version.

Parameters
[out]majorVersion number major element.
[out]minorVersion number minor element.
[out]patchVersion number patch element.
[out]buildVersion number build element.
[in]which_deviceThe numeric index of the desired device or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.

Devices which do not have an FPGA will return all version elements = 0.

◆ axGetClockDelay()

AxErr __cdecl axGetClockDelay ( uint32_t * delay_code,
uint32_t which_laser )

Gets the currently configured electronic K-clock delay.

Parameters
[out]delay_codeWill contain a 6-bit code representing the configured delay value.
[in]which_laserThe numeric index of the desired Laser or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.

See details for axSetClockDelay().

◆ axGetDeviceHandle()

AxErr __cdecl axGetDeviceHandle ( AxDeviceHandle * handle,
uint32_t which_device )

Gets the device unique handle.

Parameters
[out]handleThe unique handle for the device.
[in]which_deviceThe numeric index of the desired device.

The handle can also be used as the "which_device", "which_laser", or "which_DAQ" argument in all other library calls that address a specific connected device. If a device disconnects and then reconnects, it will be assigned a new unique handle.

Returns
NO_AxERROR on success or other AxErr error code on failure.

◆ axGetDeviceInfo()

AxErr __cdecl axGetDeviceInfo ( AxDeviceInfo * device_info,
uint32_t which_device )

Gets info about a connected device.

Parameters
[out]device_infoInformation about the desired device.
[in]which_deviceThe numeric index of the desired device or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.
Examples
AxsunOCTControl_LW_ExampleConsoleApp.cpp.

◆ axGetDriveConfiguration()

AxErr __cdecl axGetDriveConfiguration ( uint32_t * current_configuration,
uint32_t which_laser )

Gets the currently selected drive configuration.

Parameters
[out]current_configurationThe currently selected drive configuration.
[in]which_laserThe numeric index of the desired Laser or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.

Laser Engines must be programmed during manufacture to support multiple drive configurations. Contact Axsun technical support for more information.

◆ axGetElapsedTimers()

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.

Parameters
[out]cum_emission_secNumber of seconds elapsed with laser in emission-on state (cumulative lifetime).
[out]cum_system_secNumber of seconds elapsed with engine in powered-on state (cumulative lifetime).
[out]uptime_msecNumber of milliseconds elapsed in current session (since last power-up).
[in]which_laserThe numeric index of the desired Laser or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.

◆ axGetErrorExplained()

void __cdecl axGetErrorExplained ( AxErr errornum,
char * error_string )

Gets a string which explains an error code in a more verbose fashion.

Parameters
[in]errornumAn error code number returned from other "ax" functions in this library.
[out]error_stringA char array pre-allocated with at least 512 bytes into which the error explanation will be copied as a nul-terminated string.
Returns
n/a

axGetErrorExplained() can be called at any time. It is unsafe to pass a error_string output buffer allocated with fewer than 512 bytes.

Examples
AxsunOCTControl_LW_ExampleConsoleApp.cpp.

◆ axGetFPGARegister()

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.

Parameters
[in]regnumThe FPGA register number to read.
[out]regvalThe value read back from the FPGA register.
[in]which_DAQThe numeric index of the desired DAQ or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.

◆ axGetFPGARegisterDefaults()

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.

Parameters
[in]elements_allocatedIndicates the size (in number of U16 elements, NOT bytes) of the pre-allocated regnums and regvals arrays.
[out]regnumsPointer to a pre-allocated array to hold the 16-bit register numbers read back from the device.
[out]regvalsPointer to a pre-allocated array to hold the 16-bit register values read back from the device.
[out]elements_returnedThe number of register number-value pairs read back from the device.
[in]which_DAQThe numeric index of the desired DAQ or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.

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).

◆ axGetFPGARegisterRange()

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.

Parameters
[in]start_regnumThe first FPGA register to read in the range.
[in]end_regnumThe last FPGA register to read in the range; must be greater than or equal to start_regnum.
[out]regvalsPointer to a pre-allocated array to hold the 16-bit register values read back from the requested range of FPGA registers.
[in]bytes_allocatedThe number of bytes pre-allocated by the user in the array pointed to by regvals.
[in]which_DAQThe numeric index of the desired DAQ or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.

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).

Examples
AxsunOCTControl_LW_ExampleConsoleApp.cpp.

◆ axGetLaserDiagnostics()

AxErr __cdecl axGetLaserDiagnostics ( uint32_t * num_of_values,
float * values,
char ** names,
uint32_t which_laser )

Gets diagnostic values and their field names from a Laser device.

Parameters
[out]num_of_valuesTotal number of diagnostic value fields returned by the laser (maxiumum of 40 fields).
[out]valuesPointer to a pre-allocated array of 40 floats into which diagnostic values will be copied.
[out]namesPointer to a pre-allocated array of 40 pointers, each representing a pre-allocated array of 40 single-byte characters, into which nul-terminated field name strings will be copied (or pass NULL if field name query isn't needed).
[in]which_laserThe numeric index of the desired Laser or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.

Contact Axsun technical support to interpret laser diagnostic information. Only the first "num_of_values" elements referenced by the "values" and "names" pointer arguments will contain valid data after successfully calling this function.

◆ axGetLaserEmission()

AxErr __cdecl axGetLaserEmission ( uint32_t * emitting,
uint32_t which_laser )

Gets swept laser emission status.

Parameters
[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_laserThe numeric index of the desired Laser or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.

◆ axGetLaserErrorState()

AxErr __cdecl axGetLaserErrorState ( uint32_t * error_bitfield,
uint32_t which_laser )

Gets the current error state of a Laser device.

Parameters
[out]error_bitfieldCurrent error state of the laser.
[in]which_laserThe numeric index of the desired Laser or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.

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.

◆ axGetLaserPowerUp()

AxErr __cdecl axGetLaserPowerUp ( AxPowerUpBehavior * behavior,
uint32_t which_laser )

Gets swept laser emission power-up default behavior.

Parameters
[out]behaviorThe currently configured power-up behavior
[in]which_laserThe numeric index of the desired Laser or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.

◆ axGetLibusbVersion()

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().

Parameters
[out]majorVersion number major element.
[out]minorVersion number minor element.
[out]patchVersion number patch element.
[out]buildVersion number build element.
Returns
NO_AxERROR on success or HOSTSIDE_USB_ERROR if the USB interface has not yet been opened.
Examples
AxsunOCTControl_LW_ExampleConsoleApp.cpp.

◆ axGetLWBuildCfg()

int32_t __cdecl axGetLWBuildCfg ( )

Get the build configuration of the AxsunOCTControl_LW library.

Returns
= a bitfield with information about the build configuration options used to compile the loaded library. \ Bit 0: = 0 for 'debug' configuration or = 1 for 'release' configuration \ Bit 1: (for internal use only) \ Bit 2: = 0 for non-verbose mode or = 1 for verbose logging mode
Examples
AxsunOCTControl_LW_ExampleConsoleApp.cpp.

◆ axGetLWBuildDateTime()

int32_t __cdecl axGetLWBuildDateTime ( char * datetime_str)

Get a string describing the time and date that the AxsunOCTControl_LW library was built.

Parameters
[out]datetime_strA 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.
Returns
The number of characters (bytes) written into the datetime_str buffer, not including the trailing nul.

It is unsafe to pass a datetime_str output buffer allocated with fewer than 100 bytes.

Deprecated
This function may be removed in future versions. Use the safer alternative axLWBuildDateTime().

◆ axGetNamedData()

AxErr __cdecl axGetNamedData ( uint32_t named_index,
AxNamedDataType * named_type,
AxNamedDataValue * named_value,
char * field_name,
uint32_t which_device )

Retrieves a Named Data field from a connected device.

Parameters
[in]named_indexThe numeric index of the desired Named Data field to retrieve. Must be on the interval from 0 to 49.
[out]named_typePopulated with the type of the value retrieved.
[out]named_valueA C union populated with the retrieved Named Data field's value.
[out]field_namePopulated with the name of retrived Named Data field.
[in]which_deviceThe numeric index of the desired device or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.

Device firmware has storage for 50 Named Data fields (indexed from 0 to 49) which have an associated name string, type (int, bool, or float), and value. Named Data is non-volatile storage available for users to store information according to their needs using axSetNamedData(). If the retrieved named_type is UNINIT_TYPE then a valid value has not been stored at that named_index, otherwise use the named_type argument to interpret the valid member of the retrieved named_value union. The field_name argument must point to a pre-allocated buffer of at least 61 bytes (60 characters in the name plus a terminating nul character) or undefined behavior will result.

◆ axGetPointerEmission()

AxErr __cdecl axGetPointerEmission ( uint32_t * emitting,
uint32_t which_laser )

Gets pointer/aiming laser emission status.

Parameters
[out]emittingWill be non-zero if pointer/aiming laser is emitting or =0 if pointer/aiming laser is not emitting.
[in]which_laserThe numeric index of the desired Laser or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.

◆ axGetPointerPowerUp()

AxErr __cdecl axGetPointerPowerUp ( AxPowerUpBehavior * behavior,
uint32_t which_laser )

Gets pointer/aiming laser emission power-up default behavior.

Parameters
[out]behaviorThe currently configured power-up behavior
[in]which_laserThe numeric index of the desired Laser or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.

◆ axGetTECState()

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).

Parameters
[out]TEC_stateCurrent state of the queried laser TEC as described by the AxsunOCTControl_LW::TECState enum.
[in]which_TECThe index of which TEC to query (1 or 2).
[in]which_laserThe numeric index of the desired Laser or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.

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.

Examples
AxsunOCTControl_LW_ExampleConsoleApp.cpp.

◆ axGetVDLStatus()

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.

Parameters
[out]current_posCurrent VDL position (mm).
[out]target_posTarget VDL position (mm). Will be different than the current position during a move or home operation.
[out]speedCurrent speed of VDL (mm/sec).
[out]error_from_last_homeAccumulated error since last home operation (number of microsteps).
[out]last_move_timeTime for last move operation (milliseconds).
[out]stateInteger codes to represent VDL state.
  • 1 = idle
  • 2 = moving
  • 3 = seeking home
  • 4 = backing off home
  • 5 = at home
  • 10 = error state
[out]home_switchNon-zero if home (minimum position) limit switch is activated, =0 otherwise.
[out]limit_switchNon-zero if maximum position limit switch is activated, =0 otherwise.
[out]VDL_errorDebugging information for VDL errors.
[in]which_laserThe numeric index of the desired Laser or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.

◆ axHomeVDL()

AxErr __cdecl axHomeVDL ( uint32_t which_laser)

Starts the VDL home operation.

Parameters
[in]which_laserThe numeric index of the desired Laser or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.

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.

Examples
AxsunOCTControl_LW_ExampleConsoleApp.cpp.

◆ axImagingCntrlEthernet()

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.

Parameters
[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 subsequent Burst Record operation.
[in]which_DAQThe numeric index of the desired DAQ or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.

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. When number_of_images >0, this function starts the Burst Record operation immediately if the trigger mode is set to SOFTWARE_RECORD_TRIGGER by the axSetBurstRecordSource() function.

Examples
AxsunOCTControl_LW_ExampleConsoleApp.cpp.

◆ axLibraryVersion()

AxErr __cdecl axLibraryVersion ( uint32_t * major,
uint32_t * minor,
uint32_t * patch,
uint32_t * build )

Gets the AxsunOCTControl_LW library version as numeric elements.

Parameters
[out]majorVersion number major element.
[out]minorVersion number minor element.
[out]patchVersion number patch element.
[out]buildVersion number build element.
Returns
NO_AxERROR on success.

◆ axLWBuildDateTime()

const char * axLWBuildDateTime ( )

Get a string describing the time and date that the AxsunOCTControl_LW library was built.

Returns
A nul-terminated UTF-8 encoded char string representing the build date & time.
Examples
AxsunOCTControl_LW_ExampleConsoleApp.cpp.

◆ axLWLibVersion()

const char * axLWLibVersion ( )

Get a string describing the AxsunOCTControl_LW library version.

Returns
A nul-terminated UTF-8 encoded char string representing the library version.
Examples
AxsunOCTControl_LW_ExampleConsoleApp.cpp.

◆ axMoveAbsVDL()

AxErr __cdecl axMoveAbsVDL ( float abs_position,
float speed,
uint32_t which_laser )

Move the VDL to an absolute position.

Parameters
[in]abs_positionThe new desired position in mm.
[in]speedThe speed at which to move in mm/sec.
[in]which_laserThe numeric index of the desired Laser or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.

◆ axMoveRelVDL()

AxErr __cdecl axMoveRelVDL ( float rel_position,
float speed,
uint32_t which_laser )

Move the VDL relative to its current position.

Parameters
[in]rel_positionThe distance to move from the current position in mm.
[in]speedThe speed at which to move in mm/sec.
[in]which_laserThe numeric index of the desired Laser or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.

◆ axNetworkInterfaceOpen()

AxErr __cdecl axNetworkInterfaceOpen ( uint32_t interface_status)

Opens, resets, or closes the Ethernet network interface.

Parameters
[in]interface_status=1 opens the interface or resets an existing open interface, =0 closes the interface.
Returns
NO_AxERROR on success or other AxErr error code on failure.

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.

Examples
AxsunOCTControl_LW_ExampleConsoleApp.cpp.

◆ axOpenAxsunOCTControl()

AxErr __cdecl axOpenAxsunOCTControl ( uint32_t open_all_interfaces)

Opens the AxsunOCTControl_LW session.

Parameters
[in]open_all_interfacesIf TRUE the USB and Ethernet interfaces will be started automatically. If FALSE no interfaces will be started.
Returns
NO_AxERROR on success or other AxErr error code on failure.

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.

◆ axPartNumber()

AxErr __cdecl axPartNumber ( char * part_number,
uint32_t which_device )

Gets the device part number string.

Parameters
[out]part_numberA char array pre-allocated with at least 201 bytes into which the device part number will be copied as a nul-terminated string.
[in]which_deviceThe numeric index of the desired device or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.

◆ axRegCallbackConnectOnly()

AxErr __cdecl axRegCallbackConnectOnly ( AxCallbackConnectOrDisconnect_t callback_function,
void * userData )

Registers a callback function to be executed following a device connection event.

Parameters
[in]callback_functionA user-supplied function to be called.
[in]userDataAn arbitrary structure to be made available inside the callback function (or NULL if unused).
Returns
NO_AxERROR on success or other AxErr error code on failure.

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.

Examples
AxsunOCTControl_LW_ExampleConsoleApp.cpp.

◆ axRegCallbackDisconnectOnly()

AxErr __cdecl axRegCallbackDisconnectOnly ( AxCallbackConnectOrDisconnect_t callback_function,
void * userData )

Registers a callback function to be executed following a device disconnection event.

Parameters
[in]callback_functionA user-supplied function to be called.
[in]userDataAn arbitrary structure to be made available inside the callback function (or NULL if unused).
Returns
NO_AxERROR on success or other AxErr error code on failure.

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.

Examples
AxsunOCTControl_LW_ExampleConsoleApp.cpp.

◆ axRegisterConnectCallback()

AxErr __cdecl axRegisterConnectCallback ( AxConnectCallbackFunctionC_t callback_function,
void * userData )

Registers a callback function to be executed following a device connection or disconnection event.

Parameters
[in]callback_functionA user-supplied function to be called.
[in]userDataAn arbitrary structure to be made available inside the callback function (or NULL if unused).
Returns
NO_AxERROR on success or other AxErr error code on failure.

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.

◆ axRegisterLabVIEWCallback()

AxErr __cdecl axRegisterLabVIEWCallback ( uint32_t * refnumptr)

Registers a LabVIEW user event to be executed following a device connection or disconnection event.

Parameters
[in]refnumptrA refnum pointer of a LabVIEW user event.
Returns
NO_AxERROR on success or other AxErr error code on failure.

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.

◆ axSerialInterfaceOpen()

AxErr __cdecl axSerialInterfaceOpen ( uint32_t interface_status,
const char * port )

Opens, resets, or closes a RS-232 serial interface on a given port.

Parameters
[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]portNul-terminated char array describing the name of the port (e.g. typically "COM_" on Windows or "/dev/tty.___" on Linux/macOS; UTF8-encoded)
Returns
NO_AxERROR on success or other AxErr error code on failure.

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).

◆ axSerialNumber()

AxErr __cdecl axSerialNumber ( char * serial_number,
uint32_t which_device )

Gets the device serial number string.

Parameters
[out]serial_numberA 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_deviceThe numeric index of the desired device or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.

◆ axSetBurstRecordSource()

AxErr __cdecl axSetBurstRecordSource ( AxEdgeSource source,
AxRcrdTrigBehavior behavior,
uint32_t which_DAQ )

Select the Burst Record trigger source and behavior.

Parameters
[in]sourceThe desired Burst Record trigger source.
[in]behaviorThe desired Burst Record trigger behavior (for externally triggered sources).
[in]which_DAQThe numeric index of the desired DAQ or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.

When source is set to INTERNAL the axImagingCntrlEthernet() function is used to start the Burst Record operation, otherwise the Burst Record is controlled by the external source as configured. The trigger source should NOT be configured to use the same external input as axSetImageSyncSource() configures for the Image_sync trigger source.

◆ axSetClockDelay()

AxErr __cdecl axSetClockDelay ( uint32_t delay_code,
uint32_t which_laser )

Sets the electronic K-clock delay.

Parameters
[in]delay_codeA 6-bit code representing the desired delay value.
[in]which_laserThe numeric index of the desired Laser or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.

Discussion of the delay_code value can be found at https://docs.axsun.com (OCT Host page, Clock Delay subsection)

◆ axSetDriveConfiguration()

AxErr __cdecl axSetDriveConfiguration ( uint32_t which_config,
uint32_t which_laser )

Selects a pre-programmed laser drive configuration.

Parameters
[in]which_configThe desired configuration number (0, 1, 2, or 3).
[in]which_laserThe numeric index of the desired Laser or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.

Laser Engines must be programmed during manufacture to support multiple drive configurations. Contact Axsun technical support for more information.

◆ axSetEightBitGain()

AxErr __cdecl axSetEightBitGain ( float gain,
uint32_t which_DAQ )

Set the GAIN term during 16- to 8-bit dynamic range compression.

Parameters
[in]gainGain must be between 0 and 15.999756.
[in]which_DAQThe numeric index of the desired DAQ or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.

◆ axSetEightBitOffset()

AxErr __cdecl axSetEightBitOffset ( float offset,
uint32_t which_DAQ )

Set the OFFSET term during 16- to 8-bit dynamic range compression.

Parameters
[in]offsetOffset must be between -128.0 and 127.996094.
[in]which_DAQThe numeric index of the desired DAQ or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.

◆ axSetFPGADataArray()

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.

Parameters
[in]regnumThe FPGA register number in which to write.
[in]data_arrayPointer to an array containing 16-bit values to be written.
[in]number_of_wordsThe number of 16-bit register values pointed to by data_array.
[in]which_DAQThe numeric index of the desired DAQ or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.
Examples
AxsunOCTControl_LW_ExampleConsoleApp.cpp.

◆ axSetFPGARegister()

AxErr __cdecl axSetFPGARegister ( uint32_t regnum,
uint16_t regval,
uint32_t which_DAQ )

Sets (i.e. writes) a FPGA register with a single value.

Parameters
[in]regnumThe FPGA register number in which to write.
[in]regvalThe value to be written.
[in]which_DAQThe numeric index of the desired DAQ or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.

◆ axSetFPGARegisterDefaults()

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.

Parameters
[in]regnumsPointer to an array containing 16-bit register numbers.
[in]regvalsPointer to an array containing 16-bit register values.
[in]countThe number of register number-value pairs to be written to the device.
[in]which_DAQThe numeric index of the desired DAQ or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.

regnums points to an array containing count register numbers and regvals points to an equal-sized array of corresponding register default values.

◆ axSetFPGARegisterMasked()

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.

Parameters
[in]regnumThe FPGA register number in which to write.
[in]regvalThe value to be written, subject to the provided bitmask.
[in]bitmaskA mask indicating which bits to write (1) and which to leave unaffected (0).
[in]which_DAQThe numeric index of the desired DAQ or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.

◆ axSetFPGARegisterSingleBit()

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.

Parameters
[in]regnumThe FPGA register number in which to set or clear a bit.
[in]which_bitThe 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_DAQThe numeric index of the desired DAQ or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.

◆ axSetFPGARegisterSingleByte()

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.

Parameters
[in]regnumThe FPGA register number in which to write.
[in]which_byteSet to = 0 for low byte, = 1 for high byte.
[in]valueThe value to be written (must be in range of 0 to 255).
[in]which_DAQThe numeric index of the desired DAQ or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.

◆ axSetFPGARegisterSingleNibble()

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.

Parameters
[in]regnumThe FPGA register number in which to write.
[in]which_nibbleSet to = 0 for lowest nibble, ... , = 3 for highest nibble.
[in]valueThe value to be written (must be in range of 0 to 15).
[in]which_DAQThe numeric index of the desired DAQ or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.

◆ axSetFPGAWindowFunc()

AxErr __cdecl axSetFPGAWindowFunc ( AxChannelMode channel,
AxSwpTrgMode trig_edge,
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.

Parameters
[in]channelThe acquisition channels to which the written window function applies.
[in]trig_edgeThe sweep trigger edge to which the written window function applies (FALLING and DUALEDGE modes require compatible laser engine).
[in]window_realPointer to an array containing the real component of the window function.
[in]window_imagPointer to an array containing the imaginary component of the window function.
[in]window_lengthThe length of the window function (i.e. the number of elements in each array describing its real and imaginary components).
[in]which_DAQThe numeric index of the desired DAQ or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.

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.

◆ axSetFPGAWindowFunction()

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.

Parameters
[in]channelThe acquisition channels to which the window function is written.
[in]window_realPointer to an array containing the real component of the window function.
[in]window_imagPointer to an array containing the imaginary component of the window function.
[in]window_lengthThe length of the window function (i.e. the number of elements in each array describing its real and imaginary components).
[in]which_DAQThe numeric index of the desired DAQ or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.

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.

Deprecated
This function may be removed in future versions. Use the alternative axSetFPGAWindowFunc().

◆ axSetImageSyncSource()

AxErr __cdecl axSetImageSyncSource ( AxEdgeSource source,
float frequency,
uint32_t which_DAQ )

Select the Image_sync source.

Parameters
[in]sourceThe desired Image_sync source. Must be either INTERNAL, LVCMOS, LVDS, or INTERNAL_SYNC.
[in]frequencyThe 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_DAQThe numeric index of the desired DAQ or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.

Use INTERNAL or INTERNAL_SYNC Image_sync source only for simulation and troubleshooting. INTERNAL_SYNC requires FPGA version 6.71.0.42 or later. The source should NOT be configured to use the same external input as axSetBurstRecordSource() configures for the Burst Record trigger source.

◆ axSetLaserEmission()

AxErr __cdecl axSetLaserEmission ( uint32_t emission_state,
uint32_t which_laser )

Enables or disables swept laser emission.

Parameters
[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_laserThe numeric index of the desired Laser or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.
Examples
AxsunOCTControl_LW_ExampleConsoleApp.cpp.

◆ axSetLaserPowerUp()

AxErr __cdecl axSetLaserPowerUp ( AxPowerUpBehavior behavior,
uint32_t which_laser )

Sets swept laser emission power-up default behavior.

Parameters
[in]behaviorThe desired power-up behavior
[in]which_laserThe numeric index of the desired Laser or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.

Saves setting to non-volatile RAM. Restart engine to observe selected power-upbehavior.

◆ axSetNamedData()

AxErr __cdecl axSetNamedData ( uint32_t named_index,
AxNamedDataType named_type,
AxNamedDataValue named_value,
const char * field_name,
uint32_t which_device )

Store a Named Data field on a connected device.

Parameters
[in]named_indexThe numeric index of the desired Named Data field to store. Must be on the interval from 0 to 49.
[in]named_typeThe type of the Named Data value.
[in]named_valueA C union containing the Named Data field's value.
[in]field_nameThe name of the stored Named Data field (truncated to 60 characters).
[in]which_deviceThe numeric index of the desired device or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.

Device firmware has storage for 50 Named Data fields (indexed from 0 to 49) which have an associated name string, type (int, bool, or float), and value. Named Data is non-volatile storage available for users to store information according to their needs and can be retrieved with axGetNamedData() or cleared with axClearNamedData().

◆ axSetPipelineMode()

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.

Parameters
[in]pipeline_modeThe desired pipeline mode.
[in]polarization_modeThe desired polarization channel (horizontal, vertical, diverse, or interleaved).
[in]which_DAQThe numeric index of the desired DAQ or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.

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.

Examples
AxsunOCTControl_LW_ExampleConsoleApp.cpp.

◆ axSetPointerEmission()

AxErr __cdecl axSetPointerEmission ( uint32_t emission_state,
uint32_t which_laser )

Enables or disables pointer/aiming laser emission.

Parameters
[in]emission_state=1 enables pointer/aiming laser emission, =0 disables pointer/aiming laser emission.
[in]which_laserThe numeric index of the desired Laser or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.

◆ axSetPointerPowerUp()

AxErr __cdecl axSetPointerPowerUp ( AxPowerUpBehavior behavior,
uint32_t which_laser )

Sets pointer/aiming laser emission power-up default behavior.

Parameters
[in]behaviorThe desired power-up behavior
[in]which_laserThe numeric index of the desired Laser or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.

Saves setting to non-volatile RAM. Restart engine to observe selected power-up behavior.

◆ axSetSampleClockSource()

AxErr __cdecl axSetSampleClockSource ( AxEdgeSource source,
uint32_t which_DAQ )

Select the ADC sample clock source.

Parameters
[in]sourceThe desired sample clock source. Must be either EXTERNAL (Laser k-clock) or INTERNAL (500 MS/s).
[in]which_DAQThe numeric index of the desired DAQ or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.

Use INTERNAL sample clock source only for simulation and troubleshooting.

◆ axSetSubsamplingFactor()

AxErr __cdecl axSetSubsamplingFactor ( uint8_t subsampling_factor,
uint32_t which_DAQ )

Set the A-line subsampling factor.

Parameters
[in]subsampling_factorSubsampling factor must be between 1 and 166.
[in]which_DAQThe numeric index of the desired DAQ or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.

◆ axSetSweepTriggerSource()

AxErr __cdecl axSetSweepTriggerSource ( AxEdgeSource source,
uint32_t which_DAQ )

Select the sweep trigger source.

Parameters
[in]sourceThe desired sweep trigger source. Must be EXTERNAL (from Laser Engine) or INTERNAL (for simulation purposes).
[in]which_DAQThe numeric index of the desired DAQ or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.
Deprecated
This function may be removed in future versions. Use the alternative axSetSwpTrigSrcAndEdge().

◆ axSetSwpTrigSrcAndEdge()

AxErr __cdecl axSetSwpTrigSrcAndEdge ( AxEdgeSource source,
AxSwpTrgMode trig_edge,
uint32_t trig_freq_Hz,
uint32_t which_DAQ )

Select the sweep trigger source.

Parameters
[in]sourceThe desired sweep trigger source. Must be EXTERNAL (from Laser Engine) or INTERNAL (for simulation purposes).
[in]trig_edgeThe desired sweep trigger edge (FALLING and DUALEDGE modes require compatible laser engine).
[in]trig_freq_HzThe desired INTERNAL sweep trigger frequency in Hz (not applicable for EXTERNAL trigger source).
[in]which_DAQThe numeric index of the desired DAQ or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.

◆ axStopVDL()

AxErr __cdecl axStopVDL ( uint32_t which_laser)

Stops any VDL operation (e.g. move or home) currently in progress.

Parameters
[in]which_laserThe numeric index of the desired Laser or the device unique handle.
Returns
NO_AxERROR on success or other AxErr error code on failure.

◆ axUSBInterfaceOpen()

AxErr __cdecl axUSBInterfaceOpen ( uint32_t interface_status)

Opens, resets, or closes the USB interface.

Parameters
[in]interface_status=1 opens the interface or resets an existing open interface, =0 closes the interface.
Returns
NO_AxERROR on success or other AxErr error code on failure.

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.

Examples
AxsunOCTControl_LW_ExampleConsoleApp.cpp.