AxsunOCTCapture 3.8.2
Captures and buffers streamed imaged data from the Axsun Ethernet/PCIe DAQ and displays or retrieves images to a client application on request.
|
This header file contains all exported function prototypes, structures, and enums necessary for integrating AxsunOCTCapture into a client application. More...
#include "AxsunCommonEnums.h"
Go to the source code of this file.
Data Structures | |
struct | scan_params_t |
Structure for passing raster scan pattern parameters to axScanCmd(SET_RECT_PATTERN, ...). More... | |
struct | ext_pattern_t |
Structure for passing a user-generated scan pattern to axScanCmd(LOAD_EXT_PATTERN, ...). More... | |
struct | request_prefs_t |
Structure for image request preferences. More... | |
struct | export_prefs_t |
Structure for image export preferences (movie functionality requires installation of OpenCV). More... | |
struct | axpacket_t |
Structure for packet metadata (for internal use.) More... | |
struct | image_info_t |
Structure for conveying metadata information about an image. More... | |
struct | new_image_callback_data_t |
Structure for data made available to user in a new image callback event via registered AxNewImageCallbackFunction_t. More... | |
struct | span_t |
A construct similar in functionality to std::span (non-owning memory address with size). More... | |
Macros | |
#define | MOST_RECENT_IMAGE 0 |
Typedefs | |
typedef struct CaptureSession * | AOChandle |
Axsun OCT Capture handle - a pointer to the opaque structure used to manage created capture sessions. | |
typedef enum AxDimension | AxDimension |
Dimension for sectioning data cube with axRequestCutPlane(). | |
typedef enum AxColormap | AxColormap |
Available colormaps to select using axSelectColormap(). | |
typedef enum AxFileType | AxFileType |
Available file types to export using axExportImages() and axExportImagesAdv(). | |
typedef enum AxRequestMode | AxRequestMode |
Available request modes to define behavior of axRequestImageAdv(). | |
typedef enum AxDAQEvent | AxDAQEvent |
Types of transitions in DAQ's operational mode, conveyed via user callback function. See axRegisterDAQCallback() for usage. | |
typedef enum AxInterface | AxInterface |
Available capture interfaces to be selected by axSelectInterface(). | |
typedef enum AxWindowLinkage | AxWindowLinkage |
Available linkage behaviors for OpenGL display windows to be selected by axLinkWindows(). See https://docs.microsoft.com for more information on Windows OS window relationship concepts like Parent-Child and Ownership. | |
typedef enum AxScannerCommand | AxScannerCommand |
Available scanner command types to be executed by axScanCmd(). | |
typedef struct scan_params_t | scan_params_t |
Structure for passing raster scan pattern parameters to axScanCmd(SET_RECT_PATTERN, ...). | |
typedef struct ext_pattern_t | ext_pattern_t |
Structure for passing a user-generated scan pattern to axScanCmd(LOAD_EXT_PATTERN, ...). | |
typedef struct request_prefs_t | request_prefs_t |
Structure for image request preferences. | |
typedef struct export_prefs_t | export_prefs_t |
Structure for image export preferences (movie functionality requires installation of OpenCV). | |
typedef struct axpacket_t | axpacket_t |
Structure for packet metadata (for internal use.) | |
typedef struct image_info_t | image_info_t |
Structure for conveying metadata information about an image. | |
typedef struct new_image_callback_data_t | new_image_callback_data_t |
Structure for data made available to user in a new image callback event via registered AxNewImageCallbackFunction_t. | |
typedef struct span_t | span_t |
A construct similar in functionality to std::span (non-owning memory address with size). | |
typedef void(__cdecl * | AxNewImageCallbackFunction_t) (new_image_callback_data_t, void *) |
A user-provided function to be called when a new image is enqueued in the Main Image Buffer. See axRegisterNewImageCallback() for usage. | |
typedef void(__cdecl * | AxConnectScannerCallbackFunction_t) (void *) |
A user-provided function to be called upon connection or disconnection of a NI-DAQmx device. See axRegisterScannerConnectCallback() for usage. | |
typedef void(__cdecl * | AxCallbackFunction_t) (int32_t, void *) |
A generic user-provided callback function with a signed int and void* argument. See axRegisterExportCallback(), or axRegisterDAQCallback() for usage. | |
Functions | |
AxErr __cdecl | axStartSession (AOChandle *session, float capacity_MB) |
Start an Axsun DAQ imaging session by allocating memory for the Main Image Buffer. More... | |
AxErr __cdecl | axSelectInterface (AOChandle session, AxInterface which_interface) |
Select the data interface (Ethernet, PCIe, or none) for the capture session. More... | |
AxErr __cdecl | axGetSelectedInterface (AOChandle session, AxInterface *selected_interface) |
Queries the currently selected data interface (Ethernet, PCIe, or none) for the capture session. More... | |
AxErr __cdecl | axStopSession (AOChandle session) |
Stop a capture session and deallocate all resources, including Main Image Buffer and interfaces. More... | |
void __cdecl | axGetErrorString (AxErr errorcode, char *message_out) |
Get a description of a specific AxErr error code. More... | |
AxErr __cdecl | axGetMessage (AOChandle session, char *message_out) |
Get a description of the capture session's interface status. More... | |
AxErr __cdecl | axGetStatus (AOChandle session, uint32_t *imaging, uint32_t *last_packet_in, uint32_t *last_frame_in, uint32_t *last_image_in, uint32_t *dropped_packets, uint32_t *frames_since_sync) |
Get imaging mode status and Main Image Buffer statistics. More... | |
AxErr __cdecl | axGetDataRate (AOChandle session, double *datarate_Mbps) |
Get data transfer rate on the active interface. More... | |
AxErr __cdecl | axGetImageRate (AOChandle session, int32_t *images_per_second) |
Get the rate of new images being enqueued in the main image buffer. More... | |
AxErr __cdecl | axGetImageInfo (AOChandle session, uint32_t requested_image, image_info_t *image_info) |
Get information on an image in the Main Image Buffer. More... | |
AxErr __cdecl | axGetImageInfoAdv (AOChandle session, int64_t requested_image_number, uint32_t *returned_image_number, int32_t *height, int32_t *width, AxDataType *data_type_out, uint32_t *required_buffer_size, uint8_t *force_trig, uint8_t *trig_too_fast) |
Advanced function for getting information on an image in the Main Image Buffer. More... | |
AxErr __cdecl | axRequestImage (AOChandle session, uint32_t requested_image, request_prefs_t prefs, uint32_t output_buf_len, uint8_t *image_data_out, image_info_t *image_info) |
Retrieve and/or display an image from the Main Image Buffer. More... | |
AxErr __cdecl | axRequestImagePointer (AOChandle session, uint32_t requested_image, image_info_t *image_info, span_t *part1, span_t *part2) |
Retrieve a pointer to an image in the Main Image Buffer (non-compressed images only). More... | |
AxErr __cdecl | axRequestImageAdv (AOChandle session, int64_t requested_image_number, uint8_t *image_data_out, axpacket_t *metadata_out, int32_t *height, int32_t *width, AxDataType *data_type_out, uint32_t output_buf_len, request_prefs_t prefs, uint8_t *force_trig, uint8_t *trig_too_fast) |
Advanced function for retrieving and/or displaying an image from the Main Image Buffer. More... | |
AxErr __cdecl | axGetFrameInfoAdv (AOChandle session, int64_t requested_frame_number, uint32_t *returned_frame_number, int32_t *height, int32_t *width, AxDataType *data_type_out, uint32_t *required_buffer_size) |
Get information on a frame in the Main Image Buffer (A frame is 256 A-scans, unsynchronized with Image_sync signal). More... | |
AxErr __cdecl | axRequestFrameAdv (AOChandle session, int64_t requested_frame_number, uint8_t *frame_data_out, axpacket_t *metadata_out, int32_t *height, int32_t *width, AxDataType *data_type_out, uint32_t output_buf_len) |
Retrieve a frame from the Main Image Buffer (A frame is 256 A-scans, unsynchronized with Image_sync signal). More... | |
AxErr __cdecl | axGetCompressedJPEGInfo (AOChandle session, int64_t requested_frame_number, uint32_t *returned_frame_number, uint32_t *required_buffer_size) |
Get un-decompressed size information on a compressed JPEG frame in the Main Image Buffer (A frame is 256 A-scans, unsynchronized with Image_sync signal). More... | |
AxErr __cdecl | axRequestCompressedJPEG (AOChandle session, int64_t requested_frame_number, uint8_t *JPEG_data_out, axpacket_t *metadata_out, uint32_t output_buf_len) |
Retrieve an un-decompressed JPEG frame from the Main Image Buffer (A frame is 256 A-scans, unsynchronized with Image_sync signal). More... | |
AxErr __cdecl | axSetupDisplay (AOChandle session, uint8_t window_style, int32_t w_left, int32_t w_top, int32_t w_width, int32_t w_height, uintptr_t linked_window_handle) |
Setup an OpenGL display window for direct rendering of image data. (Windows OS only) More... | |
AxErr __cdecl | axCountWindows (AOChandle session, int32_t *num_of_windows) |
Count the number of OpenGL display windows currently created. (Windows OS only) More... | |
AxErr __cdecl | axUpdateWindowStyle (AOChandle session, int32_t which_window, uint8_t window_style) |
Change the OpenGL display window style. (Windows OS only) More... | |
AxErr __cdecl | axLinkWindows (AOChandle session, int32_t which_window, AxWindowLinkage linkage, uintptr_t linked_handle) |
Change the linkage of the OpenGL display window to another window (i.e. parent or owner). (Windows OS only) More... | |
AxErr __cdecl | axSelectInterpolation (AOChandle session, int32_t which_window, uint8_t interpolation) |
Change the OpenGL display interpolation mode. (Windows OS only) More... | |
AxErr __cdecl | axDisplayImage (AOChandle session, int64_t requested_image_number, uint32_t *returned_image_number, int32_t *height, int32_t *width) |
Display an image from the Main Image Buffer directly to an OpenGL window (8-bit image data only). (Windows OS only) More... | |
AxErr __cdecl | axSelectColormap (AOChandle session, int32_t which_window, AxColormap colors) |
Select the color scheme of images displayed in an OpenGL window. (Windows OS only) More... | |
AxErr __cdecl | axLoadUserColormap (AOChandle session, int32_t which_window, uint8_t *user_colormap_in) |
Load a user-defined AxColormap for images displayed in an OpenGL window. (Windows OS only) More... | |
AxErr __cdecl | axScanConvert (AOChandle session, int32_t which_window, uint8_t convert, float inner_radius, float outer_radius, float crop_inner, float crop_outer) |
Change the polar -> rectangular scan conversion behavior of images displayed in an OpenGL window. (Windows OS only) More... | |
AxErr __cdecl | axUpdateView (AOChandle session, int32_t which_window, int32_t w_left, int32_t w_top, int32_t w_width, int32_t w_height) |
Change the OpenGL window size and position. (Windows OS only) More... | |
AxErr __cdecl | axCropRect (AOChandle session, int32_t which_window, float crop_left, float crop_top, float crop_bottom, float crop_right) |
Change the rectangular cropping behavior of images displayed in an OpenGL window. (Windows OS only) More... | |
AxErr __cdecl | axAdjustBrightnessContrast (AOChandle session, int32_t which_window, float brightness, float contrast) |
Change the brightness and contrast of images displayed in an OpenGL window. (Windows OS only) More... | |
AxErr __cdecl | axHideWindow (AOChandle session, int32_t which_window, uint32_t state) |
Hide or unhide the OpenGL image display window. (Windows OS only) More... | |
AxErr __cdecl | axSetTrigTimeout (AOChandle session, uint32_t framesUntilForceTrig) |
Control the behavior of Force Trigger mode. More... | |
AxErr __cdecl | axSaveFile (AOChandle session, const char *path_file, uint8_t full_buffer, int32_t *packets_written) |
Save contents of Main Image Buffer to disk. More... | |
AxErr __cdecl | axLoadFile (AOChandle session, const char *path_file, int32_t *packets_read) |
Load contents from file on disk into Main Image Buffer. More... | |
AxErr __cdecl | axResizeBuffer (AOChandle session, float capacity_MB) |
Clears and resets the Main Image Buffer, optionally with a new buffer size. More... | |
AxErr __cdecl | axImagingCntrlPCIe (AOChandle session, int16_t number_of_images) |
Control the image streaming behavior of the Axsun PCIe DAQ between Live Imaging, Burst Recording, and Imaging Off states. (Windows OS only) More... | |
const char *__cdecl | axGetPCIeDriverVersion () |
Get the version of the PCIe device driver & library which must be installed to use the PCIe interface. More... | |
AxErr __cdecl | axWriteFPGAreg (AOChandle session, uint16_t regnum, uint16_t regval) |
Write a FPGA register on the Axsun DAQ via the PCIe interface. More... | |
AxErr __cdecl | axWriteFPGAregBIT (AOChandle session, uint16_t regnum, uint8_t bitnum, uint8_t bitval) |
Write a single bit in an FPGA register on the Axsun DAQ via the PCIe interface. More... | |
AxErr __cdecl | axWriteFPGAarray (AOChandle session, uint16_t regnum, uint16_t *regvals, int32_t number_of_words) |
Write multiple FPGA registers on the Axsun DAQ via the PCIe interface. More... | |
AxErr __cdecl | axPipelineMode (AOChandle session, AxPipelineMode mode, AxChannelMode channels) |
Configures FPGA registers to output the desired data type & location from the processing pipeline via the PCIe interface. More... | |
AxErr __cdecl | axReadFPGAreg (AOChandle session, uint16_t regnum, uint16_t *regval) |
Read a FPGA register on the Axsun DAQ via the PCIe interface. More... | |
AxErr __cdecl | axExportImages (AOChandle session, const char *path_directory, int32_t *images_exported, AxFileType file_type) |
Export images from the Main Image Buffer into individual binary or graphics files. More... | |
AxErr __cdecl | axExportImagesAdv (AOChandle session, const char *path_directory, int32_t *images_exported, AxFileType file_type, uint32_t start_image, uint32_t end_image, request_prefs_t request_prefs, export_prefs_t export_prefs) |
Export images from the Main Image Buffer into individual graphics and movie files, with dimensional (cropping and scaling), intensity (brightness and contrast), and colormap adjustments. More... | |
AxErr __cdecl | axExportImagesAsync (AOChandle session, const char *path_directory, AxFileType file_type, uint32_t start_image, uint32_t end_image, request_prefs_t request_prefs, export_prefs_t export_prefs) |
Asynchronously (as a background task) export images from the Main Image Buffer into individual graphics and movie files, with dimensional (cropping and scaling), intensity (brightness and contrast), and colormap adjustments. More... | |
AxErr __cdecl | axCancelExport (AOChandle session) |
Cancel background image exporting started by axExportImagesAsync() More... | |
AxErr __cdecl | axScanCmd (AxScannerCommand scan_command, double misc_scalar, const scan_params_t *scan_parameters, ext_pattern_t *external_scan_pattern, void *RFU) |
Control analog output waveform generation for 2 channel (X-Y) scanners. (Windows OS only) More... | |
AxErr __cdecl | axRegisterScannerConnectCallback (AxConnectScannerCallbackFunction_t callback_function, void *userData) |
Registers a callback function to be executed following a scanner (DAQmx) device connection or disconnection event. (Windows OS only) More... | |
AxErr __cdecl | axRegisterDAQCallback (AOChandle session, AxCallbackFunction_t callback_function, void *user_data) |
Registers a callback function to be executed upon a change in the DAQ imaging state (e.g. transition to live, record, idle). More... | |
AxErr __cdecl | axReportImagingState (AOChandle session) |
Programmatically executes the pre-registered callback function to indicate the current DAQ imaging state. More... | |
AxErr __cdecl | axRegisterExportCallback (AOChandle session, AxCallbackFunction_t callback_function, void *user_data) |
Registers a callback function to be executed each time an image is exported using axExportImages(), axExportImagesAdv(), or axExportImagesAsync(). More... | |
AxErr __cdecl | axRegisterNewImageCallback (AOChandle session, AxNewImageCallbackFunction_t callback_function, void *user_data) |
Registers a callback function to be executed each time a new image is enqueued in the Main Image Buffer, whether captured from DAQ hardware or loaded from disk. More... | |
int32_t __cdecl | axGetLibBuildCfg (void) |
Get the build configuration of the library. More... | |
int32_t __cdecl | axGetLibBuildDateTime (char *datetime_str) |
Get a string describing the time and date that the library was built. More... | |
void __cdecl | axGetLibVersion (int32_t *major, int32_t *minor, int32_t *patch, int32_t *build, char *version_str) |
Get the library version. More... | |
This header file contains all exported function prototypes, structures, and enums necessary for integrating AxsunOCTCapture into a client application.
Please note that SIGNIFICANT API CHANGES have been made in this version 3.x relative to previous 2.x versions of the library:
General Functionality:
DAQmx Scanner Control Functionality:
GET_DEVICE_SERIALNO
and SELECT_DEVICE
commandsOpenGL Display Functionality:
DETAILED RELEASE NOTES
Version 3.0.0.0
Version 3.1.0.0
Version 3.2.0.0
Version 3.3.0.0
Version 3.3.1.0
Version 3.4.0.0
Version 3.4.1.0
Version 3.4.2.0
Version 3.4.3.0
Version 3.4.4.0
Version 3.4.5.0
Version 3.5.0.0
Version 3.5.1.0
Version 3.5.2.0
Version 3.5.3.0
Version 3.5.4.0
Version 3.6.0.0
Version 3.6.1.0
Version 3.6.2.0
Version 3.6.3.0
Version 3.6.4.0
Version 3.6.5.0
Version 3.7.0.0
Version 3.8.0.0
Version 3.8.1.0
enum AxDAQEvent |
Types of transitions in DAQ's operational mode, conveyed via user callback function. See axRegisterDAQCallback() for usage.
enum AxDimension |
enum AxFileType |
Available file types to export using axExportImages() and axExportImagesAdv().
Enumerator | |
---|---|
BINARY | Individual raw binary files. |
JPEG | Individual JPEG files. |
BMP | Individual Windows Bitmap (.bmp) files. |
PNG | Individual PNG files (requires OpenCV). |
RAW3D | 3D raw binary file (raw 3D file can be imported into '3DView' available from http://www.rmrsystems.co.uk/volume_rendering.htm if all three dimensions are less than or equal to 512). |
FILETYPE_RFU | (reserved for future use). |
enum AxInterface |
Available capture interfaces to be selected by axSelectInterface().
Enumerator | |
---|---|
GIGABIT_ETHERNET | Gigabit Ethernet interface. |
PCI_EXPRESS | PCI Express interface. |
NO_INTERFACE | No interface selected. |
INTERFACE_RFU | (reserved for future use). |
enum AxRequestMode |
Available request modes to define behavior of axRequestImageAdv().
enum AxScannerCommand |
Available scanner command types to be executed by axScanCmd().
enum AxWindowLinkage |
Available linkage behaviors for OpenGL display windows to be selected by axLinkWindows(). See https://docs.microsoft.com for more information on Windows OS window relationship concepts like Parent-Child and Ownership.
Enumerator | |
---|---|
NO_LINKAGE | Window has no behavioral dependence on other windows. |
PARENT_CHILD | Parent-Child relationship between windows. |
OWNER_OWNED | Owner-Owned relationship between windows. |
AxErr __cdecl axAdjustBrightnessContrast | ( | AOChandle | session, |
int32_t | which_window, | ||
float | brightness, | ||
float | contrast | ||
) |
Change the brightness and contrast of images displayed in an OpenGL window. (Windows OS only)
[in] | session | The opaque handle to the session created with axStartSession(). |
[in] | which_window | Selects which OpenGL window is targeted for this behavior change. |
[in] | brightness | The desired brightness. Typical values are in the range [-0.5, 0.5]. |
[in] | contrast | The desired contrast. Typical values are in the range [0.5, 1.5]. |
Note that if the color scheme is set to INVERTED GREYSCALE (see axLoadColormap), the behavior of the brightness parameter is inverted (i.e. higher values of the brightness parameter result in a darker image). Setting contrast = 0 auto-scales the Brightness and Contrast values once based on the next rendered image. Setting contrast = -1 auto-scales continuously for all subsequent rendered images.
Cancel background image exporting started by axExportImagesAsync()
[in] | session | The opaque handle to the session created with axStartSession(). |
Count the number of OpenGL display windows currently created. (Windows OS only)
[in] | session | The opaque handle to the session created with axStartSession(). |
[out] | num_of_windows | Will be populated with the number of OpenGL display windows currently created. This will correspond to the number of times axSetupDisplay() has been successfully called since session creation. |
AxErr __cdecl axCropRect | ( | AOChandle | session, |
int32_t | which_window, | ||
float | crop_left, | ||
float | crop_top, | ||
float | crop_bottom, | ||
float | crop_right | ||
) |
Change the rectangular cropping behavior of images displayed in an OpenGL window. (Windows OS only)
[in] | session | The opaque handle to the session created with axStartSession(). |
[in] | which_window | Selects which OpenGL window is targeted for this behavior change. |
[in] | crop_left | Fraction of total image width cropped from left (0 = no cropping, 0.5 = half of image cropped, etc.). |
[in] | crop_top | Fraction of total image height cropped from top. |
[in] | crop_bottom | Fraction of total image height cropped from bottom. |
[in] | crop_right | Fraction of total image width cropped from right. |
Cropping parameters less than zero are ignored.
AxErr __cdecl axDisplayImage | ( | AOChandle | session, |
int64_t | requested_image_number, | ||
uint32_t * | returned_image_number, | ||
int32_t * | height, | ||
int32_t * | width | ||
) |
Display an image from the Main Image Buffer directly to an OpenGL window (8-bit image data only). (Windows OS only)
[in] | session | The opaque handle to the session created with axStartSession(). |
[in] | requested_image_number | The image number requested for display. This can be a unique image number or it can be set < 1 to request the most recently enqueued image in the buffer. |
[out] | returned_image_number | Will be populated with the unique image number displayed. This will be equal to the "requested_image_number" parameter unless that parameter is set < 1 to request the most recent image. |
[out] | height | Will be populated with the height of the requested image (in pixels). |
[out] | width | Will be populated with the width of the requested image (in pixels). |
axDisplayImage requests the display (directly rendered into an OpenGL window) of an image from the Main Image Buffer.
AxErr __cdecl axExportImages | ( | AOChandle | session, |
const char * | path_directory, | ||
int32_t * | images_exported, | ||
AxFileType | file_type | ||
) |
Export images from the Main Image Buffer into individual binary or graphics files.
[in] | session | The opaque handle to the session created with axStartSession(). |
[in] | path_directory | Nul-terminated path to directory in which to export files (must be less than 200 characters; UTF8-encoded). |
[out] | images_exported | Will be populated with the number of images successfully exported. |
[in] | file_type | The desired file type (.bin, .jpg, .bmp, .png) |
Note that any preexisting files in the directory indicated for exporting could be overwritten without warning. Do not call this function concurrently with new data being captured into the buffer (i.e. when the DAQ is in imaging mode) as buffer contents may change in an undesired fashion during export. Descriptors such as image dimensions (height & width) or data type are not exported in the raw .bin file; the user must associate these descriptors manually if needed. 2 or 4-byte data types are exported in big-endian format.
AxErr __cdecl axExportImagesAdv | ( | AOChandle | session, |
const char * | path_directory, | ||
int32_t * | images_exported, | ||
AxFileType | file_type, | ||
uint32_t | start_image, | ||
uint32_t | end_image, | ||
request_prefs_t | request_prefs, | ||
export_prefs_t | export_prefs | ||
) |
Export images from the Main Image Buffer into individual graphics and movie files, with dimensional (cropping and scaling), intensity (brightness and contrast), and colormap adjustments.
[in] | session | The opaque handle to the session created with axStartSession(). |
[in] | path_directory | Nul-terminated path to directory in which to export binary files (must be less than 200 characters; UTF8-encoded). |
[out] | images_exported | Will be populated with the number of images successfully exported. |
[in] | file_type | The desired file type. Raw Binary files can be exported for any data type. PNG files can be exported for U8 and U16 data types. JPEG and BMP files can be exported only for U8 data type. |
[in] | start_image | The unique image number of the image at which to start exporting. If = 0, all images will be exported. |
[in] | end_image | The unique image number of the image at which to stop exporting. If = 0, all images will be exported. |
[in] | request_prefs | Preferences related to image averaging, cropping, and other behaviors (same scheme used in axRequestImage()). |
[in] | export_prefs | Controls properties such as size, colormap, contrast, and brightness of the exported images. |
Note that any preexisting files in the directory indicated for exporting could be overwritten without warning. Do not call this function concurrently with new data being captured into the buffer (i.e. when the DAQ is in imaging mode) as buffer contents may change in an undesired fashion during export. Descriptors such as image dimensions (height & width) or data type are not exported in the raw .bin file; the user must associate these descriptors manually if needed. 2 or 4-byte data types are exported in big-endian format.
AxErr __cdecl axExportImagesAsync | ( | AOChandle | session, |
const char * | path_directory, | ||
AxFileType | file_type, | ||
uint32_t | start_image, | ||
uint32_t | end_image, | ||
request_prefs_t | request_prefs, | ||
export_prefs_t | export_prefs | ||
) |
Asynchronously (as a background task) export images from the Main Image Buffer into individual graphics and movie files, with dimensional (cropping and scaling), intensity (brightness and contrast), and colormap adjustments.
[in] | session | The opaque handle to the session created with axStartSession(). |
[in] | path_directory | Nul-terminated path to directory in which to export binary files (must be less than 200 characters; UTF8-encoded). |
[in] | file_type | The desired file type. Raw Binary files can be exported for any data type. PNG files can be exported for U8 and U16 data types. JPEG and BMP files can be exported only for U8 data type. |
[in] | start_image | The unique image number of the image at which to start exporting. If = 0, all images will be exported. |
[in] | end_image | The unique image number of the image at which to stop exporting. If = 0, all images will be exported. |
[in] | request_prefs | Preferences related to image averaging, cropping, and other behaviors (same scheme used in axRequestImage()). |
[in] | export_prefs | Controls properties such as size, colormap, contrast, and brightness of the exported images. |
Note that any preexisting files in the directory indicated for exporting could be overwritten without warning. Do not call this function concurrently with new data being captured into the buffer (i.e. when the DAQ is in imaging mode) as buffer contents may change in an undesired fashion during export. Descriptors such as image dimensions (height & width) or data type are not exported in the raw .bin file; the user must associate these descriptors manually if needed. 2 or 4-byte data types are exported in big-endian format. This function will return program flow to the calling application while invoking a background task to complete the export operation. Use axRegisterExportCallback() to monitor the export progress.
AxErr __cdecl axGetCompressedJPEGInfo | ( | AOChandle | session, |
int64_t | requested_frame_number, | ||
uint32_t * | returned_frame_number, | ||
uint32_t * | required_buffer_size | ||
) |
Get un-decompressed size information on a compressed JPEG frame in the Main Image Buffer (A frame is 256 A-scans, unsynchronized with Image_sync signal).
[in] | session | The opaque handle to the session created with axStartSession(). |
[in] | requested_frame_number | The frame number for which information is desired. This can be a unique frame number or it can be set to -1 to get info on the most recently enqueued frame in the buffer. |
[out] | returned_frame_number | Will be populated with the unique frame number. This will be equal to the "requested_frame_number" parameter unless that parameter is set to -1 to get info on the most recent frame. |
[out] | required_buffer_size | Will be populated with the required size (in bytes) of a user buffer that must be allocated before JPEG retrieval using axRequestCompressedJPEG. |
axGetCompressedJPEGInfo() gets information on a JPEG compressed frame in the Main Image Buffer before a request is made to retrieve the JPEG data into a user buffer. A call to axGetCompressedJPEGInfo() is intended to precede a call to axRequestCompressedJPEG() and provides several arguments to axRequestCompressedJPEG() (e.g. output_buf_len, requested_frame_number) and identifies "stale" images (for avoiding redundant memory copies if calling axRequestCompressedJPEG using the same requested frame number on consecutive calls).
Get data transfer rate on the active interface.
[in] | session | The opaque handle to the session created with axStartSession(). |
[out] | datarate_Mbps | The estimated data transfer rate for the most recently enqueued image data in in megabits/second. |
void __cdecl axGetErrorString | ( | AxErr | errorcode, |
char * | message_out | ||
) |
Get a description of a specific AxErr error code.
[in] | errorcode | An AxErr error code returned from another function in the AxsunOCTCapture API. |
[out] | message_out | A pointer to a pre-allocated output buffer of characters with size at least 512 bytes into which a nul-terminated description for errorcode will be copied. |
axGetErrorString() can be called at any time; creation of a valid capture session is not required. It is unsafe to pass a message_out output buffer allocated with fewer than 512 bytes.
AxErr __cdecl axGetFrameInfoAdv | ( | AOChandle | session, |
int64_t | requested_frame_number, | ||
uint32_t * | returned_frame_number, | ||
int32_t * | height, | ||
int32_t * | width, | ||
AxDataType * | data_type_out, | ||
uint32_t * | required_buffer_size | ||
) |
Get information on a frame in the Main Image Buffer (A frame is 256 A-scans, unsynchronized with Image_sync signal).
[in] | session | The opaque handle to the session created with axStartSession(). |
[in] | requested_frame_number | The frame number for which information is desired. This can be a unique frame number or it can be set to -1 to get info on the most recently enqueued frame in the buffer. |
[out] | returned_frame_number | Will be populated with the unique frame number. This will be equal to the "requested_frame_number" parameter unless that parameter is set to -1 to get info on the most recent frame. |
[out] | height | Will be populated with the height of the requested frame (in pixels). |
[out] | width | Will be populated with the width of the requested frame (in pixels). |
[out] | data_type_out | Will be populated with the data type of the requested frame (see AxDataType enum definition) |
[out] | required_buffer_size | Will be populated with the required size (in bytes) of a user buffer that must be allocated before frame retrieval using axRequestFrameAdv. |
axGetFrameInfoAdv() gets information on a frame in the Main Image Buffer before a more computationally expensive request is made to retrieve the frame data. A call to axGetFrameInfoAdv() is intended to precede a call to axRequestFrameAdv() and provides several arguments to axRequestFrameAdv() (e.g. output_buf_len, requested_frame_number) and identifies "stale" images (for avoiding the wasted computation resources incurred by calling axRequestFrameAdv using the same requested frame number on consecutive calls).
AxErr __cdecl axGetImageInfo | ( | AOChandle | session, |
uint32_t | requested_image, | ||
image_info_t * | image_info | ||
) |
Get information on an image in the Main Image Buffer.
[in] | session | The opaque handle to the session created with axStartSession(). |
[in] | requested_image | The image number for which information is desired. This can be a unique image number > 1, or it can be 0 to get info on the most recently enqueued image in the buffer. |
[out] | image_info | A image_info_t struct which will be populated with information about the requested image. |
axGetImageInfo() gets information on an image in the Main Image Buffer before a more computationally expensive request is made to retrieve or display the image. A call to axGetImageInfo() is intended to precede a call to axRequestImage() and the returned image_info provides several arguments to that subsequent function call (e.g. output_buf_len, requested_image) and identifies "stale" images (for avoiding the wasted computation resources incurred by calling axRequestImage() using the same requested image number on consecutive calls).
AxErr __cdecl axGetImageInfoAdv | ( | AOChandle | session, |
int64_t | requested_image_number, | ||
uint32_t * | returned_image_number, | ||
int32_t * | height, | ||
int32_t * | width, | ||
AxDataType * | data_type_out, | ||
uint32_t * | required_buffer_size, | ||
uint8_t * | force_trig, | ||
uint8_t * | trig_too_fast | ||
) |
Advanced function for getting information on an image in the Main Image Buffer.
[in] | session | The opaque handle to the session created with axStartSession(). |
[in] | requested_image_number | The image number for which information is desired. This can be a unique image number > 1, or it can be set < 1 to get info on the most recently enqueued image in the buffer. |
[out] | returned_image_number | Will be populated with the unique image number. This will be equal to the "requested_image_number" parameter unless that parameter is set < 1 to get info on the most recent image. |
[out] | height | Will be populated with the height of the requested image (in pixels). |
[out] | width | Will be populated with the width of the requested image (in pixels). |
[out] | data_type_out | Will be populated with the data type of the requested image (see AxDataType enum definition) |
[out] | required_buffer_size | Will be populated with the required size (in bytes) of a user buffer that must be allocated before image retrieval using axRequestImageAdv or axRequestImage. |
[out] | force_trig | Will be populated with 1 if requested image was acquired in Force Trigger mode, or 0 otherwise. See description associated with axSetTrigTimeout function. |
[out] | trig_too_fast | Will be populated with 1 if Image_sync trigger period is too short, or 0 otherwise. |
axGetImageInfoAdv() gets information on an image in the Main Image Buffer before a more computationally expensive request is made to retrieve or display the image. A call to axGetImageInfoAdv() is intended to precede a call to axRequestImageAdv() and provides several arguments to axRequestImageAdv() (e.g. output_buf_len, requested_image_number) and identifies "stale" images (for avoiding the wasted computation resources incurred by calling axRequestImageAdv() using the same requested image number on consecutive calls).
Get the rate of new images being enqueued in the main image buffer.
[in] | session | The opaque handle to the session created with axStartSession(). |
[out] | images_per_second | The estimated rate for the most recently enqueued image data in images/second. |
int32_t __cdecl axGetLibBuildCfg | ( | void | ) |
Get the build configuration of the library.
int32_t __cdecl axGetLibBuildDateTime | ( | char * | datetime_str | ) |
Get a string describing the time and date that the 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.
void __cdecl axGetLibVersion | ( | int32_t * | major, |
int32_t * | minor, | ||
int32_t * | patch, | ||
int32_t * | build, | ||
char * | version_str | ||
) |
Get the 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. |
[out] | version_str | A pointer to a pre-allocated output buffer of characters with size at least 16 bytes into which a nul-terminated version string will be copied. |
It is unsafe to pass a version_str output buffer allocated with fewer than 16 bytes.
Get a description of the capture session's interface status.
[in] | session | The opaque handle to the session created with axStartSession(). |
[out] | message_out | A pointer to a pre-allocated buffer of characters with size at least 256 bytes into which a nul-terminated message string will be copied. |
axGetMessage() can be called any time after creation of a valid capture session and will describe the status of the capture interface. A capture session without a valid capture interface will support only review of previously saved and re-loaded data using axSaveFile() and axLoadFile(). It is unsafe to pass an output buffer allocated with fewer than 256 bytes.
const char *__cdecl axGetPCIeDriverVersion | ( | ) |
Get the version of the PCIe device driver & library which must be installed to use the PCIe interface.
AxErr __cdecl axGetSelectedInterface | ( | AOChandle | session, |
AxInterface * | selected_interface | ||
) |
Queries the currently selected data interface (Ethernet, PCIe, or none) for the capture session.
[in] | session | The opaque handle to the session created with axStartSession(). |
[out] | selected_interface | The interface currently initialized successfully for this session. |
Use axGetMessage() for additional description.
AxErr __cdecl axGetStatus | ( | AOChandle | session, |
uint32_t * | imaging, | ||
uint32_t * | last_packet_in, | ||
uint32_t * | last_frame_in, | ||
uint32_t * | last_image_in, | ||
uint32_t * | dropped_packets, | ||
uint32_t * | frames_since_sync | ||
) |
Get imaging mode status and Main Image Buffer statistics.
[in] | session | The opaque handle to the session created with axStartSession(). |
[out] | imaging | Interpreted as a bit-field: bit 0 set indicates imaging is active, bit 1 set indicates burst recording is active, bit 2 set indicates loading from disk is active. |
[out] | last_packet_in | Will be populated with the unique packet number most recently enqueued into the Main Image Buffer. |
[out] | last_frame_in | Will be populated with the unique frame number most recently enqueued into the Main Image Buffer. |
[out] | last_image_in | Will be populated with the unique image number most recently enqueued into the Main Image Buffer. |
[out] | dropped_packets | Will be populated with the number of packets dropped since the last imaging mode reset. |
[out] | frames_since_sync | Will be populated with the number of frames enqueued since the last Image_sync pulse was received. When this number reaches the configured trigger timeout, the driver will transition to Force Trigger mode. |
Hide or unhide the OpenGL image display window. (Windows OS only)
[in] | session | The opaque handle to the session created with axStartSession(). |
[in] | which_window | Selects which OpenGL window is targeted for this state change. |
[in] | state | The desired window visibility state and Z-order selected from:
|
OpenGL display windows created with axSetupDisplay() have Top-Most status by default. See https://docs.microsoft.com for explanation of Windows OS Z-order behavior.
Control the image streaming behavior of the Axsun PCIe DAQ between Live Imaging, Burst Recording, and Imaging Off states. (Windows OS only)
[in] | session | The opaque handle to the session created with axStartSession(). |
[in] | number_of_images | Set this argument to zero (0) for Imaging Off; set it to (-1) for Live Imaging (no record), or set it to any positive value between 1 and 32767 to request the desired number of images in a Burst Record operation. |
axImagingCntrlPCIe() controls the DMA-based transfer of images from the Axsun DAQ via the PCIe interface. Note that this function does NOT control the laser and therefore the laser emission (along with its sweep trigger and k-clocks) must be enabled separately. This function takes a single parameter to select between three states: Live Imaging, Burst Record, or Imaging Off. In Live Imaging mode, the DAQ will acquire and transmit images indefinitely. In Burst Record mode (a sub-mode of Live Imaging mode), the DAQ will acquire and transmit the finite number of images requested and then automatically transition itself to the Imaging Off state.
AxErr __cdecl axLinkWindows | ( | AOChandle | session, |
int32_t | which_window, | ||
AxWindowLinkage | linkage, | ||
uintptr_t | linked_handle | ||
) |
Change the linkage of the OpenGL display window to another window (i.e. parent or owner). (Windows OS only)
[in] | session | The opaque handle to the session created with axStartSession(). |
[in] | which_window | Selects which OpenGL window is targeted for this change. |
[in] | linkage | Selects the desired linkage behavior. |
[in] | linked_handle | The window handle (HWND) of an existing window to which the OpenGL window is bound as a child or owned window. Set this to NULL to remove linkage to an existing window. |
If another window has been linked either in the initial call to axSetupDisplay() or by a call to axLinkWindows(), it will become the parent or owner of the OpenGL display window. A child window will be drawn inside the rectangular client area of its parent. An owned window can be drawn outside the client area of its owner, but it will minimize/restore with its owner and always be drawn on top of its owner. Free windows are unconstrained by the behaviors of other windows. More explanation of Windows OS parent/child and owner/owned relationships is available on https://docs.microsoft.com.
Load contents from file on disk into Main Image Buffer.
[in] | session | The opaque handle to the session created with axStartSession(). |
[in] | path_file | Full directory and filename from which to load data (UTF8-encoded). |
[out] | packets_read | Will be populated with the number of packets successfully loaded from disk. |
Note that a subsequent call to axGetStatus is useful for determining the number of frames and images loaded into the Main Image Buffer by this function. A call to axResizeBuffer() can be used to clear the Main Image Buffer prior to loading. This function should be called only when images are NOT currently being enqueued into the buffer by a connected DAQ board.
AxErr __cdecl axLoadUserColormap | ( | AOChandle | session, |
int32_t | which_window, | ||
uint8_t * | user_colormap_in | ||
) |
Load a user-defined AxColormap for images displayed in an OpenGL window. (Windows OS only)
[in] | session | The opaque handle to the session created with axStartSession(). |
[in] | which_window | Selects which OpenGL window is targeted for this behavior change. |
[in] | user_colormap_in | The colormap array to be loaded. |
To display a user-defined color map loaded using this function, the "user" AxColormap must be selected with axSelectColormap(). The colormap format is a 768-byte array composed of 256 R,G,B triads: (R0, G0, B0), (R1, G1, B1), (R2, G2, B2), ..., (R255, G255, B255).
AxErr __cdecl axPipelineMode | ( | AOChandle | session, |
AxPipelineMode | mode, | ||
AxChannelMode | channels | ||
) |
Configures FPGA registers to output the desired data type & location from the processing pipeline via the PCIe interface.
[in] | session | The opaque handle to the session created with axStartSession(). |
[in] | mode | The desired pipeline mode according to the numbered pipeline diagram shown as in the Operator's Manual. |
[in] | channels | The desired channel selection mode (see AxChannelMode enum) |
Note that this function does not subsequently query the DAQ hardware to confirm the write was actually successful. A return value of NO_AxERROR only indicates the software's request was made successfully. Call axReadFPGAreg() to confirm hardware register value if desired.
Read a FPGA register on the Axsun DAQ via the PCIe interface.
[in] | session | The opaque handle to the session created with axStartSession(). |
[in] | regnum | The unique register number to which the read operation is directed. |
[out] | regval | Will be populated with the register value fetched from the FPGA. |
axReadFPGAreg is functionally equivalent to the AxsunOCTControl.dll library function "GetFPGARegister" used when connected to the DAQ via Ethernet or USB.
AxErr __cdecl axRegisterDAQCallback | ( | AOChandle | session, |
AxCallbackFunction_t | callback_function, | ||
void * | user_data | ||
) |
Registers a callback function to be executed upon a change in the DAQ imaging state (e.g. transition to live, record, idle).
[in] | session | The opaque handle to the session created with axStartSession(). |
[in] | callback_function | A user-supplied function to be called. Pass NULL to un-register a callback function. |
[in] | user_data | An arbitrary structure to be made available inside the callback function (or NULL if unused). |
The supplied callback function will be executed when the DAQ image state changes, or when axReportImagingState() is called. The uint32_t argument available in the registered AxCallbackFunction_t will convey the DAQ imaging state per the AxDAQEvent enum.
AxErr __cdecl axRegisterExportCallback | ( | AOChandle | session, |
AxCallbackFunction_t | callback_function, | ||
void * | user_data | ||
) |
Registers a callback function to be executed each time an image is exported using axExportImages(), axExportImagesAdv(), or axExportImagesAsync().
[in] | session | The opaque handle to the session created with axStartSession(). |
[in] | callback_function | A user-supplied function to be called. Pass NULL to un-register a callback function. |
[in] | user_data | An arbitrary structure to be made available inside the callback function (or NULL if unused). |
The supplied callback function will be executed when an image is exported. This provides client software with the ability to monitor the export status, update a progress bar, etc. The int32_t argument available in the registered AxCallbackFunction_t will convey the image number of the exported image if positive-valued, or can be cast to an AxErr value if negative valued (indicating an error has occurred).
AxErr __cdecl axRegisterNewImageCallback | ( | AOChandle | session, |
AxNewImageCallbackFunction_t | callback_function, | ||
void * | user_data | ||
) |
Registers a callback function to be executed each time a new image is enqueued in the Main Image Buffer, whether captured from DAQ hardware or loaded from disk.
[in] | session | The opaque handle to the session created with axStartSession(). |
[in] | callback_function | A user-supplied function to be called. Pass NULL to un-register a callback function. |
[in] | user_data | An arbitrary structure to be made available inside the callback function (or NULL if unused). |
This function enables event-driven program flow in the client application, as an alternative to polling the Main Image Buffer for new images using axGetImageInfo(). The data argument available in the registered AxNewImageCallbackFunction_t will convey the unique image number of the newly enqueued image.
AxErr __cdecl axRegisterScannerConnectCallback | ( | AxConnectScannerCallbackFunction_t | callback_function, |
void * | userData | ||
) |
Registers a callback function to be executed following a scanner (DAQmx) device connection or disconnection event. (Windows OS only)
[in] | callback_function | A user-supplied function to be called. Pass NULL to un-register a callback function. |
[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 DAQmx 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.
Programmatically executes the pre-registered callback function to indicate the current DAQ imaging state.
[in] | session | The opaque handle to the session created with axStartSession(). |
Before calling this function, register your custom callback function using axRegisterDAQCallback(). This function aids event-driven program flow in the client application, as an alternative to polling the 'imaging' parameter in axGetStatus().
AxErr __cdecl axRequestCompressedJPEG | ( | AOChandle | session, |
int64_t | requested_frame_number, | ||
uint8_t * | JPEG_data_out, | ||
axpacket_t * | metadata_out, | ||
uint32_t | output_buf_len | ||
) |
Retrieve an un-decompressed JPEG frame from the Main Image Buffer (A frame is 256 A-scans, unsynchronized with Image_sync signal).
[in] | session | The opaque handle to the session created with axStartSession(). |
[in] | requested_frame_number | The frame number requested for retrieval. This can be a unique image number or it can be set to -1 to request the most recently enqueued frame in the buffer. |
[out] | JPEG_data_out | A pre-allocated buffer into which the retrieved JPEG frame is copied for subsequent user interaction. Buffer size must be at least as large as indicated by a preceding call to axGetCompressedJPEGInfo ("required_buffer_size"). |
[out] | metadata_out | A pre-allocated buffer of sizeof(axpacket_t) bytes into which frame metadata is copied. |
[in] | output_buf_len | The pre-allocated length in bytes of the JPEG_data_out buffer. |
axRequestCompressedJPEG() requests the retrieval (into a pre-allocated buffer defined by the user) of un-decompressed JPEG information. This JPEG can subsequently be saved as a file and/or decompressed by the user's preferred JPEG decompression library or utility. A call to axRequestCompressedJPEG() is intended to follow a call to axGetCompressedJPEGInfo(), which provides several arguments to axRequestCompressedJPEG() (e.g. output_buf_len, requested_frame_number) and identifies "stale" images (for avoiding redundant memory copies if calling axRequestCompressedJPEG using the same requested frame number on consecutive calls).
AxErr __cdecl axRequestFrameAdv | ( | AOChandle | session, |
int64_t | requested_frame_number, | ||
uint8_t * | frame_data_out, | ||
axpacket_t * | metadata_out, | ||
int32_t * | height, | ||
int32_t * | width, | ||
AxDataType * | data_type_out, | ||
uint32_t | output_buf_len | ||
) |
Retrieve a frame from the Main Image Buffer (A frame is 256 A-scans, unsynchronized with Image_sync signal).
[in] | session | The opaque handle to the session created with axStartSession(). |
[in] | requested_frame_number | The frame number requested for retrieval. This can be a unique image number or it can be set to -1 to request the most recently enqueued frame in the buffer. |
[out] | frame_data_out | A pre-allocated buffer into which the retrieved frame is copied for subsequent user interaction. Buffer size must be at least as large as indicated by a preceding call to axGetFrameInfoAdv ("required_buffer_size"). |
[out] | metadata_out | A pre-allocated buffer of sizeof(axpacket_t) bytes into which metadata is copied. |
[out] | height | Will be populated with the height of the requested frame (in pixels). |
[out] | width | Will be populated with the width of the requested frame (in pixels). |
[out] | data_type_out | Will be populated with the data type of the requested frame (see AxDataType enum definition) |
[in] | output_buf_len | The pre-allocated length in bytes of the frame_data_out buffer. |
axRequestFrameAdv() requests the retrieval (into a pre-allocated buffer defined by the user) of a frame from the Main Image Buffer. A call to axRequestFrameAdv() is intended to follow a call to axGetFrameInfoAdv(), which provides several arguments to axRequestFrameAdv() (e.g. output_buf_len, requested_frame_number) and identifies "stale" images (for avoiding the wasted computation resources incurred by calling axRequestFrameAdv using the same requested frame number on consecutive calls). OpenGL display of frames is currently unsupported.
AxErr __cdecl axRequestImage | ( | AOChandle | session, |
uint32_t | requested_image, | ||
request_prefs_t | prefs, | ||
uint32_t | output_buf_len, | ||
uint8_t * | image_data_out, | ||
image_info_t * | image_info | ||
) |
Retrieve and/or display an image from the Main Image Buffer.
[in] | session | The opaque handle to the session created with axStartSession(). |
[in] | requested_image | The image number requested for retrieval or display. This must be a unique image number returned from a prior call to axGetImageInfo() or extracted from the new_image_callback_data_t in a New Image Callback invocation. For the most recently enqueued image in the buffer, use a value = 0 as the requested_image argument in axGetImageInfo(). |
[in] | prefs | A structure containing preferences related to image averaging, request mode, image cropping, and other behaviors. |
[in] | output_buf_len | The size in bytes of the pre-allocated image_data_out buffer into which this function will copy the image. Don't lie, or crashes could ensue. |
[out] | image_data_out | A pre-allocated buffer into which the retrieved image is copied for subsequent user interaction. Buffer size must be at least as large as indicated by a preceding call to axGetImageInfo() or axGetImageInfoAdv() (i.e. the required_buffer_size) unless accomodations are made manually for image cropping or downsampling in the request prefs. |
[out] | image_info | An image_info_t struct which will be populated with information about the retreived and/or displayed image. NOTE: height, width, and size_bytes values may be different from prior call to axGetImageInfo() if the request prefs include cropping or downsampling. |
axRequestImage() requests the retrieval (via copy into a pre-allocated buffer defined by the user) or direct display (via OpenGL rendering) of an image from the Main Image Buffer.
AxErr __cdecl axRequestImageAdv | ( | AOChandle | session, |
int64_t | requested_image_number, | ||
uint8_t * | image_data_out, | ||
axpacket_t * | metadata_out, | ||
int32_t * | height, | ||
int32_t * | width, | ||
AxDataType * | data_type_out, | ||
uint32_t | output_buf_len, | ||
request_prefs_t | prefs, | ||
uint8_t * | force_trig, | ||
uint8_t * | trig_too_fast | ||
) |
Advanced function for retrieving and/or displaying an image from the Main Image Buffer.
[in] | session | The opaque handle to the session created with axStartSession(). |
[in] | requested_image_number | The image number requested for retrieval and/or display. This can be a unique image number > 1 or it can be set to -1 to request the most recently enqueued image in the buffer. |
[out] | image_data_out | A pre-allocated buffer into which the retrieved image is copied for subsequent user interaction. Buffer size must be at least as large as indicated by a preceding call to axGetImageInfo or axGetImageInfoAdv ("required_buffer_size"). Can be NULL if req_mode parameter is set to DISPLAY_ONLY. |
[out] | metadata_out | A pre-allocated buffer of sizeof(axpacket_t) bytes into which pertinent image metadata is copied. |
[out] | height | Will be populated with the height of the requested image (in pixels). |
[out] | width | Will be populated with the width of the requested image (in pixels). |
[out] | data_type_out | Will be populated with the data type of the requested image (see AxDataType enum definition) |
[in] | output_buf_len | The pre-allocated length in bytes of the image_data_out buffer. Can be 0 if req_mode parameter is set to DISPLAY_ONLY. |
[in] | prefs | A structure containing preferences related to image averaging, request mode, image cropping, and other behaviors. |
[out] | force_trig | Will be populated with 1 if requested image was acquired in Force Trigger mode, or 0 otherwise. See description associated with axSetTrigTimeout function. |
[out] | trig_too_fast | Will be populated with 1 if Image_sync trigger period is too short, or 0 otherwise. |
axRequestImageAdv() requests the retrieval (into a pre-allocated buffer defined by the user) and/or display (directly rendered into OpenGL window) of an image from the Main Image Buffer. A call to axRequestImageAdv() is intended to follow a call to axGetImageInfo(), which provides several arguments to axRequestImageAdv() (output_buf_len, requested_image_number) and identifies "stale" images (for avoiding the wasted computation resources incurred by calling axRequestImageAdv() using the same requested image number on consecutive calls).
AxErr __cdecl axRequestImagePointer | ( | AOChandle | session, |
uint32_t | requested_image, | ||
image_info_t * | image_info, | ||
span_t * | part1, | ||
span_t * | part2 | ||
) |
Retrieve a pointer to an image in the Main Image Buffer (non-compressed images only).
[in] | session | The opaque handle to the session created with axStartSession(). |
[in] | requested_image | The image number for which to retrieve a pointer. This must be a unique image number returned from a prior call to axGetImageInfo() or extracted from the new_image_callback_data_t in a New Image Callback invocation. For the most recently enqueued image in the buffer, use a value = 0 as the requested_image argument in axGetImageInfo(). |
[out] | image_info | An image_info_t struct which will be populated with information about the image for which a pointer is retrieved. |
[out] | part1 | A span_t struct which will be populated with the start address and size in bytes of the requested image. |
[out] | part2 | For images whose contents happen to wrap from the end around to the start of the (circular) Main Image Buffer, this argument will be populated with the start address and size of the second part of the image and the part1 argument will contain the start address and size of the first part of the image. These two parts can then be concantenated by the user. For images which are contiguous in the buffer (unaffected by the buffer circularity) the members of part2 will be zero. |
The traditional axRequestImage() function retrieves the image by copying it from the Main Image Buffer into a pre-allocated buffer owned by the user. axRequestImagePointer() provides const pointer access to image data directly in the Main Image Buffer in order to accommodate GUI frameworks whose "image type" class constructors must perform their own deep copies. This function helps avoid the inefficiency of an additional copy (into an intermediary user buffer) between the Main Image Buffer (owned by the AxsunOCTCapture library) and the eventual ownership of the framework's "image-type" class. Cropping, averaging, decompressing, or other image manipulation features are unavailable via this function; use axRequestImage() instead. NOTE: The image at the retreived pointer(s) is only valid so long as the Main Image Buffer has not been cleared, resized, or overwritten with newly enqueued images (e.g. acquired from DAQ or loaded from file).
Clears and resets the Main Image Buffer, optionally with a new buffer size.
[in] | session | The opaque handle to the session created with axStartSession(). |
[in] | capacity_MB | The desired size of the new buffer in MB. A value of 0 resets (clears) the buffer using the previously configured size. |
This function is useful for preventing retrieval of images from prior imaging sequences which have not yet been overwritten by the most recent sequence. Careful management of buffer status (i.e. number of images enqueued) returned using axGetStatus() will avoid this situation, making the use of this function optional. This function should not be called when images are currently being enqueued into the buffer by a connected DAQ board or while loading a file from disk.
AxErr __cdecl axSaveFile | ( | AOChandle | session, |
const char * | path_file, | ||
uint8_t | full_buffer, | ||
int32_t * | packets_written | ||
) |
Save contents of Main Image Buffer to disk.
[in] | session | The opaque handle to the session created with axStartSession(). |
[in] | path_file | Full directory and filename at which to create new save file (UTF8-encoded). |
[in] | full_buffer | Set to 0 for saving only data captured during the most recent imaging sequence (e.g. a burst record) or set to 1 to save the full buffer. |
[out] | packets_written | Will be populated with the number of packets successfully saved to disk. |
Note that a preexisting file at the location indicated for saving will be overwritten without warning. This function should be called only when images are NOT currently being enqueued into the buffer by a connected DAQ board.
AxErr __cdecl axScanCmd | ( | AxScannerCommand | scan_command, |
double | misc_scalar, | ||
const scan_params_t * | scan_parameters, | ||
ext_pattern_t * | external_scan_pattern, | ||
void * | RFU | ||
) |
Control analog output waveform generation for 2 channel (X-Y) scanners. (Windows OS only)
[in] | scan_command | The desired scanner function selected from available commands in the AxScannerCommand enum. See below for notes on available scanner commands. |
[in] | misc_scalar | A general purpose scalar value. Valid when scan_command = WAIT_BURST, SET_SAMPLE_CLOCK, GET_DEVICE_SERIALNO, SELECT_DEVICE, and others. (See below for usage.) |
[in] | scan_parameters | A structure defining the basic geometry of a rectangular raster scan pattern generated by the library (parameter valid when scan_command = SET_RECT_PATTERN or STOP_AT_POSITION, otherwise set to NULL). |
[in] | external_scan_pattern | A structure defining the user-generated scan pattern and associated arrays to be loaded (parameter valid when scan_command = LOAD_EXT_PATTERN, otherwise set to NULL). |
[in,out] | RFU | Reserved for future use, set to NULL. |
Scan patterns are configured based on voltage values at the output pins of the analog output generation device. Converting a voltage value to an optical beam position must incorporate external linear and non-linear factors such as the type of scanner & amplifier/controller, the opto-mechanical layout, lens distortion, etc. The active scan pattern (an array of interleaved X and Y voltages) can be generated by the library based on user-configurable high-level geometric parameters (i.e. range and origin) to define a rectangular raster scan area, or generated externally by the user and then loaded directly via array format. The rectangular raster scan pattern generated by the library consists of linear ramp functions (sawtooth wave with 100% duty cycle) along the X and Y scan dimensions. When scanning, the "fast" X voltage is updated for each clock pulse and the "slow" Y voltage is updated after each full period of the X waveform.
SETUP and HARDWARE CONNECTIONS:
FUNCTION | USB-6211 | USB-6343 | USB-6001/6008 | GROUND TYPE |
---|---|---|---|---|
X scan waveform output | AO 0 | AO 0 | <n/a> | A GND |
Y scan waveform output | AO 1 | AO 1 | <n/a> | A GND |
Auxiliary analog DC output | <n/a> | AO 2 | AO 0 | A GND |
Image_sync pulse output | PFI 5 | PFI 13 | <n/a> | D GND |
Ext. sample clock input | PFI 0 | PFI 8 | <n/a> | D GND |
Square wave output | PFI 4 | PFI 12 | <n/a> | D GND |
Auxiliary digital output | PFI 6 | PFI 2 | P 1.2 | D GND |
AVAILABLE SCANNER COMMANDS:
axScanCmd(INIT_SCAN, ...) Initialize hardware and allocate scanner control resources. (DEPRECATED)
Scanner control resources are lazy-initialized automatically on the first call to any axScanCmd() command type, so this INIT_SCAN command is no longer needed. Hardware resources are initialized automatically when a supported device is detected (may take up to 10 seconds for device to be recognized after connecting). Use SET_MAX_VOLTAGE command once a device is connected in order to set its maximum voltage limits for analog output waveforms.
axScanCmd(DESTROY_SCAN, ...) Destroy and deallocate scanner control resources.
Resources previously allocated with other axScanCmd(...) function calls are automatically deallocated by axStopSession() when terminating a main Axsun OCT Capture session. Call this command to explicitly deallocate scanner resources if a main capture session was not used.
axScanCmd(SET_RECT_PATTERN, ..., scan_parameters, ...) Use scan_parameters to configure a rectangular raster scan pattern.
The basic geometry defined in the scan_parameters structure is used to generate the active 1D (line) and 2D (raster) scan patterns for subsequent analog output generation, overwriting active scan patterns previously generated with this command or loaded with axScanCmd(LOAD_EXT_PATTERN,...). Contents of the scan_parameters structure are copied internally and the pointer to this structure need not remain valid following return from this command.
axScanCmd(LOAD_EXT_PATTERN, ..., external_scan_pattern, ...) Use external_scan_pattern to load an externally generated scan pattern.
An arbitrary user-generated scan pattern can be loaded for subsequent analog output generation, overwriting active scan patterns previously loaded with this command or generated with axScanCmd(SET_RECT_PATTERN,...). Contents of the external_scan_pattern structure and associated arrays are copied internally and the pointer to this structure and its associated arrays need not remain valid following return from this command.
axScanCmd(CONTINUOUS_LINE_SCAN, ...) Start continuous line scanning based on configured scan pattern.
Starts the analog output generation for the active 1D linear scan, repeating it continuously until commanded otherwise. The Image_sync pulse frequency is derived from the X_increment configured when the active scan pattern was set or loaded.
axScanCmd(CONTINUOUS_RASTER_SCAN, ...) Start continuous raster scanning based on configured scan pattern.
Starts the analog output generation for the active 2D raster scan, repeating it continuously until commanded otherwise. The Image_sync pulse frequency is derived from the X_increment configured when the active scan pattern was set or loaded..
axScanCmd(STOP_AT_POSITION, ..., scan_parameters, ...) Move to a configured position and stop scanning.
Stops the Image_sync pulse and sets a constant (non-scanning) analog output at the voltages given in the X_shift and Y_shift fields of the scan_parameters argument. This command does not alter or overwrite the active scan parameters or patterns previously configured using axScanCmd(SET_RECT_PATTERN,...).
axScanCmd(SETUP_BURST_RASTER, ...) Prepare a burst raster scan by pre-loading buffers and waiting at the start position.
Uploads the active raster scan pattern to device memory and sets a constant analog output at the pattern's initial voltage, but waits to start scanning until a subsequent call to axScanCmd(START_BURST_RASTER,...).
axScanCmd(START_BURST_RASTER, ...) Start a burst raster scan with minimum latency.
Starts analog output and Image_sync pulse generation for a burst raster scan. Must be preceded by a call to axScanCmd(SETUP_BURST_RASTER,...). The raster scan starts with minimal latency and is executed once.
axScanCmd(WAIT_BURST, misc_scalar, ...) Wait for a burst raster scan to complete.
Waits for a burst raster scan operation to compete. The misc_scalar parameter sets the timeout (in seconds) to wait before returning an error. A timeout of -1 waits indefinitely, a timeout of 0 returns immediately with an error if the raster scan is still active or no error if it is complete.
axScanCmd(SET_SAMPLE_CLOCK, misc_scalar, ...) Changes between external and internal sample clock.
The misc_scalar parameter sets the desired sample clock for subsequent analog output generation. The default value of 0 uses the external sample clock from the pin according to the table above, a non-zero value uses a 100 kHz sample clock generated internally by the device. Active scanning operations must be restarted for changes to take effect.
axScanCmd(GET_DEVICE_SERIALNO, misc_scalar, ...) Returns a device serial number (if AxErr return value > 0, type-cast it to int
).
A list of N connected devices is maintained internally by the library. The misc_scalar parameter sets the device index (from 0 to N-1) on which to query the device serial number. If the index is higher than N-1, function will return AxErr::DAQMX_DEVICE_NOT_FOUND.
axScanCmd(SELECT_DEVICE, misc_scalar, ...) Selects the active device.
A list of N connected devices is maintained internally by the library. The device occupying the first position (index 0) is considered the "active device" to which other axScanCmd() commands are directed. A positive-valued misc_scalar parameter sets the new "active device" (indexed from 0 to N-1) to be moved into the first position in the list. A negative-valued misc_scalar parameter is interpreted as a device serial number. If a matching device is found, it is set as the "active device" and moved into the first position in the list. If the misc_scalar is higher than N-1, function will return AxErr::DAQMX_DEVICE_NOT_FOUND. If the misc_scalar is less than 0 and the requested device serial number is not found, function will return AxErr::DAQMX_DEVICE_NOT_FOUND.
axScanCmd(COUNT_DEVICES, ...) Returns the number of connected DAQmx devices (if AxErr return value > 0, type-cast it to int
).
Counts the number of DAQmx devices currently connected, including both supported and unsupported devices.
axScanCmd(SET_MAX_VOLTAGE, ...) Sets the maximum analog waveform voltage a device is allowed to output.
A device's maximum analog waveform output is set to +/- 10.0 V by default. Use the misc_scalar parameter to set a new maximum value from 0.0 V to 10.0 V on the active device. The minimum voltage will be set to -misc_scalar. This feature is a safeguard against unintentional over-driving of connected scanners; subsequent commands to start scanning will return an error if the programmed scan pattern exceeds the configured voltage limit. This command does not apply to the general purpose DC analog output functionality provided by some devices.
axScanCmd(SET_DIGITAL_OUTPUT, misc_scalar, ...) Controls the general purpose digital output.
Sets the device's general purpose digital output to low/false if misc_scalar = 0 or high/true if misc_scalar = 1.
axScanCmd(SET_SQUAREWAVE_OUTPUT, misc_scalar, ...) Controls the general purpose square wave synthesizer.
Sets the device's general purpose square wave synthesizer to output at a frequency given by misc_scalar in Hz. Use misc_scalar = 0 to turn the squarewave output off.
axScanCmd(SET_XSINE_YRAMP_PATTERN, ..., scan_parameters, ...) Configures a raster scan pattern with sinusoidal waveform on the X dimension and linear ramp waveform on the Y dimension.
Usage is similar to axScanCmd(SET_RECT_PATTERN, ...).
axScanCmd(SET_AUX_DC_ANALOG_OUTPUT, misc_scalar, ...) Controls the general purpose DC analog output voltage.
Sets the device's general purpose DC analog output to a voltage given by misc_scalar in Volts.
axScanCmd(SET_AUX_DC_ANALOG_MAX, misc_scalar, ...) Controls the general purpose DC analog output voltage maximum limit.
Sets the device's maximum general purpose DC analog output to a voltage given by misc_scalar in Volts. This feature is a safeguard against unintentional over-driving of this output terminal; subsequent commands to SET_AUX_DC_ANALOG_OUTPUT will return an error if the requested voltage exceeds the configured limit.
axScanCmd(SET_AUX_DC_ANALOG_MIN, misc_scalar, ...) Controls the general purpose DC analog output voltage minimum limit.
Sets the device's minimum general purpose DC analog output to a voltage given by misc_scalar in Volts. This feature is a safeguard against unintentional over-driving of this output terminal; subsequent commands to SET_AUX_DC_ANALOG_OUTPUT will return an error if the requested voltage exceeds the configured limit.
axScanCmd(GET_DEVICE_MODEL_NUMBER, misc_scalar, ...) Returns a device's numeric model number (if AxErr return value > 0, type-cast it to int
).
A list of N connected devices is maintained internally by the library. The misc_scalar parameter sets the device index (from 0 to N-1) on which to query the device model number. If the index is higher than N-1, function will return AxErr::DAQMX_DEVICE_NOT_FOUND.
axScanCmd(SET_XSINE_YSINE_PATTERN, ..., scan_parameters, ...) Configures a raster scan pattern with sinusoidal waveforms on the X and Y dimensions.
Usage is similar to axScanCmd(SET_RECT_PATTERN, ...).
AxErr __cdecl axScanConvert | ( | AOChandle | session, |
int32_t | which_window, | ||
uint8_t | convert, | ||
float | inner_radius, | ||
float | outer_radius, | ||
float | crop_inner, | ||
float | crop_outer | ||
) |
Change the polar -> rectangular scan conversion behavior of images displayed in an OpenGL window. (Windows OS only)
[in] | session | The opaque handle to the session created with axStartSession(). |
[in] | which_window | Selects which OpenGL window is targeted for this behavior change. |
[in] | convert | The desired scan conversion behavior (disabled = 0, enabled = 1). |
[in] | inner_radius | A value on the interval [0..1] which defines the inner edge of the annulus onto which an image's r = 0 data is rendered. (0 = center, 1 = outer edge of uncropped display window) |
[in] | outer_radius | A value on the interval [0..1] which defines the outer edge of the annulus onto which an image's r = Rmax data is rendered. (0 = center, 1 = outer edge of uncropped display window) |
[in] | crop_inner | A value on the interval [-1..1] which defines the fraction of total image cropped prior to scan conversion in the radial direction from r = 0 outward. |
[in] | crop_outer | A value on the interval [0..2] which defines the fraction of total image cropped prior to scan conversion in the radial direction from r = Rmax inward. |
Polar-to-rectangular scan conversion is useful for displaying images on a cartesian (x,y) display when acquired with a rotational probe or catheter in polar (r,theta) coordinates. For maximized field of view, inner_radius and crop_inner should be set to 0 and outer_radius and crop_outer should be set to 1. Adjusting crop_inner and crop_outer by an equivalent amount will achieve a 'digital Z-offset' radial shifting effect.
AxErr __cdecl axSelectColormap | ( | AOChandle | session, |
int32_t | which_window, | ||
AxColormap | colors | ||
) |
Select the color scheme of images displayed in an OpenGL window. (Windows OS only)
[in] | session | The opaque handle to the session created with axStartSession(). |
[in] | which_window | Selects which OpenGL window is targeted for this style change. |
[in] | colors | The desired color scheme can be SEPIA, grayscale, inverted GREYSCALE, or a user-defined scheme loaded using axLoadUserColormap (see AxColormap enum). |
AxErr __cdecl axSelectInterface | ( | AOChandle | session, |
AxInterface | which_interface | ||
) |
Select the data interface (Ethernet, PCIe, or none) for the capture session.
[in] | session | The opaque handle to the session created with axStartSession(). |
[in] | which_interface | The desired interface type to initialize for this session. |
This function will replace/reset an existing interface which was already setup from a previous call to this function. A capture session can only have one associated interface at a time.
AxErr __cdecl axSelectInterpolation | ( | AOChandle | session, |
int32_t | which_window, | ||
uint8_t | interpolation | ||
) |
Change the OpenGL display interpolation mode. (Windows OS only)
[in] | session | The opaque handle to the session created with axStartSession(). |
[in] | which_window | Selects which OpenGL window is targeted for this mode change. |
[in] | interpolation | The desired interpolation mode (bilinear = 0, nearest neighbor = 1). |
Control the behavior of Force Trigger mode.
[in] | session | The opaque handle to the session created with axStartSession(). |
[in] | framesUntilForceTrig | The number of frames for which the driver will wait for a Image_sync signal before timing out and entering Force Trigger mode. Defaults to 24 frames at session creation. Values outside the range of [2,100] will be automatically coerced into this range. |
The trigger timeout defines the number of consecutive frames for which the driver will wait for a Image_sync signal prior to transitioning into Force Trigger mode. Once in Force Trigger mode, the driver will return the most recently captured frame (256 A-scans) with no synchronization with the Image_sync signal (which is either too slow or absent altogether). The driver will automatically exit Force Trigger mode and re-synchronize with the Image_sync signal as soon as two consecutive Image_sync signals are detected within the timeout period. Set the trigger timeout based on the expected Image_sync signal period of your scanner and the system A-scan rate. For example, assume an effective A-scan rate of 100,000 Hz and a Image_sync period of 33 milliseconds (i.e. a B-scan period determined by the frequency of a scanner running at 30 fps). The trigger timeout is defined in number of frames (consisting of 256 A-scans each), hence the frame time for a 100kHz system is 2.56 milliseconds (=256/100000). A trigger timeout setting of at least 13 frames equaling 33.28 milliseconds (= 2.56 ms * 13) is required to avoid experiencing premature Force Trigger timeout. Setting a trigger timeout several frames larger than the minimum is recommended; however, setting it too high will delay or prevent the transition to Force Trigger mode when desired (e.g. when a Image_sync signal is absent). Remember that the A-scan subsampling feature on the DAQ reduces the effective A-scan rate of the system and could impact the trigger timeout calculation.
AxErr __cdecl axSetupDisplay | ( | AOChandle | session, |
uint8_t | window_style, | ||
int32_t | w_left, | ||
int32_t | w_top, | ||
int32_t | w_width, | ||
int32_t | w_height, | ||
uintptr_t | linked_window_handle | ||
) |
Setup an OpenGL display window for direct rendering of image data. (Windows OS only)
[in] | session | The opaque handle to the session created with axStartSession(). |
[in] | window_style | The window style: either a floating window with border (=0) or a fixed borderless window (=1). |
[in] | w_left | The initial left edge of the window in display coordinates. Also see axUpdateView(). |
[in] | w_top | The initial top edge of the window in display coordinates. Also see axUpdateView(). |
[in] | w_width | The initial width of the window. Also see axUpdateView(). |
[in] | w_height | The initial height of the window. Also see axUpdateView(). |
[in] | linked_window_handle | The window handle (HWND) of an existing window to which the OpenGL window is linked in a child or owned relationship. Set this to 0 for creating an OpenGL window with no linked window behavior. |
Any resources allocated or windows created with axSetupDisplay() are automatically deallocated by axStopSession() when terminating the Axsun OCT Capture Session. Arguments set the initial style, size & location, and linked behavior of the OpenGL window at creation but these can be subsequently changed according to the axUpdateWindowStyle(), axUpdateView(), and axLinkedWindow() functions. The window is hidden by default after the session is created. Call axHideWindow() to subsequently show the window. A new window is created every time this function is successfully called; windows are indexed with the "which_window" argument (starting at which_window = 1) in related functions targeting window behavior or appearance.
Start an Axsun DAQ imaging session by allocating memory for the Main Image Buffer.
[out] | session | Pointer to session's opaque handle which will be created by this function and used as an argument for all subsequent function calls specific to this session. |
[in] | capacity_MB | The desired size (in megabytes) to allocate for the Main Image Buffer. |
axStartSession() is the first method called in a typical implementation of the AxsunOCTCapture API. Sessions started with axStartSession() must be closed with axStopSession() before the client application exits or else resources will be left allocated.
Stop a capture session and deallocate all resources, including Main Image Buffer and interfaces.
[in] | session | The opaque handle to the session created with axStartSession(). |
axStopSession() is the last function called in a typical implementation using the AxsunOCTCapture API. A session started with axStartSession() must be closed with axStopSession() before the client application exits.
AxErr __cdecl axUpdateView | ( | AOChandle | session, |
int32_t | which_window, | ||
int32_t | w_left, | ||
int32_t | w_top, | ||
int32_t | w_width, | ||
int32_t | w_height | ||
) |
Change the OpenGL window size and position. (Windows OS only)
[in] | session | The opaque handle to the session created with axStartSession(). |
[in] | which_window | Selects which OpenGL window is targeted for this style change. |
[in] | w_left | The left edge of the window in display coordinates (applies to borderless window only). |
[in] | w_top | The top edge of the window in display coordinates (applies to borderless window only). |
[in] | w_width | The width of the window in pixels. |
[in] | w_height | The height of the window in pixels. |
Window width and height parameters outside the range [32,4000] will be coerced. The w_left and w_top parameters are ignored when the window style is floating with a border (see axSetupDisplay() and axUpdateWindowStyle()). Windows with this traditional bordered style can be dragged with the mouse cursor to a desired position.
Change the OpenGL display window style. (Windows OS only)
[in] | session | The opaque handle to the session created with axStartSession(). |
[in] | which_window | Selects which OpenGL window is targeted for this style change. |
[in] | window_style | The window style: either a floating window with border (=0) or a fixed borderless window (=1). |
AxErr __cdecl axWriteFPGAarray | ( | AOChandle | session, |
uint16_t | regnum, | ||
uint16_t * | regvals, | ||
int32_t | number_of_words | ||
) |
Write multiple FPGA registers on the Axsun DAQ via the PCIe interface.
[in] | session | The opaque handle to the session created with axStartSession(). |
[in] | regnum | The unique register number to which the write operation is directed. |
[in] | regvals | 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 regvals . |
Write a FPGA register on the Axsun DAQ via the PCIe interface.
[in] | session | The opaque handle to the session created with axStartSession(). |
[in] | regnum | The unique register number to which the write operation is directed. |
[in] | regval | The desired 16-bit value to write. |
Note that this function does not subsequently query the DAQ hardware to confirm the write was actually successful. A return value of NO_AxERROR only indicates the software's request was made successfully. Call axReadFPGAreg() to confirm hardware register value if desired. FPGA registers are 16-bits wide and all 16-bits must be written atomically. To write individual bits in a register use the axWriteFPGAregBIT() function. axWriteFPGAreg() is functionally equivalent to the AxsunOCTControl.dll library function "SetFPGARegister()" used when connected to the DAQ via Ethernet or USB.
AxErr __cdecl axWriteFPGAregBIT | ( | AOChandle | session, |
uint16_t | regnum, | ||
uint8_t | bitnum, | ||
uint8_t | bitval | ||
) |
Write a single bit in an FPGA register on the Axsun DAQ via the PCIe interface.
[in] | session | The opaque handle to the session created with axStartSession(). |
[in] | regnum | The unique register number to which the write operation is directed. |
[in] | bitnum | The bit number within the desired register. The 16 bits in the register are indexed from 0 (LSB) to 15 (MSB). |
[in] | bitval | The value to write (0 = clear bit, 1 = set bit) |
Note that this function does not subsequently query the DAQ hardware to confirm the write was actually successful. A return value of NO_AxERROR only indicates the software's request was made successfully. Call axReadFPGAreg() to confirm hardware register value if desired.