File Documentation

Prev Next

csi.h File Reference

#include "version.h"

#include "csiTypes.h"

#include <algorithm>

Include dependency graph for csi.h:

Data Structures

struct csiFeatureParameterStructure containing information about raw feature parameter.

struct csiMemTransferInfoStructure containing information about memory transfer.

struct csiTLProducerInfosStructure containing infomation about transport layer producer.

struct csiDeviceInfoStructure containing detailed device information.

struct csiDiscoveryInfoStructure containing information about device discovery.

struct csiTLInterfaceInfoStructure containing information about transport layer interface.

struct csiTLInterfaceDiscoveryInfoStructure containing information about transport layer interface discovery.

struct csiDataStreamInfoStructure containing data stream infomation.

struct csiImageInfoStructure containing information about captured image.

struct csiEventDataStructure containing information about event.

struct csiNewBufferEventDataStructure containing data of an incoming buffer event.

struct csiAcquistionStatisticsStructure containing acquisition statistics.

struct csiFileTransferParamsStructure containing file transfer parameter.

struct csiDownloadParamsStructure containing Download parameters and options.

struct csiUploadParamsStructure containing Upload parameters and options.

struct csiCalibrationParamsStructure containing calibration parameters.

Macros

#define CSI_INFO_STRING_BUFFER_SIZE  512

#define CSI_INFO_INT_BUFFER_SIZE  512

#define CSI_DISCOVERY_INFO_DEVICE_COUNT  16

#define CSI_TL_INTERFACE_COUNT  16

#define CSI_INFITIE_TIME  0xffffffff

#define CSI_MONO_FORMAT  0x01000000

#define CSI_COLOR_FORMAT  0x02000000

#define CSI_OCCUPY_8BIT  0x00080000

#define CSI_OCCUPY_10BIT  0x000A0000

#define CSI_OCCUPY_12BIT  0x000C0000

#define CSI_OCCUPY_14BIT  0x000E0000

#define CSI_OCCUPY_16BIT  0x00100000

#define CSI_OCCUPY_24BIT  0x00180000

#define CSI_OCCUPY_30BIT  0x001E0000

#define CSI_OCCUPY_32BIT  0x00200000

#define CSI_OCCUPY_48BIT  0x00300000

#define CSI_OCCUPY_64BIT  0x00400000

Typedefs

typedef uint64_t csiHandle

typedef enum csiPixelFormat csiPixelFormat

typedef enum csiDeviceAccessMode csiDeviceAccessMode

typedef enum csiDeviceAccessStatus csiDeviceAccessStatus

typedef enum csiFeatureType csiFeatureType

typedef enum csiAccessMode csiAccessMode

typedef enum csiFeatureVisibility csiFeatureVisibility

typedef enum csiModuleLevel csiModuleLevel

typedef enum csiDisplayNotation csiDisplayNotation

typedef enum csiRepresentation csiRepresentation

typedef struct csiFeatureParameter csiFeatureParameter

typedef enum csiLogLevel csiLogLevel

typedef enum csiErr csiErr

typedef enum csiEventType csiEventType

typedef enum csiAcquisitionMode csiAcquisitionMode

typedef enum csiMemTransferStatus csiMemTransferStatus

typedef struct csiMemTransferInfo csiMemTransferInfo

typedef struct csiTLProducerInfos csiTLProducerInfos

typedef struct csiDeviceInfo csiDeviceInfo

typedef struct csiDiscoveryInfo csiDiscoveryInfo

typedef struct csiTLInterfaceInfo csiTLInterfaceInfo

typedef struct csiTLInterfaceDiscoveryInfo csiTLInterfaceDiscoveryInfo

typedef struct csiDataStreamInfo csiDataStreamInfo

typedef struct csiImageInfo csiImageInfo

typedef struct csiEventData csiEventData

typedef struct CSI_DLL_EXPORT csiNewBufferEventData csiNewBufferEventData

typedef struct csiAcquistionStatistics csiAcquistionStatistics

typedef enum csiDownloadOptions csiDownloadOptions

typedef enum csiUploadOptions csiUploadOptions

typedef struct csiFileTransferParams csiFileTransferParams

typedef struct csiDownloadParams csiUploadDownloadUploadParams

typedef struct csiUploadParams csiUploadParams

typedef enum csiReferenceImgLoadMode csiReferenceImgLoadMode

typedef struct csiCalibrationParams csiCalibrationParams

typedef enum CalibrationMode CalibrationMode

typedef void * CB_OBJECT

typedef void(* CB_FEATURE_INVALIDATED_PFN) (const char *featureName, void *userdata)

typedef void(* csiDiscoveryInfoCallbackFunc) (const csiDiscoveryInfo *discoveryInfo)

typedef void(* csiDiscoveryTLInterfaceInfoCallbackFunc) (const csiTLInterfaceDiscoveryInfo *discoveryInfo)

typedef bool(* csiMemTransferCallbackFunc) (const csiMemTransferInfo *info, struct csiMemTransferUserData *userdata)

typedef void(* csiLogSinkCallbackFunc) (csiLogLevel, const char *message, struct csiLogUserData *userdata)

Enumerations

enum csiPixelFormat { CSI_PIX_FORMAT_UNKNOWN = 0x00000000, CSI_PIX_FORMAT_MONO8 = CSI_MONO_FORMAT | CSI_OCCUPY_8BIT | 0x001, CSI_PIX_FORMAT_MONO10 = CSI_MONO_FORMAT | CSI_OCCUPY_16BIT | 0x003, CSI_PIX_FORMAT_MONO10_PACKED = CSI_MONO_FORMAT | CSI_OCCUPY_10BIT | 0x046, CSI_PIX_FORMAT_MONO12 = CSI_MONO_FORMAT | CSI_OCCUPY_16BIT | 0x005, CSI_PIX_FORMAT_MONO12_PACKED = CSI_MONO_FORMAT | CSI_OCCUPY_12BIT | 0x047, CSI_PIX_FORMAT_MONO16 = CSI_MONO_FORMAT | CSI_OCCUPY_16BIT | 0x007, CSI_PIX_FORMAT_RGB8 = CSI_COLOR_FORMAT | CSI_OCCUPY_24BIT | 0x014, CSI_PIX_FORMAT_RGB10_PACKED = CSI_COLOR_FORMAT | CSI_OCCUPY_32BIT | 0x01D, CSI_PIX_FORMAT_RGB10 = CSI_COLOR_FORMAT | CSI_OCCUPY_48BIT | 0x018, CSI_PIX_FORMAT_BGR10 = CSI_COLOR_FORMAT | CSI_OCCUPY_48BIT | 0x019, CSI_PIX_FORMAT_RGB12 = CSI_COLOR_FORMAT | CSI_OCCUPY_48BIT | 0x01A, CSI_PIX_FORMAT_BGR12 = CSI_COLOR_FORMAT | CSI_OCCUPY_48BIT | 0x01B, CSI_PIX_FORMAT_RGBA8 = CSI_COLOR_FORMAT | CSI_OCCUPY_32BIT | 0x016, CSI_PIX_FORMAT_BGRA8 = CSI_COLOR_FORMAT | CSI_OCCUPY_32BIT | 0x017, CSI_PIX_FORMAT_BGR8 = CSI_COLOR_FORMAT | CSI_OCCUPY_24BIT | 0x015, CSI_PIX_FORMAT_RGB16 = CSI_COLOR_FORMAT | CSI_OCCUPY_48BIT | 0x033, CSI_PIX_FORMAT_RGBA10 = CSI_COLOR_FORMAT | CSI_OCCUPY_64BIT | 0x05F, CSI_PIX_FORMAT_RGBA12 = CSI_COLOR_FORMAT | CSI_OCCUPY_64BIT | 0x061, CSI_PIX_FORMAT_RGBA16 = CSI_COLOR_FORMAT | CSI_OCCUPY_64BIT | 0x064, CSI_PIX_FORMAT_BayerGR8 = CSI_MONO_FORMAT | CSI_OCCUPY_8BIT | 0x008, CSI_PIX_FORMAT_BayerRG8 = CSI_MONO_FORMAT | CSI_OCCUPY_8BIT | 0x009, CSI_PIX_FORMAT_BayerGB8 = CSI_MONO_FORMAT | CSI_OCCUPY_8BIT | 0x00A, CSI_PIX_FORMAT_BayerBG8 = CSI_MONO_FORMAT | CSI_OCCUPY_8BIT | 0x00B, CSI_PIX_FORMAT_BayerGR12 = CSI_MONO_FORMAT | CSI_OCCUPY_16BIT | 0x010, CSI_PIX_FORMAT_BayerRG12 = CSI_MONO_FORMAT | CSI_OCCUPY_16BIT | 0x011, CSI_PIX_FORMAT_BayerGB12 = CSI_MONO_FORMAT | CSI_OCCUPY_16BIT | 0x012, CSI_PIX_FORMAT_BayerBG12 = CSI_MONO_FORMAT | CSI_OCCUPY_16BIT | 0x013 }

Defines the currently supported pixel data formats.

enum csiDeviceAccessMode { CSI_DEV_MODE_UNKNOWN = 0x00, CSI_DEV_MODE_NONE = 0x01, CSI_DEV_MODE_EXCLUSIVE, CSI_DEV_MODE_READ, CSI_DEV_MODE_CONTROL }

Defines the mode in which a device will be opened.

enum csiDeviceAccessStatus { CSI_DEV_ACCESS_STATUS_UNKNOWN = 0x00, CSI_DEV_ACCESS_STATUS_READWRITE = 0x01, CSI_DEV_ACCESS_STATUS_READONLY = 0x02, CSI_DEV_ACCESS_STATUS_NOACCESS = 0x03, CSI_DEV_ACCESS_STATUS_BUSY = 0x04, CSI_DEV_ACCESS_STATUS_OPEN_READWRITE = 0x05, CSI_DEV_ACCESS_STATUS_OPEN_READ = 0x06 }

Defines the current access status of a device as returned from device discovery.

enum csiFeatureType { CSI_UNKNOWN_TYPE, CSI_BOOLEAN_TYPE, CSI_INT_TYPE, CSI_FLOAT_TYPE, CSI_STRING_TYPE, CSI_ENUMERATION_TYPE, CSI_ENUMENTRY_TYPE, CSI_CATEGORY, CSI_COMMAND, CSI_REGISTER, CSI_PORT }

Defines the data type of a feature.

enum csiAccessMode { CSI_ACCESS_UNKNOWN, CSI_ACCESS_NOT_AVAILABLE, CSI_ACCESS_READ_ONLY, CSI_ACCESS_READ_WRITE, CSI_ACCESS_WRITE_ONLY }

Defines the access mode of a feature.

enum csiFeatureVisibility { CSI_VISIBILITY_BEGINNER = 1, CSI_VISIBILITY_EXPERT, CSI_VISIBILITY_GURU, CSI_VISIBILITY_DEVELOPER, CSI_VISIBILITY_INVISIBLE }

Defines the visibility of a feature depending on the role of a user.

enum csiModuleLevel { CSI_UNKNOWN_MODULE, CSI_TRANSPORTLAYER_MODULE, CSI_INTERFACE_MODULE, CSI_DEVICE_MODULE, CSI_LOCAL_DEVICE_MODULE, CSI_STREAM_MODULE, CSI_BUFFER_MODULE }

Defines the module level on which a specific action should be performed.

enum csiDisplayNotation { CSI_NOTATION_AUTOMATIC, CSI_NOTATION_FIXED, CSI_NOTATION_SCIENTIFIC }

Defines the display notation for a floating-point feature.

enum csiRepresentation { CSI_REPRESENTATION_LINEAR, CSI_REPRESENTATION_LOGARITHMIC, CSI_REPRESENTATION_BOOLEAN, CSI_REPRESENTATION_PURENUMBER, CSI_REPRESENTATION_HEX, CSI_REPRESENTATION_IP, CSI_REPRESENTATION_MAC, CSI_REPRESENTATION_UNDEFINED }

Defines how a feature value should be represented when printed in UI.

enum csiLogLevel { CSI_LOGLEVEL_NONE = 0, CSI_LOGLEVEL_ERROR = 1, CSI_LOGLEVEL_WARN = 2, CSI_LOGLEVEL_INFO = 4, CSI_LOGLEVEL_DEBUG = 8, CSI_LOGLEVEL_TRACE = 16 }

Defines the severity of log messages coming from the SDK.

enum csiErr { csiSuccess = 0, csiNotInitialized = -100, csiInvalidState = -101, csiNotOpened = -102, csiNoImageDataAvailable = -103, csiNotFound = -104, csiInvalidParameter = -105, csiNotAvailable = -106, csiFunctionNotAvailable = -107, csiTimeout = -108, csiAborted = -109, csiFileOperationFailure = -110, csiFileOperationFatalError = -111, csiNoAccess = -112, csiWrongBufferSize = -113, csiInvalidBuffer = -114, csiResourceInUse = -115, csiNotImplemented = -116, csiInvalidHandle = -117, csiIOError = -118, csiParsingError = -119, csiInvalidValue = -120, csiResourceExhausted = -121, csiOutOfMemory = -122, csiBusy = -123, csiUnknown = -200, csiCustomErr = -0x0f000000 }

Defines possible error values.

enum csiEventType { CSI_EVT_NEWIMAGEDATA = 0x00, CSI_EVT_ERROR = 0x01, CSI_EVT_MODULE = 0x02, CSI_EVT_FEATURE_INVALIDATE = 0x03, CSI_EVT_FEATURE_CHANGE = 0x04, CSI_EVT_REMOTE_DEVICE = 0x05, CSI_EVT_CUSTOM = 0x1000 }

Defines event types that the user application can listen for.

enum csiAcquisitionMode { CSI_ACQUISITION_SINGLE_FRAME = 0x00000001, CSI_ACQUISITION_CONTINUOUS = 0xFFFFFFFF }

Defines acquisition mode.

enum csiMemTransferStatus { csiTransferStatusInit, csiTransferStatusInProgress, csiTransferStatusInProgressWaiting, csiTransferStatusFinishSucess, csiTransferStatusFinishError, csiTransferStatusCancelOnError }

Defines the status of memory transfer functions as it is provided in the transfer callback.

enum csiDownloadOptions { CSI_DOWNLOAD_NO_OPTIONS = 0 }

Defines download options.

enum csiUploadOptions { CSI_UPLOAD_NO_OPTIONS = 0, CSI_UPLOAD_IGNORE_CHECKSUM = 1 }

Defines upload options.

enum csiCalibrationLUT { CSI_DSNU_LUT1 = 1, CSI_DSNU_LUT2, CSI_PRNU_LUT1, CSI_PRNU_LUT2 }

Defines calibration LUT options.

enum csiReferenceImgLoadMode { CSI_LOAD_REF_IMG_FROM_DISC, CSI_ACQUIRE_REF_IMG_FROM_CAMERA }

Defines mode of loading reference imgage.

enum CalibrationMode { DSNU_CALIBRATION = 1, PRNU_CALIBRATION }

Defines mode for calibration.

Functions

CSI_DLL_EXPORT csiErr csiInit (csiLogLevel logLvl, csiLogSinkCallbackFunc logCallbackFunc CSI_DEFAULT_PARAM_NULL, csiLogUserData *userdata CSI_DEFAULT_PARAM_NULL)

Initializes the SDK. Needs to be called first before any other function of the SDK is called!

CSI_DLL_EXPORT csiErr csiClose ()

Closes the SDK and frees all allocated memory and interfaces.

CSI_DLL_EXPORT csiErr csiReset ()

Reset the SDK and frees all allocated memory and interfaces.

CSI_DLL_EXPORT csiErr csiDiscoverDevices (csiDiscoveryInfo *discoveryInfoOut, uint64_t timeoutMilliseconds, csiDiscoveryInfoCallbackFunc discCallbackFunc CSI_DEFAULT_PARAM_NULL, const char *additionalSearchPaths CSI_DEFAULT_PARAM_NULL, bool overrideSearchPath CSI_DEFAULT_PARAM_FALSE)

This function will look for attached GenICAM-devices on the available transport layers.

CSI_DLL_EXPORT csiErr csiGetDeviceInfo (uint32_t deviceIndex, csiDeviceInfo *deviceInfoOut)

A function to get information about the found devices in the system.

CSI_DLL_EXPORT csiErr csiDiscoverTLInterfaces (csiTLInterfaceDiscoveryInfo *discoveryInfoOut, uint64_t timeoutMilliseconds, csiDiscoveryTLInterfaceInfoCallbackFunc discCallbackFunc CSI_DEFAULT_PARAM_NULL, const char *additionalSearchPaths CSI_DEFAULT_PARAM_NULL, bool overrideSearchPath CSI_DEFAULT_PARAM_FALSE)

This function will look for TL interfaces provided by the available transport layers.

CSI_DLL_EXPORT csiErr csiGetNumberOfTLProducers (int32_t *numTLProducers)

Returns the number of available transport layers in the system.

CSI_DLL_EXPORT csiErr csiGetTLProducerPathByIndex (char *transportLayerPath, size_t bufferSize, uint32_t index)

Returns a path of transport layer producer specified by index.

CSI_DLL_EXPORT csiErr csiGetTLProducerInfobyFilePath (csiTLProducerInfos *tlProducerInfos, const char *producerName)

Returns additional information about a transport layer.

CSI_DLL_EXPORT csiErr csiOpenDevice (const char *deviceIdentifier, const char *interfaceID, csiHandle *deviceHandleOut, uint64_t timeoutMilliseconds, csiDeviceAccessMode openMode)

Open the device given by the index. The TL of this index is used.

CSI_DLL_EXPORT csiErr csiCloseDevice (csiHandle deviceHandle)

Close the connection to the specific device.

CSI_DLL_EXPORT csiErr csiCheckAndReallocBuffers (csiHandle deviceHandle)

Reallocating buffers if the size of allocated buffers is diffrent from the require size.

CSI_DLL_EXPORT csiErr csiStartAcquisition (csiHandle deviceHandle, csiAcquisitionMode mode)

Start the acquisition on the device and created data streams.

CSI_DLL_EXPORT csiErr csiStopAcquisition (csiHandle deviceHandle)

Stop the acquisition on the device.

CSI_DLL_EXPORT csiErr csiAbortAcquisition (csiHandle deviceHandle)

Aborts the Acquisition on the device immediately.

CSI_DLL_EXPORT csiErr csiGetNumberOfDataStreams (csiHandle deviceHandle, uint32_t *numberOfStreamsOut)

Return the available number of data streams of the device.

CSI_DLL_EXPORT csiErr csiGetDataStreamInfo (csiHandle deviceHandle, uint32_t dsIndex, csiDataStreamInfo *dataStreamInfoOut)

Return information about the desired data stream.

CSI_DLL_EXPORT csiErr csiGetDeviceDataStreamInfo (csiHandle moduleHandle, uint32_t dsIndex, csiDataStreamInfo *dataStreamInfoOut)

Return information about the desired data stream and device.

CSI_DLL_EXPORT csiErr csiCreateDataStream (csiHandle deviceHandle, uint32_t dsIndex, csiHandle *dataStreamOut, uint32_t numberOfBuffers, size_t bufferSize CSI_DEFAULT_PARAM_ZERO)

Create a data stream to receive images.

CSI_DLL_EXPORT csiErr csiCloseDataStream (csiHandle dataStream)

Close the data stream.

CSI_DLL_EXPORT csiErr csiRegisterEvent (csiHandle moduleHandle, csiEventType evtType, csiHandle *eventOut, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE)

Register an event which will be signaled in the case the desired event is triggered.

CSI_DLL_EXPORT csiErr csiWaitForEvent (csiHandle evt, uint64_t timeoutMilliseconds, csiEventData **evtDataOut)

Wait for a desired event to happen.

CSI_DLL_EXPORT csiErr csiUnregisterEvent (csiHandle evt)

Unregister a specific event from the event handler.

CSI_DLL_EXPORT csiErr csiEventKill (csiHandle evt)

Cancel all waiting functions related to this event.

CSI_DLL_EXPORT csiErr csiGetNextImage (csiHandle eventHandle, csiNewBufferEventData **bufferInfoOut, uint64_t timeoutMilliseconds)

Get the next image from the data stream.

CSI_DLL_EXPORT csiErr csiReleaseImage (csiHandle dataStream, const csiNewBufferEventData *bufferInfo)

Release the image back into the processing buffer from the device.

CSI_DLL_EXPORT csiErr csiGetAcquisitionStatistics (csiHandle dataStream, csiAcquistionStatistics *stats)

Retrieve the statistical buffer regarding the data stream (e.g. transmitted frames, etc.).

CSI_DLL_EXPORT csiErr csiOpenTLInterface (csiTLInterfaceInfo interfaceInfo, csiHandle *interfaceHandleOut, uint64_t timeoutMilliseconds)

Open the interface given by the interface information.

CSI_DLL_EXPORT csiErr csiCloseTLInterface (csiHandle interfaceHandle)

Close the connection to the specific interface.

CSI_DLL_EXPORT csiErr csiGetFeatureBool (csiHandle moduleHandle, const char *featureName, bool *valueOut, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE)

Retrieve a boolean feature from the device.

CSI_DLL_EXPORT csiErr csiSetFeatureBool (csiHandle moduleHandle, const char *featureName, bool value, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE)

Set a boolean feature on the device.

CSI_DLL_EXPORT csiErr csiGetFeatureInt (csiHandle moduleHandle, const char *featureName, int64_t *valueOut, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE)

Retrieve an integer feature from the device.

CSI_DLL_EXPORT csiErr csiSetFeatureInt (csiHandle moduleHandle, const char *featureName, int64_t value, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE)

Set an integer feature on the device.

CSI_DLL_EXPORT csiErr csiGetFeatureFloat (csiHandle moduleHandle, const char *featureName, double *valueOut, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE)

Retrieve a floating point feature from the device.

CSI_DLL_EXPORT csiErr csiSetFeatureFloat (csiHandle moduleHandle, const char *featureName, double value, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE)

Set a floating point value feature on the device.

CSI_DLL_EXPORT csiErr csiGetFeatureString (csiHandle moduleHandle, const char *featureName, char *valueOut, size_t *sizeOut, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE)

Retrieve a string feature from the device.

CSI_DLL_EXPORT csiErr csiSetFeatureString (csiHandle moduleHandle, const char *featureName, const char *value, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE)

Set a string feature on the device.

CSI_DLL_EXPORT csiErr csiExecuteCommand (csiHandle moduleHandle, const char *featureName, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE)

Execute a command on the device.

CSI_DLL_EXPORT csiErr csiIsCommandActive (csiHandle moduleHandle, const char *featureName, bool *isActive, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE)

Check if a command is still active.

CSI_DLL_EXPORT csiErr csiGetFeatureReg (csiHandle moduleHandle, const char *featureName, char *buffer, size_t *length, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE)

Retrieve a register value from the device.

CSI_DLL_EXPORT csiErr csiSetFeatureReg (csiHandle moduleHandle, const char *featureName, const char *buffer, size_t length, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE)

Set a register value on the device.

CSI_DLL_EXPORT csiErr csiGetFeatureEnum (csiHandle moduleHandle, const char *featureName, csiFeatureParameter *featureParamOut, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE)

Retrieve an enumeration feature from the device.

CSI_DLL_EXPORT csiErr csiSetFeatureEnum (csiHandle moduleHandle, const char *featureName, const char *value, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE)

Set an enumeration feature on the device.

CSI_DLL_EXPORT csiErr csiGetFeatureParameter (csiHandle moduleHandle, const char *featureName, csiFeatureParameter *featureParamOut, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE)

Retrieve a specific feature from the device. Detailed information about this feature will be returned.

CSI_DLL_EXPORT csiErr csiGetFeatureAccessMode (csiHandle moduleH, const char *featureName, csiAccessMode *access, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE)

Retrieve a specific feature from the device. The access mode of this feature will be returned.

CSI_DLL_EXPORT csiErr csiIterateFeatureTree (csiHandle moduleHandle, const char *rootFeatureName, uint32_t index, char *featureNameOut, size_t nameBuffSize, csiFeatureType *type, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE)

Provides a possibility to iterate through all available features on the camera.

CSI_DLL_EXPORT csiErr csiGetFeatureEnumEntryCount (csiHandle moduleHandle, const char *featureName, uint32_t *count, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE)

Retrieve the entries size of an enumeration feature from the device by feature name.

CSI_DLL_EXPORT csiErr csiGetFeatureEnumEntryByIndex (csiHandle moduleHandle, const char *featureName, int32_t enumIndex, csiFeatureParameter *featureParamOut, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE)

Retrieve an enumeration feature from the device by using its index.

CSI_DLL_EXPORT csiErr csiGetFeatureEnumEntryByName (csiHandle moduleHandle, const char *featureName, const char *enumValue, csiFeatureParameter *featureParamOut, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE)

Retrieve an enumeration feature from the device by using its name.

CSI_DLL_EXPORT csiErr csiGetUpdateFileType (csiHandle moduleHandle, const char *fileName, char *fileTypeOut, size_t bufferSize)

Request the update file type of a file (if available).

CSI_DLL_EXPORT csiErr csiFileDownloadToDevice (csiHandle moduleHandle, csiHandle localDevice, const char *fileName, const char *fileType, uint64_t timeoutMilliseconds, csiMemTransferCallbackFunc listener CSI_DEFAULT_PARAM_NULL, csiMemTransferUserData *userdata CSI_DEFAULT_PARAM_NULL)

Downloads a file located on the local PC to the camera.

CSI_DLL_EXPORT csiErr csiFileUploadFromDevice (csiHandle moduleHandle, csiHandle localDevice, const char *fileName, const char *fileType, uint64_t timeoutMilliseconds, csiMemTransferCallbackFunc listener CSI_DEFAULT_PARAM_NULL, csiMemTransferUserData *userdata CSI_DEFAULT_PARAM_NULL)

Uploads a file from device to the local PC.

CSI_DLL_EXPORT csiErr csiFileDownloadToDeviceEx (csiHandle moduleHandle, csiHandle localDevice, const csiDownloadParams params, uint64_t timeoutMilliseconds, csiMemTransferCallbackFunc listener CSI_DEFAULT_PARAM_NULL, csiMemTransferUserData *userdata CSI_DEFAULT_PARAM_NULL)

Downloads a file located on the local PC to the camera providing custom options.

CSI_DLL_EXPORT csiErr csiFileUploadFromDeviceEx (csiHandle moduleHandle, csiHandle localDevice, const csiUploadParams params, uint64_t timeoutMilliseconds, csiMemTransferCallbackFunc listener CSI_DEFAULT_PARAM_NULL, csiMemTransferUserData *userdata CSI_DEFAULT_PARAM_NULL)

Uploads a file from device to the local PC providing custom options.

CSI_DLL_EXPORT csiErr csiReadMemory (csiHandle moduleHandle, uint64_t address, char *buffer, size_t sizeBytes)

Read memory from a register address on the device.

CSI_DLL_EXPORT csiErr csiWriteMemory (csiHandle moduleHandle, uint64_t address, const char *buffer, size_t sizeBytes)

Write memory to a register address on the device.

CSI_DLL_EXPORT csiErr csiIsModuleLittleEndian (csiHandle moduleHandle, csiModuleLevel lvl, bool *isLittleEndian)

Write memory to a register address on the device.

CSI_DLL_EXPORT csiErr csiGetErrorDescription (csiErr error, char *bufferOut, size_t bufferSize)

Returns a human readable description of an error code.

CSI_DLL_EXPORT unsigned char csiBitsPerPixelFromFormat (const csiPixelFormat format)

Returns the number of bits per pixels for the given pixel format.

CSI_DLL_EXPORT csiErr csiRegisterInvalidateCB (csiHandle moduleHandle, const char *featureName, CB_OBJECT objCB, CB_FEATURE_INVALIDATED_PFN pfnFeatureInvalidateCB, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE)

Register an invalidation callback function to a specific feature by name.

CSI_DLL_EXPORT csiErr csiUnRegisterInvalidateCB (csiHandle moduleHandle, const char *featureName, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE)

Unregister an invalidation callback function from a specific feature.

CSI_DLL_EXPORT csiErr csiGetLibraryVersion (uint32_t *major, uint32_t *minor, uint32_t *patch, uint32_t *revision, uint32_t *build)

Returns the current library version.

CSI_DLL_EXPORT csiErr csiSetFeatureCachingDisabled (bool disableCaching)

disable feature caching

CSI_DLL_EXPORT csiErr csiIsFeatureCachingDisabled (bool *isDisabled)

retrieve if feature caching is disabled or not

CSI_DLL_EXPORT csiErr csiGenerateAndUploadCalibrationData (csiHandle devHandle, csiCalibrationLUT LUTSelector, csiReferenceImgLoadMode imgLoadMode, csiCalibrationParams calibParam, csiNewBufferEventData *refImage, const char *imgFile)

Generate and upload calibration file to the camera.

CSI_DLL_EXPORT csiErr csiGenerateAndSaveCalibrationDataToFile (csiHandle devHandle, CalibrationMode calibMode, csiReferenceImgLoadMode imgLoadMode, csiCalibrationParams calibParam, csiNewBufferEventData *refImage, const char *imgFile, const char *calibrationFile)

Generate and save calibration file to the PC memory in provided file path.

CSI_DLL_EXPORT csiErr csiGenerateReferenceImage (csiHandle devHandle, const CalibrationMode calibMode, csiReferenceImgLoadMode imgLoadMode, csiCalibrationParams calibParam, const csiNewBufferEventData *refImage, const char *imgFile, int *referenceImage, int *resMaxValue)

Generates calibration data and applies it on the input image to generate calibrated output image.

Macro Definition Documentation

#define CSI_COLOR_FORMAT  0x02000000

#define CSI_DISCOVERY_INFO_DEVICE_COUNT  16

#define CSI_INFITIE_TIME  0xffffffff

#define CSI_INFO_INT_BUFFER_SIZE  512

#define CSI_INFO_STRING_BUFFER_SIZE  512

#define CSI_MONO_FORMAT  0x01000000

#define CSI_OCCUPY_10BIT  0x000A0000

#define CSI_OCCUPY_12BIT  0x000C0000

#define CSI_OCCUPY_14BIT  0x000E0000

#define CSI_OCCUPY_16BIT  0x00100000

#define CSI_OCCUPY_24BIT  0x00180000

#define CSI_OCCUPY_30BIT  0x001E0000

#define CSI_OCCUPY_32BIT  0x00200000

#define CSI_OCCUPY_48BIT  0x00300000

#define CSI_OCCUPY_64BIT  0x00400000

#define CSI_OCCUPY_8BIT  0x00080000

#define CSI_TL_INTERFACE_COUNT  16

Typedef Documentation

typedef enum CalibrationMode CalibrationMode

typedef void(* CB_FEATURE_INVALIDATED_PFN) (const char *featureName, void *userdata)

typedef void* CB_OBJECT

typedef enum csiAccessMode csiAccessMode

typedef enum csiAcquisitionMode csiAcquisitionMode

typedef struct csiAcquistionStatistics csiAcquistionStatistics

typedef struct csiCalibrationParams csiCalibrationParams

typedef struct csiDataStreamInfo csiDataStreamInfo

typedef enum csiDeviceAccessMode csiDeviceAccessMode

typedef enum csiDeviceAccessStatus csiDeviceAccessStatus

typedef struct csiDeviceInfo csiDeviceInfo

typedef struct csiDiscoveryInfo csiDiscoveryInfo

typedef void(* csiDiscoveryInfoCallbackFunc) (const csiDiscoveryInfo *discoveryInfo)

typedef void(* csiDiscoveryTLInterfaceInfoCallbackFunc) (const csiTLInterfaceDiscoveryInfo *discoveryInfo)

typedef enum csiDisplayNotation csiDisplayNotation

typedef enum csiDownloadOptions csiDownloadOptions

typedef enum csiErr csiErr

typedef struct csiEventData csiEventData

typedef enum csiEventType csiEventType

typedef struct csiFeatureParameter csiFeatureParameter

typedef enum csiFeatureType csiFeatureType

typedef enum csiFeatureVisibility csiFeatureVisibility

typedef struct csiFileTransferParams csiFileTransferParams

typedef uint64_t csiHandle

typedef struct csiImageInfo csiImageInfo

typedef enum csiLogLevel csiLogLevel

typedef void(* csiLogSinkCallbackFunc) (csiLogLevel, const char *message, struct csiLogUserData *userdata)

typedef bool(* csiMemTransferCallbackFunc) (const csiMemTransferInfo *info, struct csiMemTransferUserData *userdata)

typedef struct csiMemTransferInfo csiMemTransferInfo

typedef enum csiMemTransferStatus csiMemTransferStatus

typedef enum csiModuleLevel csiModuleLevel

typedef struct CSI_DLL_EXPORT csiNewBufferEventData csiNewBufferEventData

typedef enum csiPixelFormat csiPixelFormat

typedef enum csiReferenceImgLoadMode csiReferenceImgLoadMode

typedef enum csiRepresentation csiRepresentation

typedef struct csiTLInterfaceDiscoveryInfo csiTLInterfaceDiscoveryInfo

typedef struct csiTLInterfaceInfo csiTLInterfaceInfo

typedef struct csiTLProducerInfos csiTLProducerInfos

typedef struct csiDownloadParams csiUploadDownloadUploadParams

typedef enum csiUploadOptions csiUploadOptions

typedef struct csiUploadParams csiUploadParams

Enumeration Type Documentation

enum CalibrationMode

Defines mode for calibration.

Enumerator:

DSNU_CALIBRATION

PRNU_CALIBRATION

enum csiAccessMode

Defines the access mode of a feature.

Enumerator:

CSI_ACCESS_UNKNOWN

Unknown access mode, feature might not be accessible

CSI_ACCESS_NOT_AVAILABLE

Feature is flagged as Not Available (NA). There are multiple reasons for which a feature might become not available. For example, because the XML description defines it. It might also be temporarily not available because of the value of another node.

CSI_ACCESS_READ_ONLY

Feature is read only.

CSI_ACCESS_READ_WRITE

Feature can be accessed in read and write mode.

CSI_ACCESS_WRITE_ONLY

Feature can only be written.

enum csiAcquisitionMode

Defines acquisition mode.

Enumerator:

CSI_ACQUISITION_SINGLE_FRAME

Acquire a single frame only

CSI_ACQUISITION_CONTINUOUS

Perform continuous frame acquisition

enum csiCalibrationLUT

Defines calibration LUT options.

Enumerator:

CSI_DSNU_LUT1

CSI_DSNU_LUT2

CSI_PRNU_LUT1

CSI_PRNU_LUT2

enum csiDeviceAccessMode

Defines the mode in which a device will be opened.

Enumerator:

CSI_DEV_MODE_UNKNOWN

Undefined access mode

CSI_DEV_MODE_NONE

No device access mode specified

CSI_DEV_MODE_EXCLUSIVE

The device will be opened exclusively; no other application will be allowed to open the device.

CSI_DEV_MODE_READ

The device will be opened in read only mode, other application might open it in read only mode too.

CSI_DEV_MODE_CONTROL

The device will be opened in control mode (read/write), other application might still be able to open it in read mode.

enum csiDeviceAccessStatus

Defines the current access status of a device as returned from device discovery.

Enumerator:

CSI_DEV_ACCESS_STATUS_UNKNOWN

Device is not yet open and can be opened in read/write mode.

CSI_DEV_ACCESS_STATUS_READWRITE

Device is not yet open and can be opened in read/write mode.

CSI_DEV_ACCESS_STATUS_READONLY

Device is not yet open and can be opened in read only mode.

CSI_DEV_ACCESS_STATUS_NOACCESS

Device is listed but cannot be opened.

CSI_DEV_ACCESS_STATUS_BUSY

Device is open by another process thus cannot be opened again.

CSI_DEV_ACCESS_STATUS_OPEN_READWRITE

Device already owned by this producer in read write mode.

CSI_DEV_ACCESS_STATUS_OPEN_READ

Device already owned by this producer in read only mode.

enum csiDisplayNotation

Defines the display notation for a floating-point feature.

Enumerator:

CSI_NOTATION_AUTOMATIC

Notation not specified, can be decided by the application

CSI_NOTATION_FIXED

Fixed notation

CSI_NOTATION_SCIENTIFIC

Scientific notation

enum csiDownloadOptions

Defines download options.

Enumerator:

CSI_DOWNLOAD_NO_OPTIONS

enum csiErr

Defines possible error values.

Enumerator:

csiSuccess

No error

csiNotInitialized

System is not initialized, call csiInit() first

csiInvalidState

An invalid state occurred, see log output for more information

csiNotOpened

There was an action that requires the device / network / stream to be opened

csiNoImageDataAvailable

There was no image data available

csiNotFound

General error that the requested information was not found, see log for more detailed info on this error.

csiInvalidParameter

A parameter had an invalid value

csiNotAvailable

An expected result or a resource was not available

csiFunctionNotAvailable

The called function or a sub-function is not available

csiTimeout

A timeout occurred

csiAborted

A pending operation was aborted

csiFileOperationFailure

There was an error during file operation, see log for more information

csiFileOperationFatalError

There was a fatal error during file operation, see log for more information

csiNoAccess

Access denied (e.g., when trying to write a read only feature)

csiWrongBufferSize

A given buffer was too small to store the requested data

csiInvalidBuffer

The requested buffer is not valid

csiResourceInUse

The requested resource is already in use by the transport layer

csiNotImplemented

A function that was called is not yet implemented

csiInvalidHandle

A handle passed as parameter is not valid

csiIOError

There was an error during an I/O operation (e.g. file or network)

csiParsingError

An error occurred when parsing an XML node (map file)

csiInvalidValue

A value that was passed parameter is not valid

csiResourceExhausted

A requested resource is exhausted (e.g. hard disk space)

csiOutOfMemory

Memory allocation failed, there is no more memory available

csiBusy

The requested operation cannot be executed because the system is busy

csiUnknown

Generic error, see log for more information

csiCustomErr

Custom error codes defined by specific transport layers

enum csiEventType

Defines event types that the user application can listen for.

Enumerator:

CSI_EVT_NEWIMAGEDATA

New image data event, can be registered on data stream module only

CSI_EVT_ERROR

Error event, can be registered on all module levels

CSI_EVT_MODULE

Generic module event, can be registered on all module levels

CSI_EVT_FEATURE_INVALIDATE

CSI_EVT_FEATURE_CHANGE

CSI_EVT_REMOTE_DEVICE

CSI_EVT_CUSTOM

Custom user defined event types

enum csiFeatureType

Defines the data type of a feature.

Enumerator:

CSI_UNKNOWN_TYPE

Unknown type

CSI_BOOLEAN_TYPE

Boolean data type

CSI_INT_TYPE

Integer data type

CSI_FLOAT_TYPE

Floating point data type

CSI_STRING_TYPE

String data type

CSI_ENUMERATION_TYPE

Enumeration feature type

CSI_ENUMENTRY_TYPE

CSI_CATEGORY

Category feature type

CSI_COMMAND

Command feature type

CSI_REGISTER

Register feature type

CSI_PORT

Port of the feature note map

enum csiFeatureVisibility

Defines the visibility of a feature depending on the role of a user.

Enumerator:

CSI_VISIBILITY_BEGINNER

Feature is visible to beginner users and higher

CSI_VISIBILITY_EXPERT

Feature is visible to expert users and higher

CSI_VISIBILITY_GURU

Feature is visible to guru users and higher

CSI_VISIBILITY_DEVELOPER

Feature is visible to developer users only

CSI_VISIBILITY_INVISIBLE

Feature is invisible to any user

enum csiLogLevel

Defines the severity of log messages coming from the SDK.

Enumerator:

CSI_LOGLEVEL_NONE

CSI_LOGLEVEL_ERROR

CSI_LOGLEVEL_WARN

CSI_LOGLEVEL_INFO

CSI_LOGLEVEL_DEBUG

CSI_LOGLEVEL_TRACE

enum csiMemTransferStatus

Defines the status of memory transfer functions as it is provided in the transfer callback.

Enumerator:

csiTransferStatusInit

Transfer was initialized

csiTransferStatusInProgress

Transfer is in progress

csiTransferStatusInProgressWaiting

Transfer process is waiting for response from device

csiTransferStatusFinishSucess

Transfer finished successfully

csiTransferStatusFinishError

Transfer finished with an error

csiTransferStatusCancelOnError

Transfer was canceled after an error occurred

enum csiModuleLevel

Defines the module level on which a specific action should be performed.

Enumerator:

CSI_UNKNOWN_MODULE

Unknown module level

CSI_TRANSPORTLAYER_MODULE

Transport layer module (System module)

CSI_INTERFACE_MODULE

Interface module

CSI_DEVICE_MODULE

Device module

CSI_LOCAL_DEVICE_MODULE

Local device module

CSI_STREAM_MODULE

Data stream module

CSI_BUFFER_MODULE

Buffer module

enum csiPixelFormat

Defines the currently supported pixel data formats.

Note

The value of each entry corresponds to its value in PFNC standard. Please refer to the PFNC standard for more information on each specific format: https://www.emva.org/standards-technology/genicam/genicam-downloads/.

Enumerator:

CSI_PIX_FORMAT_UNKNOWN

CSI_PIX_FORMAT_MONO8

0x01080001 (PFNC_Mono8)

CSI_PIX_FORMAT_MONO10

0x01100003 (PFNC_Mono10)

CSI_PIX_FORMAT_MONO10_PACKED

0x010A0046 (PFNC_Mono10p)

CSI_PIX_FORMAT_MONO12

0x01100005 (PFNC_Mono12)

CSI_PIX_FORMAT_MONO12_PACKED

0x010C0047 (PFNC_Mono12p)

CSI_PIX_FORMAT_MONO16

0x01100007 (PFNC_Mono16)

CSI_PIX_FORMAT_RGB8

0x02180014 (PFNC_RGB8)

CSI_PIX_FORMAT_RGB10_PACKED

0x0220001D (PFNC_RGB10p32

CSI_PIX_FORMAT_RGB10

0x02300018 (PFNC_RGB10)

CSI_PIX_FORMAT_BGR10

0x02300019 (PFNC_BGR10)

CSI_PIX_FORMAT_RGB12

0x0230001A (PFNC_RGB12)

CSI_PIX_FORMAT_BGR12

0x0230001B (PFNC_BGR12)

CSI_PIX_FORMAT_RGBA8

0x02200016 (PFNC_RGBa8)

CSI_PIX_FORMAT_BGRA8

0x02200017 (PFNC_BGRa8)

CSI_PIX_FORMAT_BGR8

0x02180015 (PFNC_BGR8)

CSI_PIX_FORMAT_RGB16

0x02300033 (PFNC_RGB16)

CSI_PIX_FORMAT_RGBA10

0x0240005F (PFNC_RGBa10)

CSI_PIX_FORMAT_RGBA12

0x02400061 (PFNC_RGBa12)

CSI_PIX_FORMAT_RGBA16

0x02400064 (PFNC_RGBa16)

CSI_PIX_FORMAT_BayerGR8

0x01080008 (PFNC_BayerGR8)

CSI_PIX_FORMAT_BayerRG8

0x01080009 (PFNC_BayerRG8)

CSI_PIX_FORMAT_BayerGB8

0x0108000A (PFNC_BayerGB8)

CSI_PIX_FORMAT_BayerBG8

0x0108000B (PFNC_BayerBG8)

CSI_PIX_FORMAT_BayerGR12

0x01100010 (PFNC_BayerGR12)

CSI_PIX_FORMAT_BayerRG12

0x01100011 (PFNC_BayerRG12)

CSI_PIX_FORMAT_BayerGB12

0x01100012 (PFNC_BayerGB12)

CSI_PIX_FORMAT_BayerBG12

0x01100013 (PFNC_BayerBG12)

enum csiReferenceImgLoadMode

Defines mode of loading reference imgage.

Enumerator:

CSI_LOAD_REF_IMG_FROM_DISC

CSI_ACQUIRE_REF_IMG_FROM_CAMERA

enum csiRepresentation

Defines how a feature value should be represented when printed in UI.

Enumerator:

CSI_REPRESENTATION_LINEAR

Linear representation (default)

CSI_REPRESENTATION_LOGARITHMIC

Logarithmic representation

CSI_REPRESENTATION_BOOLEAN

Boolean representation (true / false)

CSI_REPRESENTATION_PURENUMBER

Represent as pure number

CSI_REPRESENTATION_HEX

Hexadecimal representation (0x…)

CSI_REPRESENTATION_IP

IP address representation

CSI_REPRESENTATION_MAC

Mac address representation

CSI_REPRESENTATION_UNDEFINED

Not defined, use default

enum csiUploadOptions

Defines upload options.

Enumerator:

CSI_UPLOAD_NO_OPTIONS

CSI_UPLOAD_IGNORE_CHECKSUM

Function Documentation

CSI_DLL_EXPORT csiErr csiAbortAcquisition (csiHandle deviceHandle)

Aborts the Acquisition on the device immediately.

Parameters

in

deviceHandle

provided by the csiOpenDevice-function.

Returns

csiSuccess or an error defined in the csiErr-Enum.

Note

When this function is executed, it aborts the current frame immediately without completing the current frame.

CSI_DLL_EXPORT unsigned char csiBitsPerPixelFromFormat (const csiPixelFormat format)

Returns the number of bits per pixels for the given pixel format.

Parameters

in

format

The pixel format to get the bits per pixel for.

Returns

The number of bits per pixels for the given pixel format or an error defined in the csiErr-Enum.

CSI_DLL_EXPORT csiErr csiCheckAndReallocBuffers (csiHandle deviceHandle)

Reallocating buffers if the size of allocated buffers is diffrent from the require size.

Parameters

in

deviceHandle

Handle provided by the csiOpenDevice-function.

Returns

csiSuccess or an error defined in the csiErr-Enum.

CSI_DLL_EXPORT csiErr csiClose ()

Closes the SDK and frees all allocated memory and interfaces.

Returns

Returns csiSuccess or an error defined in the csiErr-Enum.

CSI_DLL_EXPORT csiErr csiCloseDataStream (csiHandle dataStream)

Close the data stream.

Parameters

in

dataStream

A handle to the data stream to be closed.

Returns

csiSuccess or an error defined in the csiErr-Enum.

Note

Make sure to release all used buffers with csiReleaseImage() and unregister all events with csiUnregisterEvent() before closing the data stream. Any buffer or event will be invalid after a call to this function. In addition, acquisition must be stopped before calling this function. See csiStopAcquisition().

CSI_DLL_EXPORT csiErr csiCloseDevice (csiHandle deviceHandle)

Close the connection to the specific device.

Parameters

in

deviceHandle

Handle provided by the csiOpenDevice-function.

Returns

csiSuccess or an error defined in the csiErr-Enum.

Note

To grant access to the device for other applications, the connection should be closed when it is not needed anymore. The API will cleanup no longer needed memory when this command is executed.

CSI_DLL_EXPORT csiErr csiCloseTLInterface (csiHandle interfaceHandle)

Close the connection to the specific interface.

Parameters

in

interfaceHandle

Handle provided by the csiOpenTLInterface function.

Returns

csiSuccess or an error defined in the csiErr-Enum.

Note

To grant access to the underlying interface for other applications, the connection should be closed when it is not needed anymore. The API will cleanup no longer needed memory when this command is executed.

CSI_DLL_EXPORT csiErr csiCreateDataStream (csiHandle deviceHandle, uint32_t dsIndex, csiHandle * dataStreamOut, uint32_t numberOfBuffers, size_t bufferSize CSI_DEFAULT_PARAM_ZERO)

Create a data stream to receive images.

Parameters

in

deviceHandle

provided by the csiOpenDevice-function.

in

dsIndex

An index to a data stream. Starting from 0 to the number of available data streams as returned by csiGetNumberOfDataStreams().

out

dataStreamOut

A handle to the data stream that was created.

in

numberOfBuffers

The number of buffers to be allocated for the created data stream. This number must be at least 1, recommended is >= 3.

in

bufferSize

Size of one buffer in bytes. This parameter can be 0 in which case the size of a buffer will be determined by the standard 'PayloadSize' feature of a device.

Returns

csiSuccess or an error defined in the csiErr-Enum.

Note

Use this function in combination with csiGetNumberOfDataStreams() to get the total number of available data streams in the camera.

CSI_DLL_EXPORT csiErr csiDiscoverDevices (csiDiscoveryInfo * discoveryInfoOut, uint64_t timeoutMilliseconds, csiDiscoveryInfoCallbackFunc discCallbackFunc CSI_DEFAULT_PARAM_NULL, const char *additionalSearchPaths CSI_DEFAULT_PARAM_NULL, bool overrideSearchPath CSI_DEFAULT_PARAM_FALSE)

This function will look for attached GenICAM-devices on the available transport layers.

Parameters

out

discoveryInfoOut

pointer to a structure which will contain the information about the found devices. The information is the same provided to the callback function

in

timeoutMilliseconds

The time until when a response from a device needs to be received when doing a discovery

in

discCallbackFunc

Pointer to a callback function which receives information about the discovery progress. The callback function receives the current progress in %, number and names of the found devices Also a flag if the discovery is running is provided.

in

additionalSearchPaths

You can specify additional paths to search for transport layers. If you want to specify multiple paths, you need to divide the paths by using a ; -sign

in

overrideSearchPath

If this flag is set, only the path(s) provided in additionalSearchPaths will be searched for the cti - files to load

Returns

Returns csiSuccess or an error defined in the csiErr-Enum.

Note

By default, this function tries to use all available transport layers in the system. The search paths for the cti-files are set in the environmental variable GENICAM_GENTL64_PATH(64 bit) or GENICAM_GENTL32_PATH(32 bit applications)

CSI_DLL_EXPORT csiErr csiDiscoverTLInterfaces (csiTLInterfaceDiscoveryInfo * discoveryInfoOut, uint64_t timeoutMilliseconds, csiDiscoveryTLInterfaceInfoCallbackFunc discCallbackFunc CSI_DEFAULT_PARAM_NULL, const char *additionalSearchPaths CSI_DEFAULT_PARAM_NULL, bool overrideSearchPath CSI_DEFAULT_PARAM_FALSE)

This function will look for TL interfaces provided by the available transport layers.

Parameters

in

timeoutMilliseconds

The time until when a response from a transport layer needs to be received when doing a discovery call.

in

additionalSearchPaths

This flag indicates if only the paths given by the application or environment variable should be searched.

in

overrideSearchPath

This flag (if set) indicates that only the path(s) provided in 'additionalSearchPaths' will be searched for the cti-files to find.

out

discoveryInfoOut

Pointer to a structure which will contain the information about the found devices. The information is the same provided to the callback function.

Returns

csiSuccess or an error defined in the csiErr-Enum.

Note

By default, this function tries to use all available transport layers in the system. The search paths for the cti-files are set in the environmental variable GENICAM_GENTL64_PATH (64 bit) or GENICAM_GENTL32_PATH (32 bit applications).

CSI_DLL_EXPORT csiErr csiEventKill (csiHandle evt)

Cancel all waiting functions related to this event.

Parameters

in

evt

The handle of the event to be canceled.

Returns

csiSuccess or an error defined in the csiErr-Enum.

Note

Any pending call to csiWaitForEvent() or csiGetNextImage() on this event will be canceled.

CSI_DLL_EXPORT csiErr csiExecuteCommand (csiHandle moduleHandle, const char * featureName, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE)

Execute a command on the device.

Parameters

in

moduleHandle

Handle provided by the csiOpenDevice or csiOpenTLInterface function.

in

featureName

Name (Not the display name) of the feature to execute.

in

module

Module for which the parameter should be executed. Please use the enum csiModuleLevel to select. Determines if the parameter should be executed on the device-, transport layer-, interface- stream- or buffer-module.

Returns

csiSuccess or an error defined in the csiErr-Enum.

Note

The function will return immediately. Even if the triggered function is still active. To check if the command is still running, please use the function "csiIsCommandActive".

CSI_DLL_EXPORT csiErr csiFileDownloadToDevice (csiHandle moduleHandle, csiHandle localDevice, const char * fileName, const char * fileType, uint64_t timeoutMilliseconds, csiMemTransferCallbackFunc listener CSI_DEFAULT_PARAM_NULL, csiMemTransferUserData *userdata CSI_DEFAULT_PARAM_NULL)

Downloads a file located on the local PC to the camera.

Parameters

in

moduleHandle

Handle provided by the csiOpenDevice function.

in

localDevice

Handle of the local device module (usually the same handle value of device)

in

fileName

Path of the file to be uploaded.

in

fileType

The type of file to be uploaded (as returned from csiGetUpdateFileType).

in

timeoutMilliseconds

Maximum time allowed for the file upload operation.

in

listener

Optional callback function that can be called during the upload process to inform about the progress.

in

userdata

Optional user data that will be passed as parameter to the progress callback function.

Returns

csiSuccess or an error defined in the csiErr-Enum.

Note

An update process might take several minutes depending on the type of file, please choose a timeout of at least a few minutes here.

CSI_DLL_EXPORT csiErr csiFileDownloadToDeviceEx (csiHandle moduleHandle, csiHandle localDevice, const csiDownloadParams params, uint64_t timeoutMilliseconds, csiMemTransferCallbackFunc listener CSI_DEFAULT_PARAM_NULL, csiMemTransferUserData *userdata CSI_DEFAULT_PARAM_NULL)

Downloads a file located on the local PC to the camera providing custom options.

Parameters

in

moduleHandle

Handle provided by the csiOpenDevice function.

in

localDevice

Handle of the local device module (usually the same handle value of device)

in

params

File related parameter and options, see csiDownloadParams.

in

timeoutMilliseconds

Timeout for the update process in milliseconds.

in

listener

Optional callback function that will be called during the update process to inform about the progress.

in

userdata

Optional user data that will be passed as parameter to the progress callback function.

Returns

csiSuccess or an error defined in the csiErr-Enum.

Note

An update process might take several minutes depending on the type of file, please choose a timeout of at least a few minutes here.

CSI_DLL_EXPORT csiErr csiFileUploadFromDevice (csiHandle moduleHandle, csiHandle localDevice, const char * fileName, const char * fileType, uint64_t timeoutMilliseconds, csiMemTransferCallbackFunc listener CSI_DEFAULT_PARAM_NULL, csiMemTransferUserData *userdata CSI_DEFAULT_PARAM_NULL)

Uploads a file from device to the local PC.

Parameters

in

moduleHandle

Handle provided by the csiOpenDevice function.

in

localDevice

Handle of the local device module (usually the same handle value of device)

in

fileName

Name of the file on the local PC.

in

fileType

The type of file to be uploaded (as returned from csiGetUpdateFileType).

in

timeoutMilliseconds

Maximum time allowed for the file upload operation.

in

listener

Optional callback function that can be called during the transfer process to inform about the progress.

in

userdata

Optional user data that will be passed as parameter to the progress callback function.

Returns

csiSuccess or an error defined in the csiErr-Enum.

Note

A file transfer process might take several minutes depending on the type of file, please choose a timeout of at least a few minutes here.

CSI_DLL_EXPORT csiErr csiFileUploadFromDeviceEx (csiHandle moduleHandle, csiHandle localDevice, const csiUploadParams params, uint64_t timeoutMilliseconds, csiMemTransferCallbackFunc listener CSI_DEFAULT_PARAM_NULL, csiMemTransferUserData *userdata CSI_DEFAULT_PARAM_NULL)

Uploads a file from device to the local PC providing custom options.

Parameters

in

moduleHandle

Handle provided by the csiOpenDevice function.

in

localDevice

Handle of the local device module (usually the same handle value of device)

in

params

File related parameter and options, see csiUploadParams.

in

timeoutMilliseconds

Timeout for the upload procedure in milliseconds.

in

listener

Optional callback function that will be called during the transfer process to inform about the progress.

in

userdata

Optional user data that will be passed as parameter to the progress callback function.

Returns

csiSuccess or an error defined in the csiErr-Enum.

Note

A file transfer process might take several minutes depending on the type of file, please choose a timeout of at least a few minutes here.

CSI_DLL_EXPORT csiErr csiGenerateAndSaveCalibrationDataToFile (csiHandle devHandle, CalibrationMode calibMode, csiReferenceImgLoadMode imgLoadMode, csiCalibrationParams calibParam, csiNewBufferEventData * refImage, const char * imgFile, const char * calibrationFile)

Generate and save calibration file to the PC memory in provided file path.

Parameters

in

devHandle

Handle provided by the csiOpenDevice function.

in

calibMode

The desired calibration mode. Either DSNU or PRNU.

in

imgLoadMode

Specifying the source of the input image used to generate calibration data.

in

calibParam

The input parameters can be loaded from PC memory.

in

refImage

If the input image is captured from the camera, it can be loaded in this argument.

in

imgFile

If the input image is loaded from the PC, this can be a null .

in

calibrationFile

The absolute path of the output calibration file, where the file is to be saved. The appropriate file type of "*.dslr" or "*.prnu" should be mentioned.

Returns

csiSuccess or an error defined in the csiErr-Enum.

Note

In this function, even if input data is provided to both arguments of type "csiNewBufferEventData" and imageFilePath, the argument "imgLoadMode" of type "csiReferencingLoadMode" determines which input image data should be used for calibration generation.

CSI_DLL_EXPORT csiErr csiGenerateAndUploadCalibrationData (csiHandle devHandle, csiCalibrationLUT LUTSelector, csiReferenceImgLoadMode imgLoadMode, csiCalibrationParams calibParam, csiNewBufferEventData * refImage, const char * imgFile)

Generate and upload calibration file to the camera.

Parameters

in

devHandle

Handle provided by the csiOpenDevice function.

in

LUTSelector

The desired LUT or an area in memory where the file is to be uploaded.

in

imgLoadMode

Specifying the source of the input image used to generate calibration data.

in

calibParam

The input parameters can be loaded from PC memory.

in

refImage

If the input image is captured from the camera, then it can be loaded in this argument.

in

imgFile

If the input image is loaded from the PC, this can be used for calibration.

Returns

csiSuccess or an error defined in the csiErr-Enum.

Note

In this function, even if input data is provided to both arguments of type "csiNewBufferEventData" and imageFilePath, the argument "imgLoadMode" determines which input image data should be used for calibration generation.

CSI_DLL_EXPORT csiErr csiGenerateReferenceImage (csiHandle devHandle, const CalibrationMode calibMode, csiReferenceImgLoadMode imgLoadMode, csiCalibrationParams calibParam, const csiNewBufferEventData * refImage, const char * imgFile, int * referenceImage, int * resMaxValue)

Generates calibration data and applies it on the input image to generate calibrated output image.

Parameters

in

devHandle

Handle provided by the csiOpenDevice function.

in

calibMode

The desired calibration mode. Either DSNU or PRNU.

in

imgLoadMode

Specifying the source of the input image used to generate calibration data.

in

calibParam

The input parameters can be loaded from PC memory.

in

refImage

If the input image is captured from the camera, it can be loaded in this argument.

in

imgFile

If the input image is loaded from the PC, this can be a null .

out

referenceImage

The calibration data is applied on the input image and generates calibrated image.

out

resMaxValue

The resultant raw value of a pixel present in the calibrated output image.

Returns

csiSuccess or an error defined in the csiErr-Enum.

Note

In this function, even if input data is provided to both arguments of type "csiNewBufferEventData" and imageFilePath, the argument "imgLoadMode" of type "csiReferencingLoadMode" determines which input image data should be used for calibration generation.

CSI_DLL_EXPORT csiErr csiGetAcquisitionStatistics (csiHandle dataStream, csiAcquistionStatistics * stats)

Retrieve the statistical buffer regarding the data stream (e.g. transmitted frames, etc.).

Parameters

in

dataStream

Handle to the data stream the acquisition statistics should be collected on.

out

stats

The acquisition statistics, see Fehler! Verweisquelle konnte nicht gefunden werden.

Returns

csiSuccess or an error defined in the csiErr-Enum.

CSI_DLL_EXPORT csiErr csiGetDataStreamInfo (csiHandle deviceHandle, uint32_t dsIndex, csiDataStreamInfo * dataStreamInfoOut)

Return information about the desired data stream.

Parameters

in

deviceHandle

provided by the csiOpenDevice-function.

in

dsIndex

An index to a data stream. Starting from 0 to the number of available data streams as returned by csiGetNumberOfDataStreams().

out

dataStreamInfoOut

Information about the selected data stream given by the dsIndex parameter or NULL if the data stream is not found. See documentation on csiDataStreamInfo for more information.

Returns

csiSuccess or an error defined in the csiErr-Enum.

CSI_DLL_EXPORT csiErr csiGetDeviceDataStreamInfo (csiHandle moduleHandle, uint32_t dsIndex, csiDataStreamInfo * dataStreamInfoOut)

Return information about the desired data stream and device.

Parameters

in

moduleHandle

provided by the csiOpenDevice-function.

in

dsIndex

An index to a data stream. Starting from 0 to the number of available data streams as returned by csiGetNumberOfDataStreams().

out

dataStreamInfoOut

Information about the selected data stream given by the dsIndex parameter and moduleHandle or NULL if the data stream is not found. See documentation on csiDataStreamInfo for more information.

Returns

csiSuccess or an error defined in the csiErr-Enum.

CSI_DLL_EXPORT csiErr csiGetDeviceInfo (uint32_t deviceIndex, csiDeviceInfo * deviceInfoOut)

A function to get information about the found devices in the system.

Parameters

in

deviceIndex

Index of the found device from the csiDiscoverDevices-function

out

deviceInfoOut

Detailed information of the found device. The information will be provided in this structure. The structure must be allocated on the caller side.

Returns

Returns csiSuccess or an error defined in the csiErr-Enum

Note

This function provides in more detailed information about the found devices such as device identifier, name, model, vendor, serial number, interface description, interface-ID, username, version, consistency of camera package, TL-Producer-information, access status

CSI_DLL_EXPORT csiErr csiGetErrorDescription (csiErr error, char * bufferOut, size_t bufferSize)

Returns a human readable description of an error code.

Parameters

in

error

The error code to retrieve the text for.

in

bufferSize

The size of the provided text buffer.

out

bufferOut

char-buffer where the error text will be written to.

Returns

csiSuccess or an error defined in the csiErr-Enum.

CSI_DLL_EXPORT csiErr csiGetFeatureAccessMode (csiHandle moduleH, const char * featureName, csiAccessMode * access, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE)

Retrieve a specific feature from the device. The access mode of this feature will be returned.

Parameters

in

moduleH

Handle provided by the csiOpenDevice or csiOpenTLInterface function.

in

featureName

Name (Not the display name) of the feature to get.

in

module

Module for which the parameter should be set. Please use the enum csiModuleLevel to select. Determines if the parameter should be retrieved from the device-, transport layer-, interface- stream- or buffer-module.

out

access

Structure which contains the value of acess mode about the requested feature.

Returns

csiSuccess or an error defined in the csiErr-Enum.

CSI_DLL_EXPORT csiErr csiGetFeatureBool (csiHandle moduleHandle, const char * featureName, bool * valueOut, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE)

Retrieve a boolean feature from the device.

Parameters

in

moduleHandle

Handle provided by the csiOpenDevice or csiOpenTLInterface function.

in

featureName

Name of the feature to get (Not the display name).

in

module

Module for which the parameter should be get. Please use the enum csiModuleLevel to select. Determines if the parameter should be retrieved from the device-, transport layer-, interface-stream- or buffer-module.

out

valueOut

Pointer to a bool-value where the current value of the feature will be written to.

Returns

csiSuccess or an error defined in the csiErr-Enum.

CSI_DLL_EXPORT csiErr csiGetFeatureEnum (csiHandle moduleHandle, const char * featureName, csiFeatureParameter * featureParamOut, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE)

Retrieve an enumeration feature from the device.

Parameters

in

moduleHandle

Handle provided by the csiOpenDevice or csiOpenTLInterface function.

in

featureName

Name (Not the display name) of the enumeration to get.

in

module

Module for which the parameter should be set. Please use the enum csiModuleLevel to select. Determines if the parameter should be retrieved from the device-, transport layer-, interface- stream- or buffer-module.

out

featureParamOut

Structure which contains all necessary information about the requested feature:

enumEntries: The number of enumeration entries which are available for this enumeration feature.

currentEntry: Currently selected enumeration index.

values []: Name of the enumeration entries.

Returns

csiSuccess or an error defined in the csiErr-Enum.

CSI_DLL_EXPORT csiErr csiGetFeatureEnumEntryByIndex (csiHandle moduleHandle, const char * featureName, int32_t enumIndex, csiFeatureParameter * featureParamOut, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE)

Retrieve an enumeration feature from the device by using its index.

Parameters

in

moduleHandle

Handle provided by the csiOpenDevice or csiOpenTLInterface function.

in

featureName

Name (Not the display name) of the enumeration to get.

in

enumIndex

Index of the enumeration entry to be retrieved.

in

module

Module for which the parameter should be retrieved. Please use the enum csiModuleLevel to select. Determines if the parameter should be retrieved from the device-, transport layer-, interface- stream- or buffer-module.

out

featureParamOut

Name of the enumeration of the requested index.

Returns

csiSuccess or an error defined in the csiErr-Enum.

Note

The enumeration string will be given in the csiFeatureParameter structure: valueStr.

CSI_DLL_EXPORT csiErr csiGetFeatureEnumEntryByName (csiHandle moduleHandle, const char * featureName, const char * enumValue, csiFeatureParameter * featureParamOut, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE)

Retrieve an enumeration feature from the device by using its name.

Parameters

in

moduleHandle

Handle provided by the csiOpenDevice or csiOpenTLInterface function.

in

parameterName

Name (Not the display name) of the enumeration to get.

in

enumValue

Name of the enumeration entry to be retrieved.

in

module

Module for which the parameter should be retrieved. Please use the enum csiModuleLevel to select. Determines if the parameter should be retrieved from the device-, transport layer-, interface- stream- or buffer-module.

out

featureParamOut

Structure which contains all necessary information about the requested feature.

Returns

csiSuccess or an error defined in the csiErr-Enum.

CSI_DLL_EXPORT csiErr csiGetFeatureEnumEntryCount (csiHandle moduleHandle, const char * featureName, uint32_t * count, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE)

Retrieve the entries size of an enumeration feature from the device by feature name.

Parameters

in

moduleHandle

Handle provided by the csiOpenDevice or csiOpenTLInterface function.

in

featureName

Name (Not the display name) of the enumeration to get.

in

module

Module for which the parameter should be retrieved. Please use the enum csiModuleLevel to select. Determines if the parameter should be retrieved from the device-, transport layer-, interface- stream- or buffer-module.

out

count

Entries size of the enumeration feature.

Returns

csiSuccess or an error defined in the csiErr-Enum.

CSI_DLL_EXPORT csiErr csiGetFeatureFloat (csiHandle moduleHandle, const char * featureName, double * valueOut, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE)

Retrieve a floating point feature from the device.

Parameters

in

moduleHandle

Handle provided by the csiOpenDevice or csiOpenTLInterface function.

in

featureName

Name of the feature to get (Not the display name).

in

module

Module for which the parameter should be get. Please use the enum csiModuleLevel to select. Determines if the parameter should be retrieved from the device-, transport layer-, interface-stream- or buffer-module.

out

valueOut

Pointer to a double-value where the current value of the feature will be written to.

Returns

csiSuccess or an error defined in the csiErr-Enum.

CSI_DLL_EXPORT csiErr csiGetFeatureInt (csiHandle moduleHandle, const char * featureName, int64_t * valueOut, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE)

Retrieve an integer feature from the device.

Parameters

in

moduleHandle

Handle provided by the csiOpenDevice or csiOpenTLInterface function.

in

featureName

Name of the feature to get (Not the display name).

in

module

Module for which the parameter should be get. Please use the enum csiModuleLevel to select. Determines if the parameter should be retrieved from the device-, transport layer-, interface-stream- or buffer-module.

out

valueOut

Pointer to an int64_t value where the current value of the feature will be written to.

Returns

csiSuccess or an error defined in the csiErr-Enum.

CSI_DLL_EXPORT csiErr csiGetFeatureParameter (csiHandle moduleHandle, const char * featureName, csiFeatureParameter * featureParamOut, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE)

Retrieve a specific feature from the device. Detailed information about this feature will be returned.

Parameters

in

moduleHandle

Handle provided by the csiOpenDevice or csiOpenTLInterface function.

in

featureName

Name (Not the display name) of the feature to get.

in

module

Module for which the parameter should be set. Please use the enum csiModuleLevel to select. Determines if the parameter should be retrieved from the device-, transport layer-, interface- stream- or buffer-module.

out

featureParamOut

Structure which contains all necessary information about the requested feature.

Returns

csiSuccess or an error defined in the csiErr-Enum.

CSI_DLL_EXPORT csiErr csiGetFeatureReg (csiHandle moduleHandle, const char * featureName, char * buffer, size_t * length, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE)

Retrieve a register value from the device.

Parameters

in

moduleHandle

Handle provided by the csiOpenDevice or csiOpenTLInterface function.

in

featureName

Name (Not the display name) of the feature to get.

in

module

Module for which the parameter should be get. Please use the enum csiModuleLevel to select. Determines if the parameter should be retrieved from the device-, transport layer-, interface- stream- or buffer-module.

out

buffer

Pointer to a char-array where the current value of the feature will be written to.

out

length

Current length of the retrieved data.

Returns

csiSuccess or an error defined in the csiErr-Enum.

Note

To avoid unexpected behavior, it is recommended to retrieve the maximum buffer length before getting it from the device. This can be achieved by using the function "csiGetFeatureParameter". This function will provide all necessary information about the parameter (including min and max values). The register length must not exceed the length given in the "featureRegLength" parameter.

CSI_DLL_EXPORT csiErr csiGetFeatureString (csiHandle moduleHandle, const char * featureName, char * valueOut, size_t * sizeOut, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE)

Retrieve a string feature from the device.

Parameters

in

moduleHandle

Handle provided by the csiOpenDevice or csiOpenTLInterface function.

in

featureName

Name (Not the display name) of the feature to get.

in

module

Module for which the parameter should be get. Please use the enum csiModuleLevel to select. Determines if the parameter should be retrieved from the device-, transport layer-, interface- stream- or buffer-module.

out

valueOut

Pointer to a char-value where the current value of the feature will be written to.

out

sizeOut

Size of the read string.

Returns

csiSuccess or an error defined in the csiErr-Enum.

Note

To avoid unexpected behavior, you should first retrieve the length of the string to be received:

1. Call the function with valueOut set to NULL. The function will return the current size of the string parameter.

2. Allocate the required memory to store the string feature to be set.

3. Call the function as described by providing a pointer to a string buffer with the sufficient length.

CSI_DLL_EXPORT csiErr csiGetLibraryVersion (uint32_t * major, uint32_t * minor, uint32_t * patch, uint32_t * revision, uint32_t * build)

Returns the current library version.

Parameters

out

major

The major version number.

out

minor

The minor version number.

out

patch

The patch version number.

out

revision

The revision number.

out

build

The build number.

Returns

Always returns csiSuccess.

CSI_DLL_EXPORT csiErr csiGetNextImage (csiHandle eventHandle, csiNewBufferEventData ** bufferInfoOut, uint64_t timeoutMilliseconds)

Get the next image from the data stream.

Parameters

in

eventHandle

The handle of the data stream to wait for images on. Requires a previous call to csiRegisterEvent() to register for new image events on this stream.

in

timeoutMilliseconds

Timeout after the waiting stops if no event was received.

out

bufferInfoOut

The event data structure containing the image data and information.

Returns

csiSuccess or an error defined in the csiErr-Enum.

Note

This is a convenience function that is recommended to use for image acquisition. It is an alternative to csiWaitForEvent() that returns a more general representation of the event data. Please note that a CSI_EVT_NEWIMAGEDATA event must be registered on the data stream to be able to wait for new images. The image buffer returned from this function will be valid and usable as long as it is not given back to the acquisition engine with csiReleaseImage().

CSI_DLL_EXPORT csiErr csiGetNumberOfDataStreams (csiHandle deviceHandle, uint32_t * numberOfStreamsOut)

Return the available number of data streams of the device.

Parameters

in

deviceHandle

provided by the csiOpenDevice-function.

out

numberOfStreamsOut

Number of available data streams for the given device.

Returns

csiSuccess or an error defined in the csiErr-Enum.

Note

The returned number of data streams can be 0 if the given device is not a streaming device. The actual number of available data streams depends on the capabilities of the device. Use this function in combination with csiGetDataStreamInfo() which receives an index to a data stream as parameter.

CSI_DLL_EXPORT csiErr csiGetNumberOfTLProducers (int32_t * numTLProducers)

Returns the number of available transport layers in the system.

Parameters

out

numTLProducers

The number of transport layers detected in the environment.

Returns

csiSuccess or an error defined in the csiErr-Enum.

Note

The SDK uses the environment variable GENICAM_GENTL64_PATH to search for available transport layers. This function allows to request the number of transport layers available through that environment variable.

CSI_DLL_EXPORT csiErr csiGetTLProducerInfobyFilePath (csiTLProducerInfos * tlProducerInfos, const char * producerName)

Returns additional information about a transport layer.

Parameters

in

producerName

The name of the producer (usually the file path to the producer *.cti file).

out

tlProducerInfos

The structure holding additional information about the transport layer.

Returns

csiSuccess or an error defined in the csiErr-Enum.

Note

Similar to csiGetTLProducerInfoByIndex but using the name (file path) of the producer.

CSI_DLL_EXPORT csiErr csiGetTLProducerPathByIndex (char * transportLayerPath, size_t bufferSize, uint32_t index)

Returns a path of transport layer producer specified by index.

Parameters

in

bufferSize

Size of one buffer in bytes

in

index

index of transport layer

out

transportLayerPath

path to the transport layer.

Returns

csiSuccess or an error defined in the csiErr-Enum.

CSI_DLL_EXPORT csiErr csiGetUpdateFileType (csiHandle moduleHandle, const char * fileName, char * fileTypeOut, size_t bufferSize)

Request the update file type of a file (if available).

Parameters

in

moduleHandle

Handle provided by the csiOpenDevice function.

in

fileName

The path to the file that should be checked.

in

bufferSize

The size of the output buffer.

out

fileTypeOut

If the file is a valid file that can be used to update on the device, this buffer should contain the type of the file as string representation.

Returns

csiSuccess or an error defined in the csiErr-Enum.

Note

This function can be used to request the type of a specific file. There are multiple different types of files that can be uploaded to a device (e.g. firmware files, script files, etc.). To make sure that the file is a valid file type, this can be used to detect if a file can be used for the intended purpose. It is required first to get the type of a file before uploading it to the device to see if it is a valid file.

CSI_DLL_EXPORT csiErr csiInit (csiLogLevel logLvl, csiLogSinkCallbackFunc logCallbackFunc CSI_DEFAULT_PARAM_NULL, csiLogUserData *userdata CSI_DEFAULT_PARAM_NULL)

Initializes the SDK. Needs to be called first before any other function of the SDK is called!

Parameters

in

logLvl

Defines the loglevel for the SDK. This will enable a closer debugging of the SDK. Use the enum csiLogLevel for setting the desired loglevel

in

logCallbackFunc

An optional callback function for log messages coming from the SDK

in

userdata

Optional user data that will be passed as parameter when the log callback function is called.

Returns

Returns csiSuccess or an error defined in the csiErr-Enum

Note

After the usage of the SDK make sure to call csiClose in order to free all memory again and not leaving any interfaces open.

CSI_DLL_EXPORT csiErr csiIsCommandActive (csiHandle moduleHandle, const char * featureName, bool * isActive, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE)

Check if a command is still active.

Parameters

in

moduleHandle

Handle provided by the csiOpenDevice or csiOpenTLInterface function.

in

featureName

Name (Not the display name) of the command to check.

in

module

Module for which the parameter should be set. Please use the enum csiModuleLevel to select. Determines if the parameter should be retrieved from the device-, transport layer-, interface- stream- or buffer-module.

out

isActive

Pointer to a bool-value where the current state of the command is written to (true: active, false: inactive).

Returns

csiSuccess or an error defined in the csiErr-Enum.

Note

If a lengthy operation is triggered, it is possible to check the current status by calling this command.

CSI_DLL_EXPORT csiErr csiIsFeatureCachingDisabled (bool * isDisabled)

retrieve if feature caching is disabled or not

Parameters

out

isDisabled

value indicates that if feature caching is disabled or not

Returns

Always returns csiSuccess.

CSI_DLL_EXPORT csiErr csiIsModuleLittleEndian (csiHandle moduleHandle, csiModuleLevel lvl, bool * isLittleEndian)

Write memory to a register address on the device.

Parameters

in

moduleHandle

Handle provided by the csiOpenDevice-function.

in

lvl

Module for which the parameter should be retrieved. Please use the enum csiModuleLevel to select. Determines if the parameter should be retrieved from the device-, transport layer-, interface- stream- or buffer-module.

out

isLittleEndian

indicates if module specified by moduleHandle is little endian or not.

Returns

csiSuccess or an error defined in the csiErr-Enum.

CSI_DLL_EXPORT csiErr csiIterateFeatureTree (csiHandle moduleHandle, const char * rootFeatureName, uint32_t index, char * featureNameOut, size_t nameBuffSize, csiFeatureType * type, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE)

Provides a possibility to iterate through all available features on the camera.

Parameters

in

moduleHandle

Handle provided by the csiOpenDevice or csiOpenTLInterface function.

in

rootFeatureName

Name of the feature to start from. To start from the very beginning use "root".

in

index

This will indicate the number of the element of RootFeatureName to retrieve.

in

nameBuffSize

size of the provided buffer for the featureNameOut

in

module

Module for which the feature tree should be iterated. Please use the enum csiModuleLevel to select. Determines if the feature tree on the device-, transport layer-, interface- stream- or buffer-module should be used.

out

featureNameOut

Name of the retrieved feature.

out

type

Type of the retrieved feature.

Returns

csiSuccess or an error defined in the csiErr-Enum.

Note

If starting from the very beginning, use "Root" as RootFeatureName. From there call this function for each returned feature in order to get all features of the device. Please check the provided example "feature_iteration" for a template of usage.

CSI_DLL_EXPORT csiErr csiOpenDevice (const char * deviceIdentifier, const char * interfaceID, csiHandle * deviceHandleOut, uint64_t timeoutMilliseconds, csiDeviceAccessMode openMode)

Open the device given by the index. The TL of this index is used.

Parameters

in

deviceIdentifier

Index of the found device from the csiDiscoverDevices-function.

in

interfaceID

Interface ID of the device. This information can be found in device-info struct.

in

timeoutMilliseconds

Timeout in milliseconds until the device needs to be opened successfully.

in

openMode

The device can be opened in different modes to enable/hinder concurrent access to the device. The following modes might be used:

CSI_DEV_MODE_EXCLUSIVE: Only this process can communicate with the camera.

CSI_DEV_MODE_READ: Camera-parameters can be read and images can be acquired.

CSI_DEV_MODE_CONTROL: Camera-parameters can be read and written. Read-access by another process to the device is still possible.

out

deviceHandleOut

Handle to the device. This handle needs to be used to any successive call.

Returns

csiSuccess or an error defined in the csiErr-Enum.

Note

Depending on the used transport layer it might be necessary to use a longer timeout. Please refer to the information provided with the specific TL.

CSI_DLL_EXPORT csiErr csiOpenTLInterface (csiTLInterfaceInfo interfaceInfo, csiHandle * interfaceHandleOut, uint64_t timeoutMilliseconds)

Open the interface given by the interface information.

Parameters

in

interfaceInfo

Interface information of the found TL interface from the discovery function.

in

timeoutMilliseconds

Timeout in milliseconds until the interface needs to be opened successfully.

out

interfaceHandleOut

Handle to the interface. This handle needs to be used to any successive call for the interface access.

Returns

csiSuccess or an error defined in the csiErr-Enum.

Note

Depending on the used transport layer it might be necessary to use a longer timeout. Please refer to the information provided with the specific TL.

CSI_DLL_EXPORT csiErr csiReadMemory (csiHandle moduleHandle, uint64_t address, char * buffer, size_t sizeBytes)

Read memory from a register address on the device.

Parameters

in

moduleHandle

Handle provided by the csiOpenDevice function.

in

address

The register address to read from.

out

buffer

The buffer into which the data should be stored.

in

sizeBytes

The size of the buffer into which the buffer should be read and at the same time the number of bytes to read from the address.

Returns

csiSuccess or an error defined in the csiErr-Enum.

CSI_DLL_EXPORT csiErr csiRegisterEvent (csiHandle moduleHandle, csiEventType evtType, csiHandle * eventOut, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE)

Register an event which will be signaled in the case the desired event is triggered.

Parameters

in

moduleHandle

Handle to the module that is used to register an event. This can be either a device handle or a data stream handle.

in

evtType

The type of event that should be registered.

in

module

The module level where the event should be registered on. Please use the enum csiModuleLevel to select.

out

eventOut

A handle to the event that was registered. Use this handle to wait for events using the csiWaitForEvent() or csiGetWaitImage() functions.

Returns

csiSuccess or an error defined in the csiErr-Enum.

CSI_DLL_EXPORT csiErr csiRegisterInvalidateCB (csiHandle moduleHandle, const char * featureName, CB_OBJECT objCB, CB_FEATURE_INVALIDATED_PFN pfnFeatureInvalidateCB, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE)

Register an invalidation callback function to a specific feature by name.

Parameters

in

moduleHandle

Handle provided by the csiOpenDevice or csiOpenTLInterface function.

in

featureName

Name of the feature for which the invalidation callback should be registered.

in

An

user object that is passed as parameter to the callback function.

in

pfnFeatureInvalidateCB

The callback function.

in

module

Module for which the invalidation callback should be registered. Please use the enum csiModuleLevel to select. Determines if the parameter should be retrieved from the device-, transport layer-, interface- stream- or buffer_module

Returns

csiSuccess or an error defined in the csiErr-Enum.

Note

This function is useful to get informed about changes in the feature tree which lead to an invalidation of features. Whenever a feature changes its value or another attribute, the application should get informed about it. The callback function must be of the form: void featureInvalidated(const char featureName, void userObj)

CSI_DLL_EXPORT csiErr csiReleaseImage (csiHandle dataStream, const csiNewBufferEventData * bufferInfo)

Release the image back into the processing buffer from the device.

Parameters

in

dataStream

The handle to the data stream this buffer belongs to. This handle is also part of the bufferInfo structure.

in

bufferInfo

Pointer to the buffer event data that was previously received from csiWaitForEvent() or csiGetNextImage().

Returns

csiSuccess or an error defined in the csiErr-Enum.

Note

Releasing an image buffer from the user application back to the transport layer for acquisition. Releasing the image buffer passes the ownership of the buffer back to the transport layer and the user application is not allowed to use it anymore after the release. To ensure a fluent image acquisition it is recommended to keep the buffer ownership as short as possible and release the buffer as soon as it is not needed anymore.

CSI_DLL_EXPORT csiErr csiReset ()

Reset the SDK and frees all allocated memory and interfaces.

Returns

Returns csiSuccess or an error defined in the csiErr-Enum.

CSI_DLL_EXPORT csiErr csiSetFeatureBool (csiHandle moduleHandle, const char * featureName, bool value, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE)

Set a boolean feature on the device.

Parameters

in

moduleHandle

Handle provided by the csiOpenDevice or csiOpenTLInterface function.

in

featureName

Name (Not the display name) of the feature to set.

in

value

Boolean value to set the feature to (true or false).

in

module

Module for which the parameter should be set. Please use the enum csiModuleLevel to select. Determines if the parameter should be set on the device-, transport layer-, interface-stream- or buffer-module.

Returns

csiSuccess or an error defined in the csiErr-Enum.

CSI_DLL_EXPORT csiErr csiSetFeatureCachingDisabled (bool disableCaching)

disable feature caching

Parameters

in

disableCaching

value indicates that if feature caching should be disabled or not

Returns

Always returns csiSuccess.

CSI_DLL_EXPORT csiErr csiSetFeatureEnum (csiHandle moduleHandle, const char * featureName, const char * value, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE)

Set an enumeration feature on the device.

Parameters

in

moduleHandle

Handle provided by the csiOpenDevice or csiOpenTLInterface function.

in

featureName

Name (Not the display name) of the enumeration to get.

in

value

Pointer to a character array which contains the string to set.

in

module

Module for which the parameter should be set. Please use the enum csiModuleLevel to select. Determines if the parameter should be retrieved from the device-, transport layer-, interface- stream- or buffer-module.

Returns

csiSuccess or an error defined in the csiErr-Enum.

Note

To retrieve the possible values for this enumeration, two functions need to be called:

1. Call "csiGetFeatureEnum". In the returned structure, the element "enumCounter" indicates the number of available entries.

2. The different entries can be retrieved by using the function "csiGetFeatureEnumEntryByIndex" simply by iterating from 0 until the "enumCounter"-1.

CSI_DLL_EXPORT csiErr csiSetFeatureFloat (csiHandle moduleHandle, const char * featureName, double value, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE)

Set a floating point value feature on the device.

Parameters

in

moduleHandle

Handle provided by the csiOpenDevice or csiOpenTLInterface function.

in

featureName

Name (Not the display name) of the feature to set.

in

value

Floating point value to set.

in

module

Module for which the parameter should be set. Please use the enum csiModuleLevel to select. Determines if the parameter should be set on the device-, transport layer-, interface-stream- or buffer-module.

Returns

csiSuccess or an error defined in the csiErr-Enum.

CSI_DLL_EXPORT csiErr csiSetFeatureInt (csiHandle moduleHandle, const char * featureName, int64_t value, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE)

Set an integer feature on the device.

Parameters

in

moduleHandle

Handle provided by the csiOpenDevice or csiOpenTLInterface function.

in

featureName

Name (Not the display name) of the feature to set.

in

value

Integer value to set the feature to.

in

module

Module for which the parameter should be set. Please use the enum csiModuleLevel to select. Determines if the parameter should be set on the device-, transport layer-, interface-stream- or buffer-module.

Returns

csiSuccess or an error defined in the csiErr-Enum.

CSI_DLL_EXPORT csiErr csiSetFeatureReg (csiHandle moduleHandle, const char * featureName, const char * buffer, size_t length, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE)

Set a register value on the device.

Parameters

in

moduleHandle

Handle provided by the csiOpenDevice or csiOpenTLInterface function.

in

featureName

Name (Not the display name) of the feature to set.

in

buffer

Pointer to the data which will be written to the register.

in

length

Number of bytes to write to the register.

in

module

Module for which the register should be set. Please use the enum csiModuleLevel to select. Determines if the register should be set on the device-, transport layer-, interface- stream- or buffer-module.

Returns

csiSuccess or an error defined in the csiErr-Enum.

Note

To avoid unexpected behavior, it is recommended to retrieve the maximum buffer length before setting it to the device. This can be achieved by using the function "csiGetFeatureParameter". This function will provide all necessary information about the parameter (including min and max values). The register length must not exceed the length given in the "featureRegLength" parameter.

CSI_DLL_EXPORT csiErr csiSetFeatureString (csiHandle moduleHandle, const char * featureName, const char * value, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE)

Set a string feature on the device.

Parameters

in

moduleHandle

Handle provided by the csiOpenDevice or csiOpenTLInterface function.

in

featureName

Name (Not the display name) of the feature to set.

in

value

Pointer to a character array which contains the string to set.

in

module

Module for which the parameter should be set. Please use the enum csiModuleLevel to select. Determines if the parameter should be set on the device-, transport layer-, interface- stream- or buffer-module.

Returns

csiSuccess or an error defined in the csiErr-Enum.

Note

To avoid unexpected behavior, it is recommended to retrieve the maximum string length before setting it to the device. This can be achieved by using the function "csiGetFeatureParameter". This function will provide all necessary information about the parameter (including min and max values). The string length must not exceed the length given in the "maximumStringLength" parameter.

CSI_DLL_EXPORT csiErr csiStartAcquisition (csiHandle deviceHandle, csiAcquisitionMode mode)

Start the acquisition on the device and created data streams.

Parameters

in

deviceHandle

provided by the csiOpenDevice-function.

in

mode

Acquisition mode as defined in csiAcquisitionMode.

Returns

csiSuccess or an error defined in the csiErr-Enum.

Note

This function will start the acquisition on the camera device passed with the device parameter and on all created data streams of that device.

CSI_DLL_EXPORT csiErr csiStopAcquisition (csiHandle deviceHandle)

Stop the acquisition on the device.

Parameters

in

deviceHandle

provided by the csiOpenDevice-function.

Returns

csiSuccess or an error defined in the csiErr-Enum.

Note

This function will stop the acquisition on the camera device passed with the device parameter and on all created data streams of that device.

CSI_DLL_EXPORT csiErr csiUnregisterEvent (csiHandle evt)

Unregister a specific event from the event handler.

Parameters

in

evt

The handle to the event that should be unregistered.

Returns

csiSuccess or an error defined in the csiErr-Enum.

Note

Unregistering the event will cancel all active pending calls to csiWaitForEvent() or csiGetNextImage().

CSI_DLL_EXPORT csiErr csiUnRegisterInvalidateCB (csiHandle moduleHandle, const char * featureName, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE)

Unregister an invalidation callback function from a specific feature.

Parameters

in

moduleHandle

Handle provided by the csiOpenDevice or csiOpenTLInterface function.

in

featureName

Name of the feature to unregister the callback from.

in

module

Module for which the feature invalidation callback should be registered. Please use the enum csiModuleLevel to select. Determines if the parameter should be retrieved from the device-, transport layer-, interface- stream- or buffer-module.

Returns

csiSuccess or an error defined in the csiErr-Enum.

CSI_DLL_EXPORT csiErr csiWaitForEvent (csiHandle evt, uint64_t timeoutMilliseconds, csiEventData ** evtDataOut)

Wait for a desired event to happen.

Parameters

in

evt

The handle of the event to wait for.

in

timeoutMilliseconds

Timeout after the waiting stops if no event was received.

out

evtDataOut

The event data for further use. See csiEventData for more information.

Returns

csiSuccess or an error defined in the csiErr-Enum.

Note

After the event was registered with csiRegisterEvent() it is possible to actively wait for the event using this function. The waiting can be done asynchronously in a separate thread. This function must be called for each event separately. Please note that this function will return a more general representation of the event data in csiEventData. There exists also an event data structure for each event type.

Also see csiGetNextImage() which can be used as convenience function to wait for new image data events.

CSI_DLL_EXPORT csiErr csiWriteMemory (csiHandle moduleHandle, uint64_t address, const char * buffer, size_t sizeBytes)

Write memory to a register address on the device.

Parameters

in

moduleHandle

Handle provided by the csiOpenDevice-function.

in

address

Address of the register on the device to which the memory should be written.

in

buffer

Buffer holding the data to write.

in

sizeBytes

The number of bytes to write from buffer to the register address.

Returns

csiSuccess or an error defined in the csiErr-Enum.

csi.h

Go to the documentation of this file.

1

2 #ifndef CSI_CSIF_H_

3 #define CSI_CSIF_H_

4

5 #include "version.h"

6 #include "csiTypes.h"

7

8 #include <algorithm>

9

10 #ifdef __cplusplus

11 #define CSI_DEFAULT_PARAM_MODULE = CSI_DEVICE_MODULE

12 #define CSI_DEFAULT_PARAM_NULL = NULL

13 #define CSI_DEFAULT_PARAM_ZERO = 0

14 #define CSI_DEFAULT_PARAM_FALSE = false

15 #endif

16

17 #ifdef __cplusplus

18 extern "C"

19 {

20 namespace CSI {

21 #endif // __cplusplus

22

23 #define CSI_INFO_STRING_BUFFER_SIZE 512

24 #define CSI_INFO_INT_BUFFER_SIZE 512

25 #define CSI_DISCOVERY_INFO_DEVICE_COUNT 16

26 #define CSI_TL_INTERFACE_COUNT 16

27 #define CSI_INFITIE_TIME 0xffffffff

28

29 typedef uint64_t csiHandle;

30 static const csiHandle CSI_EMPTY_HANDLE = 0;

31

32 // Default discovery time which should enable a safe discovery of the camera

33 static const int CSI_DEFAULT_DISCOVERY_TIME_MS = 400;

34

35 #define CSI_MONO_FORMAT 0x01000000

36 #define CSI_COLOR_FORMAT 0x02000000

37 #define CSI_OCCUPY_8BIT 0x00080000

38 #define CSI_OCCUPY_10BIT 0x000A0000

39 #define CSI_OCCUPY_12BIT 0x000C0000

40 #define CSI_OCCUPY_14BIT 0x000E0000

41 #define CSI_OCCUPY_16BIT 0x00100000

42 #define CSI_OCCUPY_24BIT 0x00180000

43 #define CSI_OCCUPY_30BIT 0x001E0000

44 #define CSI_OCCUPY_32BIT 0x00200000

45 #define CSI_OCCUPY_48BIT 0x00300000

46 #define CSI_OCCUPY_64BIT 0x00400000

47

55 typedef enum csiPixelFormat

56 {

57 CSI_PIX_FORMAT_UNKNOWN = 0x00000000,

58

60 CSI_PIX_FORMAT_MONO8 = CSI_MONO_FORMAT | CSI_OCCUPY_8BIT | 0x001,

61 CSI_PIX_FORMAT_MONO10 = CSI_MONO_FORMAT | CSI_OCCUPY_16BIT | 0x003,

62 CSI_PIX_FORMAT_MONO10_PACKED = CSI_MONO_FORMAT | CSI_OCCUPY_10BIT | 0x046,

63 CSI_PIX_FORMAT_MONO12 = CSI_MONO_FORMAT | CSI_OCCUPY_16BIT | 0x005,

64 CSI_PIX_FORMAT_MONO12_PACKED = CSI_MONO_FORMAT | CSI_OCCUPY_12BIT | 0x047,

65 CSI_PIX_FORMAT_MONO16 = CSI_MONO_FORMAT | CSI_OCCUPY_16BIT | 0x007,

68 CSI_PIX_FORMAT_RGB8 = CSI_COLOR_FORMAT | CSI_OCCUPY_24BIT | 0x014,

69 CSI_PIX_FORMAT_RGB10_PACKED = CSI_COLOR_FORMAT | CSI_OCCUPY_32BIT | 0x01D,

70 CSI_PIX_FORMAT_RGB10 = CSI_COLOR_FORMAT | CSI_OCCUPY_48BIT | 0x018,

71 CSI_PIX_FORMAT_BGR10 = CSI_COLOR_FORMAT | CSI_OCCUPY_48BIT | 0x019,

72 CSI_PIX_FORMAT_RGB12 = CSI_COLOR_FORMAT | CSI_OCCUPY_48BIT | 0x01A,

73 CSI_PIX_FORMAT_BGR12 = CSI_COLOR_FORMAT | CSI_OCCUPY_48BIT | 0x01B,

74 CSI_PIX_FORMAT_RGBA8 = CSI_COLOR_FORMAT | CSI_OCCUPY_32BIT | 0x016,

75 CSI_PIX_FORMAT_BGRA8 = CSI_COLOR_FORMAT | CSI_OCCUPY_32BIT | 0x017,

76 CSI_PIX_FORMAT_BGR8 = CSI_COLOR_FORMAT | CSI_OCCUPY_24BIT | 0x015,

77 CSI_PIX_FORMAT_RGB16 = CSI_COLOR_FORMAT | CSI_OCCUPY_48BIT | 0x033,

78 CSI_PIX_FORMAT_RGBA10 = CSI_COLOR_FORMAT | CSI_OCCUPY_64BIT | 0x05F,

79 CSI_PIX_FORMAT_RGBA12 = CSI_COLOR_FORMAT | CSI_OCCUPY_64BIT | 0x061,

80 CSI_PIX_FORMAT_RGBA16 = CSI_COLOR_FORMAT | CSI_OCCUPY_64BIT | 0x064,

82 // Bayer

83 CSI_PIX_FORMAT_BayerGR8 = CSI_MONO_FORMAT | CSI_OCCUPY_8BIT | 0x008,

84 CSI_PIX_FORMAT_BayerRG8 = CSI_MONO_FORMAT | CSI_OCCUPY_8BIT | 0x009,

86 CSI_PIX_FORMAT_BayerGB8 = CSI_MONO_FORMAT | CSI_OCCUPY_8BIT | 0x00A,

87 CSI_PIX_FORMAT_BayerBG8 = CSI_MONO_FORMAT | CSI_OCCUPY_8BIT | 0x00B,

89 CSI_PIX_FORMAT_BayerGR12 = CSI_MONO_FORMAT | CSI_OCCUPY_16BIT | 0x010,

90 CSI_PIX_FORMAT_BayerRG12 = CSI_MONO_FORMAT | CSI_OCCUPY_16BIT | 0x011,

92 CSI_PIX_FORMAT_BayerGB12 = CSI_MONO_FORMAT | CSI_OCCUPY_16BIT | 0x012,

93 CSI_PIX_FORMAT_BayerBG12 = CSI_MONO_FORMAT | CSI_OCCUPY_16BIT | 0x013

94 } csiPixelFormat;

95

100 typedef enum csiDeviceAccessMode {

101 CSI_DEV_MODE_UNKNOWN = 0x00,

102 CSI_DEV_MODE_NONE = 0x01,

103 CSI_DEV_MODE_EXCLUSIVE,

104 CSI_DEV_MODE_READ,

105 CSI_DEV_MODE_CONTROL

106 } csiDeviceAccessMode;

107

108

113 typedef enum csiDeviceAccessStatus {

114 CSI_DEV_ACCESS_STATUS_UNKNOWN = 0x00,

115 CSI_DEV_ACCESS_STATUS_READWRITE = 0x01,

116 CSI_DEV_ACCESS_STATUS_READONLY = 0x02,

117 CSI_DEV_ACCESS_STATUS_NOACCESS = 0x03,

118 CSI_DEV_ACCESS_STATUS_BUSY = 0x04,

119 CSI_DEV_ACCESS_STATUS_OPEN_READWRITE = 0x05,

120 CSI_DEV_ACCESS_STATUS_OPEN_READ = 0x06

121 } csiDeviceAccessStatus;

122

123

128 typedef enum csiFeatureType {

129 CSI_UNKNOWN_TYPE,

130 CSI_BOOLEAN_TYPE,

131 CSI_INT_TYPE,

132 CSI_FLOAT_TYPE,

133 CSI_STRING_TYPE,

134 CSI_ENUMERATION_TYPE,

135 CSI_ENUMENTRY_TYPE,

136 CSI_CATEGORY,

137 CSI_COMMAND,

138 CSI_REGISTER,

139 CSI_PORT

140 } csiFeatureType;

141

142

147 typedef enum csiAccessMode {

148 CSI_ACCESS_UNKNOWN,

149 CSI_ACCESS_NOT_AVAILABLE,

150 CSI_ACCESS_READ_ONLY,

151 CSI_ACCESS_READ_WRITE,

152 CSI_ACCESS_WRITE_ONLY

153 } csiAccessMode;

154

155

160 typedef enum csiFeatureVisibility {

161 CSI_VISIBILITY_BEGINNER = 1,

162 CSI_VISIBILITY_EXPERT,

163 CSI_VISIBILITY_GURU,

164 CSI_VISIBILITY_DEVELOPER,

165 CSI_VISIBILITY_INVISIBLE

166 } csiFeatureVisibility;

167

168

173 typedef enum csiModuleLevel {

174 CSI_UNKNOWN_MODULE,

175 CSI_TRANSPORTLAYER_MODULE,

176 CSI_INTERFACE_MODULE,

177 CSI_DEVICE_MODULE,

178 CSI_LOCAL_DEVICE_MODULE,

179 CSI_STREAM_MODULE,

180 CSI_BUFFER_MODULE

181 } csiModuleLevel;

182

183

188 typedef enum csiDisplayNotation {

189 CSI_NOTATION_AUTOMATIC,

190 CSI_NOTATION_FIXED,

191 CSI_NOTATION_SCIENTIFIC

192 } csiDisplayNotation;

193

194

199 typedef enum csiRepresentation {

200 CSI_REPRESENTATION_LINEAR,

201 CSI_REPRESENTATION_LOGARITHMIC,

202 CSI_REPRESENTATION_BOOLEAN,

203 CSI_REPRESENTATION_PURENUMBER,

204 CSI_REPRESENTATION_HEX,

205 CSI_REPRESENTATION_IP,

206 CSI_REPRESENTATION_MAC,

207 CSI_REPRESENTATION_UNDEFINED

208 } csiRepresentation;

209

210

215 typedef struct csiFeatureParameter {

216 csiFeatureType type;

217 csiFeatureVisibility visibility;

218 csiAccessMode access;

219 csiDisplayNotation displayNotation;

220 csiRepresentation representation;

221 char displayPrecision;

223 int64_t valueInt;

224 int64_t incrementInt;

225 int64_t minimumInt;

226 int64_t maximumInt;

227 int64_t validValueSetInt[CSI_INFO_INT_BUFFER_SIZE];

228 size_t validValueSetSizeInt;

229

230 double valueFlt;

231 double incrementFlt;

232 double minimumFlt;

233 double maximumFlt;

235 char valueStr[CSI_INFO_STRING_BUFFER_SIZE];

236 size_t maximumStringLength;

238 int64_t level;

239 uint32_t enumCounter;

240 int32_t enumIndex;

242 char displayName[CSI_INFO_STRING_BUFFER_SIZE];

243 char name[CSI_INFO_STRING_BUFFER_SIZE];

244 char tooltip[CSI_INFO_STRING_BUFFER_SIZE];

246 char valueUnit[CSI_INFO_STRING_BUFFER_SIZE];

248 size_t featureRegLength;

249 int64_t featureRegAddress;

250 bool isFeature;

251 bool isLittleEndian;

252

253 } csiFeatureParameter;

254

255

260 typedef enum csiLogLevel

261 {

262 CSI_LOGLEVEL_NONE = 0,

263 CSI_LOGLEVEL_ERROR = 1,

264 CSI_LOGLEVEL_WARN = 2,

265 CSI_LOGLEVEL_INFO = 4,

266 CSI_LOGLEVEL_DEBUG = 8,

267 CSI_LOGLEVEL_TRACE = 16,

268 } csiLogLevel;

269

270

275 typedef enum csiErr {

276 csiSuccess = 0,

277 csiNotInitialized = -100,

278 csiInvalidState = -101,

279 csiNotOpened = -102,

280 csiNoImageDataAvailable = -103,

281 csiNotFound = -104,

282 csiInvalidParameter = -105,

283 csiNotAvailable = -106,

284 csiFunctionNotAvailable = -107,

285 csiTimeout = -108,

286 csiAborted = -109,

287 csiFileOperationFailure = -110,

288 csiFileOperationFatalError = -111,

289 csiNoAccess = -112,

290 csiWrongBufferSize = -113,

291 csiInvalidBuffer = -114,

292 csiResourceInUse = -115,

293 csiNotImplemented = -116,

294 csiInvalidHandle = -117,

295 csiIOError = -118,

296 csiParsingError = -119,

297 csiInvalidValue = -120,

298 csiResourceExhausted = -121,

299 csiOutOfMemory = -122,

300 csiBusy = -123,

301 csiUnknown = -200,

302 csiCustomErr = -0x0f000000

303 } csiErr;

304

305

310 typedef enum csiEventType

311 {

312 CSI_EVT_NEWIMAGEDATA = 0x00,

313 CSI_EVT_ERROR = 0x01,

314 CSI_EVT_MODULE = 0x02,

315 CSI_EVT_FEATURE_INVALIDATE = 0x03,

316 CSI_EVT_FEATURE_CHANGE = 0x04,

317 CSI_EVT_REMOTE_DEVICE = 0x05,

318 CSI_EVT_CUSTOM = 0x1000

319 } csiEventType;

320

321

326 typedef enum csiAcquisitionMode {

327 CSI_ACQUISITION_SINGLE_FRAME = 0x00000001,

328 CSI_ACQUISITION_CONTINUOUS = 0xFFFFFFFF

329 } csiAcquisitionMode;

330

331

336 typedef enum csiMemTransferStatus

337 {

338 csiTransferStatusInit,

339 csiTransferStatusInProgress,

340 csiTransferStatusInProgressWaiting,

341 csiTransferStatusFinishSucess,

342 csiTransferStatusFinishError,

343 csiTransferStatusCancelOnError

345 } csiMemTransferStatus;

346

347

352 typedef struct csiMemTransferInfo {

353 csiHandle device;

354 size_t totalBytesToTransfer;

355 size_t bytesTransferred;

356 csiMemTransferStatus status;

357 csiErr errorCode;

358 const char* progressText;

359 } csiMemTransferInfo;

360

361

362 struct csiEventUserData;

363 struct csiMemTransferUserData;

364 struct csiLogUserData;

365

366

371 typedef struct csiTLProducerInfos {

372 char transportLayerName[CSI_INFO_STRING_BUFFER_SIZE];

373 char transportLayerDisplayName[CSI_INFO_STRING_BUFFER_SIZE];

374 char transportLayerType[CSI_INFO_STRING_BUFFER_SIZE];

375 char transportLayerPath[CSI_INFO_STRING_BUFFER_SIZE];

376 char transportLayerID[CSI_INFO_STRING_BUFFER_SIZE];

377 size_t pathSizeInBytes;

378 } csiTLProducerInfos;

379

380

385 typedef struct csiDeviceInfo

386 {

387 char deviceIdentifier[CSI_INFO_STRING_BUFFER_SIZE];

388 char name[CSI_INFO_STRING_BUFFER_SIZE];

389 char model[CSI_INFO_STRING_BUFFER_SIZE];

390 char vendor[CSI_INFO_STRING_BUFFER_SIZE];

391 char serialNumber[CSI_INFO_STRING_BUFFER_SIZE];

392 char interfaceDescription[CSI_INFO_STRING_BUFFER_SIZE];

393 char interfaceID[CSI_INFO_STRING_BUFFER_SIZE];

394 char userName[CSI_INFO_STRING_BUFFER_SIZE];

395 char version[CSI_INFO_STRING_BUFFER_SIZE];

396 int64_t cameraSwPackageIsConsistent;

397 csiTLProducerInfos tlProducerInfos;

398 csiDeviceAccessStatus accessStatus;

399 uint64_t timestampFrequediscncy;

400 } csiDeviceInfo;

401

402

407 typedef struct csiDiscoveryInfo {

408 uint32_t numDevices;

409 double progress;

410 bool discoveryRunning;

411 csiDeviceInfo devices[CSI_DISCOVERY_INFO_DEVICE_COUNT];

412 } csiDiscoveryInfo;

413

418 typedef struct csiTLInterfaceInfo

419 {

420 char interfaceDescription[CSI_INFO_STRING_BUFFER_SIZE];

421 char interfaceID[CSI_INFO_STRING_BUFFER_SIZE];

422 csiTLProducerInfos tlProducerInfos;

423 } csiTLInterfaceInfo;

424

429 typedef struct csiTLInterfaceDiscoveryInfo

430 {

431 uint32_t numInterfaces;

432 double progress;

433 bool discoveryRunning;

434 csiTLInterfaceInfo interfaceInfos[CSI_TL_INTERFACE_COUNT];

435 } csiTLInterfaceDiscoveryInfo;

436

437

442 typedef struct csiDataStreamInfo {

443 char identifier[CSI_INFO_STRING_BUFFER_SIZE];

444 char displayName[CSI_INFO_STRING_BUFFER_SIZE];

445 uint32_t index;

446 } csiDataStreamInfo;

447

448

453 typedef struct csiImageInfo {

454 uint32_t width;

455 uint32_t height;

456 uint32_t linePitch;

457 uint32_t numChannels;

458 csiPixelFormat format;

459 } csiImageInfo;

460

461

466 typedef struct csiEventData {

467 csiEventType type;

468 csiHandle sender;

469 csiModuleLevel senderType;

470 char* tl_rawEventData;

471 size_t tl_rawEventDataSizeBytes;

472 char* eventValue;

473 size_t eventValueSizeBytes;

474 uint64_t eventIdentifier;

475 } csiEventData;

476

481 typedef struct CSI_DLL_EXPORT csiNewBufferEventData

482 {

483 csiNewBufferEventData();

484 ~csiNewBufferEventData();

485

486 csiNewBufferEventData(const csiNewBufferEventData& other);

487 csiNewBufferEventData(csiNewBufferEventData&& other) noexcept;

488 csiNewBufferEventData& operator=(csiNewBufferEventData& other);

489 csiNewBufferEventData& operator=(csiNewBufferEventData&& other) noexcept;

490

491 csiEventType type{ CSI::csiEventType::CSI_EVT_NEWIMAGEDATA };

492 csiHandle sender{ CSI_EMPTY_HANDLE };

493 csiModuleLevel senderType{ CSI::csiModuleLevel::CSI_UNKNOWN_MODULE };

494 char* tl_rawEventData{ nullptr };

495 size_t tl_rawEventDataSizeBytes{ 0 };

496 unsigned char* eventValue{ nullptr };

497 size_t eventValueSizeBytes{ 0 };

498 uint64_t eventIdentifier{ 0 };

499 csiHandle bufferHandle{ 0 };

500 uint64_t imageNr{ 0 };

501 uint64_t bufferIdentifier{ 0 };

502 uint64_t timestampMS{ 0 };

503 uint64_t timestampRaw{ 0 };

504 csiImageInfo imageInfo{};

505 } csiNewBufferEventData;

506

507

515 typedef struct csiAcquistionStatistics

516 {

517 int64_t framesUnderrun;

518 int64_t framesDropped;

519 int64_t framesAcquired;

520 int64_t networkPacketsOK;

521 int64_t networkPacketsError;

523 } csiAcquistionStatistics;

524

529 typedef enum csiDownloadOptions

530 {

531 CSI_DOWNLOAD_NO_OPTIONS = 0

532 } csiDownloadOptions;

533

534

539 typedef enum csiUploadOptions

540 {

541 CSI_UPLOAD_NO_OPTIONS = 0,

542 CSI_UPLOAD_IGNORE_CHECKSUM = 1

543 } csiUploadOptions;

544

550 typedef struct alignas(uint64_t) csiFileTransferParams

551 {

552 const char* fileName;

553 const char* fileType;

554 } csiFileTransferParams;

555

561 typedef struct alignas(uint64_t) csiDownloadParams

562 {

563 csiFileTransferParams fileParams;

564 csiDownloadOptions options;

565 } csiUploadDownloadUploadParams;

566

572 typedef struct alignas(uint64_t) csiUploadParams

573 {

574 csiFileTransferParams fileParams;

575 csiUploadOptions options;

576 } csiUploadParams;

577

582 enum csiCalibrationLUT

583 {

584 CSI_DSNU_LUT1 = 1,

585 CSI_DSNU_LUT2,

586 CSI_PRNU_LUT1,

587 CSI_PRNU_LUT2

588 };

589

594 typedef enum csiReferenceImgLoadMode

595 {

596 CSI_LOAD_REF_IMG_FROM_DISC,

597 CSI_ACQUIRE_REF_IMG_FROM_CAMERA

598 } csiReferenceImgLoadMode;

599

600

605 typedef struct csiCalibrationParams

606 {

607 bool enableROI;

608 int64_t yStartROI;

609 int64_t heightROI;

610 bool enableExtrapolationLeft;

611 bool enableExtrapolationRight;

612 int64_t extrapolationLeft;

613 int64_t extrapolationRight;

614 int64_t extrapolationWidth;

615 uint64_t firstValidPixel;

617 int64_t targetValue;

618 bool calcImprove;

619 double contrast;

620 double brightness;

621 bool isCCDSensor = false;

622 } csiCalibrationParams;

623

628 typedef enum CalibrationMode

629 {

630 DSNU_CALIBRATION = 1,

631 PRNU_CALIBRATION

632 } CalibrationMode;

633

634 typedef void *CB_OBJECT;

635 typedef void (*CB_FEATURE_INVALIDATED_PFN)(const char *featureName, void* userdata);

636

637 typedef void(*csiDiscoveryInfoCallbackFunc)(const csiDiscoveryInfo* discoveryInfo);

638 typedef void (*csiDiscoveryTLInterfaceInfoCallbackFunc)(const csiTLInterfaceDiscoveryInfo* discoveryInfo);

639 typedef bool(*csiMemTransferCallbackFunc)(const csiMemTransferInfo* info, struct csiMemTransferUserData* userdata);

640 typedef void(*csiLogSinkCallbackFunc)(csiLogLevel, const char* message, struct csiLogUserData* userdata);

641

642 // Global general functions

643

656 CSI_DLL_EXPORT csiErr csiInit(csiLogLevel logLvl, csiLogSinkCallbackFunc logCallbackFunc CSI_DEFAULT_PARAM_NULL, csiLogUserData* userdata CSI_DEFAULT_PARAM_NULL);

657

663 CSI_DLL_EXPORT csiErr csiClose();

664

672 CSI_DLL_EXPORT csiErr csiReset();

673

691 CSI_DLL_EXPORT csiErr csiDiscoverDevices(csiDiscoveryInfo* discoveryInfoOut, uint64_t timeoutMilliseconds, csiDiscoveryInfoCallbackFunc discCallbackFunc CSI_DEFAULT_PARAM_NULL, const char* additionalSearchPaths CSI_DEFAULT_PARAM_NULL, bool overrideSearchPath CSI_DEFAULT_PARAM_FALSE);

692

705 CSI_DLL_EXPORT csiErr csiGetDeviceInfo(uint32_t deviceIndex, csiDeviceInfo* deviceInfoOut);

706

731 CSI_DLL_EXPORT csiErr csiDiscoverTLInterfaces(csiTLInterfaceDiscoveryInfo* discoveryInfoOut, uint64_t timeoutMilliseconds, csiDiscoveryTLInterfaceInfoCallbackFunc discCallbackFunc CSI_DEFAULT_PARAM_NULL, const char* additionalSearchPaths CSI_DEFAULT_PARAM_NULL, bool overrideSearchPath CSI_DEFAULT_PARAM_FALSE);

732

733

747 CSI_DLL_EXPORT csiErr csiGetNumberOfTLProducers(int32_t *numTLProducers);

748

757 CSI_DLL_EXPORT csiErr csiGetTLProducerPathByIndex(char *transportLayerPath, size_t bufferSize, uint32_t index);

758

772 CSI_DLL_EXPORT csiErr csiGetTLProducerInfobyFilePath(csiTLProducerInfos* tlProducerInfos, const char* producerName);

773

774 // Device functions

775

804 CSI_DLL_EXPORT csiErr csiOpenDevice(const char* deviceIdentifier, const char* interfaceID, csiHandle* deviceHandleOut, uint64_t timeoutMilliseconds, csiDeviceAccessMode openMode);

805

818 CSI_DLL_EXPORT csiErr csiCloseDevice(csiHandle deviceHandle);

819

827 CSI_DLL_EXPORT csiErr csiCheckAndReallocBuffers(csiHandle deviceHandle);

828

843 CSI_DLL_EXPORT csiErr csiStartAcquisition(csiHandle deviceHandle, csiAcquisitionMode mode);

844

856 CSI_DLL_EXPORT csiErr csiStopAcquisition(csiHandle deviceHandle);

857

858

868 CSI_DLL_EXPORT csiErr csiAbortAcquisition(csiHandle deviceHandle);

869

870 // Data Stream functions

888 CSI_DLL_EXPORT csiErr csiGetNumberOfDataStreams(csiHandle deviceHandle, uint32_t* numberOfStreamsOut);

889

904 CSI_DLL_EXPORT csiErr csiGetDataStreamInfo(csiHandle deviceHandle, uint32_t dsIndex, csiDataStreamInfo* dataStreamInfoOut);

905

920 CSI_DLL_EXPORT csiErr csiGetDeviceDataStreamInfo(csiHandle moduleHandle, uint32_t dsIndex, csiDataStreamInfo* dataStreamInfoOut);

921

944 CSI_DLL_EXPORT csiErr csiCreateDataStream(csiHandle deviceHandle, uint32_t dsIndex, csiHandle* dataStreamOut, uint32_t numberOfBuffers, size_t bufferSize CSI_DEFAULT_PARAM_ZERO);

945

960 CSI_DLL_EXPORT csiErr csiCloseDataStream(csiHandle dataStream);

961

978 CSI_DLL_EXPORT csiErr csiRegisterEvent(csiHandle moduleHandle, csiEventType evtType, csiHandle* eventOut, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE);

979

1001 CSI_DLL_EXPORT csiErr csiWaitForEvent(csiHandle evt, uint64_t timeoutMilliseconds, csiEventData** evtDataOut);

1002

1013 CSI_DLL_EXPORT csiErr csiUnregisterEvent(csiHandle evt);

1014

1024 CSI_DLL_EXPORT csiErr csiEventKill(csiHandle evt);

1025

1047 CSI_DLL_EXPORT csiErr csiGetNextImage(csiHandle eventHandle, csiNewBufferEventData** bufferInfoOut, uint64_t timeoutMilliseconds);

1048

1070 CSI_DLL_EXPORT csiErr csiReleaseImage(csiHandle dataStream, const csiNewBufferEventData* bufferInfo);

1071

1082 CSI_DLL_EXPORT csiErr csiGetAcquisitionStatistics(csiHandle dataStream, csiAcquistionStatistics* stats);

1083

1084 // TL interface functions

1085

1102 CSI_DLL_EXPORT csiErr csiOpenTLInterface(csiTLInterfaceInfo interfaceInfo, csiHandle* interfaceHandleOut, uint64_t timeoutMilliseconds);

1103

1116 CSI_DLL_EXPORT csiErr csiCloseTLInterface(csiHandle interfaceHandle);

1117

1118 // Module configuration functions

1134 CSI_DLL_EXPORT csiErr csiGetFeatureBool(csiHandle moduleHandle, const char* featureName, bool* valueOut, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE);

1135

1151 CSI_DLL_EXPORT csiErr csiSetFeatureBool(csiHandle moduleHandle, const char* featureName, bool value, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE);

1152

1153

1164 CSI_DLL_EXPORT csiErr csiGetFeatureInt(csiHandle moduleHandle, const char* featureName, int64_t* valueOut, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE);

1165

1180 CSI_DLL_EXPORT csiErr csiSetFeatureInt(csiHandle moduleHandle, const char* featureName, int64_t value, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE);

1181

1197 CSI_DLL_EXPORT csiErr csiGetFeatureFloat(csiHandle moduleHandle, const char* featureName, double* valueOut, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE);

1198

1213 CSI_DLL_EXPORT csiErr csiSetFeatureFloat(csiHandle moduleHandle, const char* featureName, double value, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE);

1214

1241 CSI_DLL_EXPORT csiErr csiGetFeatureString(csiHandle moduleHandle, const char* featureName, char* valueOut, size_t* sizeOut, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE);

1242

1266 CSI_DLL_EXPORT csiErr csiSetFeatureString(csiHandle moduleHandle, const char* featureName, const char* value, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE);

1267

1287 CSI_DLL_EXPORT csiErr csiExecuteCommand(csiHandle moduleHandle, const char* featureName, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE);

1288

1308 CSI_DLL_EXPORT csiErr csiIsCommandActive(csiHandle moduleHandle, const char* featureName, bool *isActive, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE);

1309

1334 CSI_DLL_EXPORT csiErr csiGetFeatureReg(csiHandle moduleHandle, const char* featureName, char* buffer, size_t* length, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE);

1335

1360 CSI_DLL_EXPORT csiErr csiSetFeatureReg(csiHandle moduleHandle, const char* featureName, const char* buffer, size_t length, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE);

1361

1384 CSI_DLL_EXPORT csiErr csiGetFeatureEnum(csiHandle moduleHandle, const char* featureName, csiFeatureParameter *featureParamOut, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE);

1385

1410 CSI_DLL_EXPORT csiErr csiSetFeatureEnum(csiHandle moduleHandle, const char* featureName, const char* value, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE);

1411

1428 CSI_DLL_EXPORT csiErr csiGetFeatureParameter(csiHandle moduleHandle, const char* featureName, csiFeatureParameter* featureParamOut, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE);

1429

1444 CSI_DLL_EXPORT csiErr csiGetFeatureAccessMode(csiHandle moduleH, const char* featureName, csiAccessMode* access, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE);

1445

1471 CSI_DLL_EXPORT csiErr csiIterateFeatureTree(csiHandle moduleHandle, const char* rootFeatureName, uint32_t index, char* featureNameOut, size_t nameBuffSize, csiFeatureType* type, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE);

1472

1488 CSI_DLL_EXPORT csiErr csiGetFeatureEnumEntryCount(csiHandle moduleHandle, const char* featureName, uint32_t* count, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE);

1489

1512 CSI_DLL_EXPORT csiErr csiGetFeatureEnumEntryByIndex(csiHandle moduleHandle, const char* featureName, int32_t enumIndex, csiFeatureParameter *featureParamOut, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE);

1513

1533 CSI_DLL_EXPORT csiErr csiGetFeatureEnumEntryByName(csiHandle moduleHandle, const char* featureName, const char* enumValue, csiFeatureParameter *featureParamOut, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE);

1534

1535

1536 // File transfer functions

1559 CSI_DLL_EXPORT csiErr csiGetUpdateFileType(csiHandle moduleHandle, const char* fileName, char* fileTypeOut, size_t bufferSize);

1560

1582 CSI_DLL_EXPORT csiErr csiFileDownloadToDevice(csiHandle moduleHandle,

1583 csiHandle localDevice,

1584 const char* fileName,

1585 const char* fileType,

1586 uint64_t timeoutMilliseconds,

1587 csiMemTransferCallbackFunc listener CSI_DEFAULT_PARAM_NULL,

1588 csiMemTransferUserData* userdata CSI_DEFAULT_PARAM_NULL);

1589

1609 CSI_DLL_EXPORT csiErr csiFileUploadFromDevice(csiHandle moduleHandle,

1610 csiHandle localDevice,

1611 const char* fileName,

1612 const char* fileType,

1613 uint64_t timeoutMilliseconds,

1614 csiMemTransferCallbackFunc listener CSI_DEFAULT_PARAM_NULL,

1615 csiMemTransferUserData* userdata CSI_DEFAULT_PARAM_NULL);

1616

1617

1637 CSI_DLL_EXPORT csiErr csiFileDownloadToDeviceEx

1638 (csiHandle moduleHandle,

1639 csiHandle localDevice,

1640 const csiDownloadParams params,

1641 uint64_t timeoutMilliseconds,

1642 csiMemTransferCallbackFunc listener CSI_DEFAULT_PARAM_NULL,

1643 csiMemTransferUserData* userdata CSI_DEFAULT_PARAM_NULL);

1644

1666 CSI_DLL_EXPORT csiErr csiFileUploadFromDeviceEx

1667 (csiHandle moduleHandle,

1668 csiHandle localDevice,

1669 const csiUploadParams params,

1670 uint64_t timeoutMilliseconds,

1671 csiMemTransferCallbackFunc listener CSI_DEFAULT_PARAM_NULL,

1672 csiMemTransferUserData* userdata CSI_DEFAULT_PARAM_NULL);

1673

1674 // Memory transfer functions

1688 CSI_DLL_EXPORT csiErr csiReadMemory(csiHandle moduleHandle, uint64_t address, char* buffer, size_t sizeBytes);

1689

1702 CSI_DLL_EXPORT csiErr csiWriteMemory(csiHandle moduleHandle, uint64_t address, const char* buffer, size_t sizeBytes);

1703

1716 CSI_DLL_EXPORT csiErr csiIsModuleLittleEndian(csiHandle moduleHandle, csiModuleLevel lvl, bool *isLittleEndian);

1717

1727 CSI_DLL_EXPORT csiErr csiGetErrorDescription(csiErr error, char* bufferOut, size_t bufferSize);

1728

1729 // Helper functions

1739 CSI_DLL_EXPORT unsigned char csiBitsPerPixelFromFormat(const csiPixelFormat format);

1740

1761 CSI_DLL_EXPORT csiErr csiRegisterInvalidateCB(csiHandle moduleHandle, const char *featureName, CB_OBJECT objCB, CB_FEATURE_INVALIDATED_PFN pfnFeatureInvalidateCB, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE);

1762

1763 //unregistering the call-back function

1779 CSI_DLL_EXPORT csiErr csiUnRegisterInvalidateCB(csiHandle moduleHandle, const char *featureName, csiModuleLevel module CSI_DEFAULT_PARAM_MODULE);

1780

1791 CSI_DLL_EXPORT csiErr csiGetLibraryVersion(uint32_t* major, uint32_t* minor, uint32_t* patch, uint32_t* revision, uint32_t* build);

1792

1799 CSI_DLL_EXPORT csiErr csiSetFeatureCachingDisabled(bool disableCaching);

1800

1808 CSI_DLL_EXPORT csiErr csiIsFeatureCachingDisabled(bool *isDisabled);

1809

1832 CSI_DLL_EXPORT csiErr csiGenerateAndUploadCalibrationData(csiHandle devHandle,

1833 csiCalibrationLUT LUTSelector,

1834 csiReferenceImgLoadMode imgLoadMode,

1835 csiCalibrationParams calibParam,

1836 csiNewBufferEventData *refImage,

1837 const char* imgFile);

1866 CSI_DLL_EXPORT csiErr csiGenerateAndSaveCalibrationDataToFile(csiHandle devHandle,

1867 CalibrationMode calibMode,

1868 csiReferenceImgLoadMode imgLoadMode,

1869 csiCalibrationParams calibParam,

1870 csiNewBufferEventData* refImage,

1871 const char* imgFile,

1872 const char* calibrationFile);

1873

1902 CSI_DLL_EXPORT csiErr csiGenerateReferenceImage(csiHandle devHandle,

1903 const CalibrationMode calibMode,

1904 csiReferenceImgLoadMode imgLoadMode,

1905 csiCalibrationParams calibParam,

1906 const csiNewBufferEventData* refImage,

1907 const char* imgFile,

1908 int *referenceImage, int *resMaxValue);

1909 #ifdef __cplusplus

1910 }

1911 }

1912 #endif // __cplusplus

1913

1914 #endif // CSI_CSIF_H_