Impact Acquire SDK C
|
Functions for accessing device and memory (especially image specific/captured data) functionality. More...
Functions | |
TDMR_ERROR DMR_CALL | DMR_AcquisitionStart (HDRV hDrv) |
Manually starts the acquisition engine of this device driver instance. | |
TDMR_ERROR DMR_CALL | DMR_AcquisitionStop (HDRV hDrv) |
Manually stops the acquisition engine of this device driver instance. | |
TDMR_ERROR DMR_CALL | DMR_AllocImageBuffer (ImageBuffer **ppBuffer, TImageBufferPixelFormat pixelFormat, int width, int height) |
Allocates memory for a new ImageBuffer structure and the associated pixel memory. | |
TDMR_ERROR DMR_CALL | DMR_AllocImageRequestBufferDesc (ImageBuffer **ppBuffer, int channelCount) |
Allocates memory for a new ImageBuffer structure. | |
TDMR_ERROR DMR_CALL | DMR_BuildImpactImage (const ImageBuffer *pBuffer, IPL_BUFHANDLE *pBufHandle, TImpactBufferFlag flags, void *pReserved, size_t reservedSize) |
Converts an image from the drivers internal format into the mvIMPACT processing libraries format. | |
TDMR_ERROR DMR_CALL | DMR_Close (void) |
Frees internal data structures and decreases the usage counter for this library. | |
TDMR_ERROR DMR_CALL | DMR_CloseDevice (HDRV hDrv, HDEV hDev) |
Closes a device. | |
TDMR_ERROR DMR_CALL | DMR_CloseVideoStream (HDMR_VIDEO_STREAM hVideoStream) |
Closes a video stream and frees resources. | |
TDMR_ERROR DMR_CALL | DMR_CopyCameraDescription (HDRV hDrv, HLIST hCameraDescList, const char *pNewName) |
Creates a new camera description list as a copy of the current one(deprecated). | |
TDMR_ERROR DMR_CALL | DMR_CopyImageBuffer (const ImageBuffer *pSrc, ImageBuffer **ppDst, int flags) |
Copies the complete data of one ImageBuffer structure into another. | |
TDMR_ERROR DMR_CALL | DMR_CopyImageRequestBufferDesc (const ImageBuffer *pSrc, ImageBuffer **ppDst, int flags) |
Copies the complete data of one ImageBuffer structure into another. | |
TDMR_ERROR DMR_CALL | DMR_CreateRequestControl (HDRV hDrv, const char *pName, const char *pParentName, HLIST *pHList, int *pRequestCtrl) |
Creates a new image request control object. | |
TDMR_ERROR DMR_CALL | DMR_CreateSetting (HDRV hDrv, const char *pName, const char *pParentName, HLIST *pHList) |
Creates a new setting. | |
TDMR_ERROR DMR_CALL | DMR_CreateUserDataEntry (HDEV hDev, HLIST *pEntry) |
Creates and returns a new entry to store user specific data. | |
TDMR_ERROR DMR_CALL | DMR_DeleteList (HDRV hDrv, const char *pName, TDMR_ListType type) |
Deletes a list previously created by the user. | |
TDMR_ERROR DMR_CALL | DMR_DeleteSetting (const char *pName, TStorageLocation location, TScope scope) |
Tries to delete a certain setting. | |
TDMR_ERROR DMR_CALL | DMR_DeleteUserDataEntry (HDEV hDev, HLIST hEntry) |
Deletes an entry of user specific data. | |
const char *DMR_CALL | DMR_ErrorCodeToString (int errorCode) |
Returns a string representation of a given error code. | |
TDMR_ERROR DMR_CALL | DMR_ExportCameraDescription (HDRV hDrv, HLIST hCameraDescList) |
Stores the current camera description on disc(deprecated). | |
TDMR_ERROR DMR_CALL | DMR_FindList (HDRV hDrv, const char *pName, TDMR_ListType type, unsigned int flags, HLIST *pHList) |
Locates a specified list within the device drivers interface. | |
TDMR_ERROR DMR_CALL | DMR_GetDevice (HDEV *pHDev, TDMR_DeviceSearchMode searchMode, const char *pSearchString, unsigned int devNr, char wildcard) |
Tries to locate a certain device in the system which matches the input criteria. | |
TDMR_ERROR DMR_CALL | DMR_GetDeviceCount (unsigned int *pDevCnt) |
Receives the number of devices recognized by this interface. | |
TDMR_ERROR DMR_CALL | DMR_GetDeviceInfo (unsigned int devNr, TDMR_DeviceInfo *pInfo, size_t infoSize) |
Obtains information about a certain device(deprecated). | |
TDMR_ERROR DMR_CALL | DMR_GetDeviceInfoEx (HDEV hDev, TDMR_DeviceInfoType infoType, void *pInfo, size_t *pInfoSize) |
Obtains information about a certain device. | |
TDMR_ERROR DMR_CALL | DMR_GetDeviceWithStringID (HDEV *pHDev, TDMR_DeviceSearchMode searchMode, const char *pSearchString, const char *pStringID, char wildcard) |
Tries to locate a certain device in the system which matches a certain string ID. | |
TDMR_ERROR DMR_CALL | DMR_GetDriverHandle (HDEV hDev, HDRV *pHDrv) |
Obtains the driver interface handle to a initialised device. | |
TDMR_ERROR DMR_CALL | DMR_GetImageRequestBuffer (HDRV hDrv, int requestNr, ImageBuffer **ppBuffer) |
Returns the ImageBuffer of the desired request. | |
TDMR_ERROR DMR_CALL | DMR_GetImageRequestBufferChannelData (HDRV hDrv, int requestNr, int channelNr, int *pChannelOffset, int *pLinePitch, int *pPixelPitch, char *pChannelDesc, size_t channelDescSize) |
Returns information about the channel specific data of the image associated with the desired request. | |
TDMR_ERROR DMR_CALL | DMR_GetImageRequestBufferData (HDRV hDrv, int requestNr, int *pBytesPerPixel, int *pChannelCount, int *pHeight, int *pWidth, int *pSize, TImageBufferPixelFormat *pPixelFormat, void **ppData) |
Returns information about the image associated with the desired request. | |
TDMR_ERROR DMR_CALL | DMR_GetImageRequestBufferImageData (HDRV hDrv, int requestNr, int xOff, int yOff, int width, int height, char *pBuf, size_t bufSize) |
Returns an AOI of raw image data belonging to the specified request. | |
MVDMR_API TDMR_ERROR DMR_CALL | DMR_GetImageRequestInfo (HDRV hDrv, int requestNr, RequestInfo *pInfo) |
Retrieves the RequestInfo of the desired request(deprecated). | |
TDMR_ERROR DMR_CALL | DMR_GetImageRequestInfoEx (HDRV hDrv, int requestNr, RequestInfo *pInfo, size_t infoSize, int reserved, int reserved2) |
Retrieves the RequestInfo of the desired request. | |
TDMR_ERROR DMR_CALL | DMR_GetImageRequestParamS (HDRV hDrv, int requestNr, TImageRequestParam param, char *pBuf, size_t bufSize) |
Retrieves a string representation of a request related parameter. | |
MVDMR_API TDMR_ERROR DMR_CALL | DMR_GetImageRequestResult (HDRV hDrv, int requestNr, RequestResult *pResult) |
Retrieves the RequestResult of the desired request(deprecated). | |
TDMR_ERROR DMR_CALL | DMR_GetImageRequestResultEx (HDRV hDrv, int requestNr, RequestResult *pResult, size_t resultSize, int reserved, int reserved2) |
Retrieves the RequestResult of the desired request. | |
MVDMR_API TDMR_ERROR DMR_CALL | DMR_GetImpactRequestBuffer (HDRV hDrv, int requestNr, IPL_BUFHANDLE *pBuffer) |
Returns the IPL_BUFHANDLE of the desired request(deprecated). | |
TDMR_ERROR DMR_CALL | DMR_GetImpactRequestBufferEx (HDRV hDrv, int requestNr, IPL_BUFHANDLE *pBuffer, TImpactBufferFlag flags, unsigned int) |
Returns the IPL_BUFHANDLE of the desired request. | |
TDMR_ERROR DMR_CALL | DMR_GetLastError (TDMR_ERROR *pErrorCode, char *pErrorText, size_t *pErrorTextSize) |
Returns the last error code and string that did occur within the current thread. | |
const char *DMR_CALL | DMR_GetVersion (TLibraryQuery libraryQuery) |
Returns a string containing the version number of the specified library. | |
TDMR_ERROR DMR_CALL | DMR_ImageRequestConfigure (HDRV hDrv, int requestNr, int reserved, void *pReserved) |
Sets a request into configuration mode. | |
TDMR_ERROR DMR_CALL | DMR_ImageRequestReset (HDRV hDrv, int requestCtrl, int mode) |
Deletes all requests currently queued for the specified request control. | |
TDMR_ERROR DMR_CALL | DMR_ImageRequestResultQueueElementCount (HDRV hDrv, int queueNr, int *pResultQueueElements) |
Returns the number of Request objects in the result queue. | |
TDMR_ERROR DMR_CALL | DMR_ImageRequestSave (HDRV hDrv, int requestNr, const char *pFileName, TImageFileFormat format) |
Stores the image data described by a request into a file. | |
TDMR_ERROR DMR_CALL | DMR_ImageRequestSaveToVideoStream (HDRV hDrv, int requestNr, HDMR_VIDEO_STREAM hVideoStream) |
Stores the image data described by a request into a video stream. | |
TDMR_ERROR DMR_CALL | DMR_ImageRequestSingle (HDRV hDrv, int requestCtrl, int *pRequestUsed) |
Sends an image request to the device driver. | |
TDMR_ERROR DMR_CALL | DMR_ImageRequestUnlock (HDRV hDrv, int requestNr) |
Unlocks the request for the driver again. | |
TDMR_ERROR DMR_CALL | DMR_ImageRequestWaitFor (HDRV hDrv, int timeout_ms, int queueNr, int *pRequestNr) |
Waits for a request object to become ready. | |
TDMR_ERROR DMR_CALL | DMR_ImportCameraDescription (HDRV hDrv, HLIST hCameraDescList) |
Updates a camera description with the data stored in a previous session or with the original default data(deprecated). | |
TDMR_ERROR DMR_CALL | DMR_Init (HDMR *pDevices) |
Initialises the library. | |
TDMR_ERROR DMR_CALL | DMR_InitVideoStreamAPI (void *pReserved, size_t reserved) |
Initialises the video stream API. | |
TDMR_ERROR DMR_CALL | DMR_IsSettingAvailable (const char *pName, TStorageLocation storageLocation, TScope scope) |
Checks if a certain setting is available. | |
TDMR_ERROR DMR_CALL | DMR_IsVideoStreamPaused (HDMR_VIDEO_STREAM hVideoStream) |
Checks is this video stream currently is paused. | |
TDMR_ERROR DMR_CALL | DMR_LoadImageBuffer (ImageBuffer **ppBuffer, const char *pFileName, TImageFileFormat format) |
Loads an image from a file into a newly allocated image buffer structure. | |
TDMR_ERROR DMR_CALL | DMR_LoadRTCtrProgram (HDRV hDrv, HLIST hRTCtrList) |
Loads a program from a file into a hardware real-time controller (HRTC) | |
TDMR_ERROR DMR_CALL | DMR_LoadSetting (HDRV hDrv, const char *pName, TStorageFlag storageFlags, TScope scope) |
Loads a previously stored setting. | |
TDMR_ERROR DMR_CALL | DMR_LoadSettingFromDefault (HDRV hDrv, TScope) |
Loads the default settings. | |
TDMR_ERROR DMR_CALL | DMR_OpenDevice (HDEV hDev, HDRV *pHDrv) |
Initialises a device. | |
TDMR_ERROR DMR_CALL | DMR_OpenVideoStream (const char *pFileName, const unsigned int imageWidth, const unsigned int imageHeight, const TVideoCodec codec, const unsigned int quality_pc, const unsigned int bitrate, HDMR_VIDEO_STREAM *pHVideoStream) |
Creates a new video stream. | |
TDMR_ERROR DMR_CALL | DMR_PauseVideoStream (HDMR_VIDEO_STREAM hVideoStream) |
Pauses a video stream. | |
TDMR_ERROR DMR_CALL | DMR_ReleaseImageBuffer (ImageBuffer **ppBuffer) |
frees the memory previously allocated for the specified ImageBuffer structure again. | |
TDMR_ERROR DMR_CALL | DMR_ReleaseImageRequestBufferDesc (ImageBuffer **ppBuffer) |
frees the memory previously allocated for the specified ImageBuffer structure again. | |
TDMR_ERROR DMR_CALL | DMR_ResumeVideoStream (HDMR_VIDEO_STREAM hVideoStream) |
Resumes a video stream. | |
TDMR_ERROR DMR_CALL | DMR_SaveImageBuffer (const ImageBuffer *pBuffer, const char *pFileName, TImageFileFormat format) |
Stores the complete data of one ImageBuffer structure into a file. | |
TDMR_ERROR DMR_CALL | DMR_SaveImageBufferToVideoStream (HDMR_VIDEO_STREAM hVideoStream, const ImageBuffer *pBuffer, const int64_type timestamp_us) |
Stores an image into a video stream. | |
TDMR_ERROR DMR_CALL | DMR_SaveRTCtrProgram (HDRV hDrv, HLIST hRTCtrList) |
Stores the current program of a hardware real-time controller (HRTC) into a file. | |
TDMR_ERROR DMR_CALL | DMR_SaveSetting (HDRV hDrv, const char *pName, TStorageFlag storageFlags, TScope scope) |
Stores the current settings. | |
TDMR_ERROR DMR_CALL | DMR_SaveSettingToDefault (HDRV hDrv, TScope scope) |
Stores the current settings under a default location. | |
TDMR_ERROR DMR_CALL | DMR_SetDeviceID (HDEV hDev, int newID) |
Assigns a new ID to this device. | |
TDMR_ERROR DMR_CALL | DMR_SetImageRequestBufferImageData (HDRV hDrv, int requestNr, int xOff, int yOff, int width, int height, char *pBuf, size_t) |
Sets an AOI of raw image data belonging to the specified request. | |
TDMR_ERROR DMR_CALL | DMR_UpdateDeviceList (unsigned int reserved, int reserved2) |
Updates the internal device list. | |
TDMR_ERROR DMR_CALL | DMR_UpdateDigitalInputs (HDRV hDrv) |
Updates the property representation of the digital inputs by checking the physical device's inputs. | |
TDMR_ERROR DMR_CALL | DMR_UpdateFirmware (HDEV hDev) |
Updates the firmware of the device. | |
TDMR_ERROR DMR_CALL | DMR_WriteUserDataToHardware (HDEV hDev) |
Writes the current set of user data into the devices non-volatile memory. | |
Functions for accessing device and memory (especially image specific/captured data) functionality.
TDMR_ERROR DMR_CALL DMR_AcquisitionStart | ( | HDRV | hDrv | ) |
Manually starts the acquisition engine of this device driver instance.
Calling this function will manually start this device drivers acquisition engine. This will only have effect on the overall behaviour, if the property acquisitionStartStopBehaviour is set to assbUser.
If supported by the device driver starting and stopping the acquisition engine manually can sometimes help to overcome capture queue under-runs or certain restrictions in the underlying device driver technology.
[in] | hDrv | A handle to the device drivers interface. |
TDMR_ERROR DMR_CALL DMR_AcquisitionStop | ( | HDRV | hDrv | ) |
Manually stops the acquisition engine of this device driver instance.
Calling this function will manually stop this device drivers acquisition engine. This will only have effect on the overall behaviour, if the property acquisitionStartStopBehaviour is set to assbUser.
[in] | hDrv | A handle to the device drivers interface. |
TDMR_ERROR DMR_CALL DMR_AllocImageBuffer | ( | ImageBuffer ** | ppBuffer, |
TImageBufferPixelFormat | pixelFormat, | ||
int | width, | ||
int | height ) |
Allocates memory for a new ImageBuffer structure and the associated pixel memory.
If ppBuffer points to a structure previously allocated by any other function, this memory will be lost(memory leak). In that case DMR_ReleaseImageRequestBufferDesc() (if the structure has been allocated with DMR_AllocImageRequestBufferDesc() or DMR_GetImageRequestBuffer()) or DMR_ReleaseImageBuffer()(if the structure has been allocated with DMR_AllocImageBuffer()) should be called before.
This function will allocate memory for the pixel data pointed to by ImageBuffer::vpData and also will fill the structure with channel specific data derived from the pixel format specified by the user. If this is NOT desired the function DMR_AllocImageRequestBufferDesc() should be used instead.
This function will call DMR_AllocImageRequestBufferDesc(), so everything described in that functions description will be valid for this call as well.
[out] | ppBuffer | A pointer to a pointer receiving the address of the allocated structure on a successful call to this function. |
[in] | pixelFormat | The pixel format of the buffer that shall be allocated. This will influence the amount of memory and the channel specific data that will be created. E.g. if an RGB format is selected the channel descriptor entries will contain 'R', 'G', and 'B' after a successful call to this function. |
[in] | width | The width of the buffer that shall be allocated. |
[in] | height | The height of the buffer that shall be allocated. |
TDMR_ERROR DMR_CALL DMR_AllocImageRequestBufferDesc | ( | ImageBuffer ** | ppBuffer, |
int | channelCount ) |
Allocates memory for a new ImageBuffer structure.
If ppBuffer points to a structure previously allocated by any other function, this memory will be lost(memory leak). In that case DMR_ReleaseImageRequestBufferDesc() (if the structure has been allocated with DMR_AllocImageRequestBufferDesc()) or DMR_ReleaseImageBuffer()(if the structure has been allocated with DMR_AllocImageBuffer())should be called before.
This function will NOT allocate memory for the pixel data pointed to by ImageBuffer::vpData and also will NOT fill the structure with channel specific data. If this is desired the function DMR_AllocImageBuffer() should be used instead.
[out] | ppBuffer | A pointer to a pointer receiving the address of the allocated structure on a successful call to this function. |
[in] | channelCount | The number of elements to allocate for channel specific data. |
TDMR_ERROR DMR_CALL DMR_BuildImpactImage | ( | const ImageBuffer * | pBuffer, |
IPL_BUFHANDLE * | pBufHandle, | ||
TImpactBufferFlag | flags, | ||
void * | pReserved, | ||
size_t | reservedSize ) |
Converts an image from the drivers internal format into the mvIMPACT processing libraries format.
This function will convert an image obtained from a device driver or any other image into an image that can be passed to any image processing function of the mvIMPACT processing library.
[in] | pBuffer | A const pointer to the image buffer that shall be converted |
[out] | pBufHandle | A pointer to a variable retrieving the data of the desired requests image buffer. The handle might be set to IPL_DONT_CARE if a new buffer shall be allocated. |
[in] | flags | Flags to define the behaviour of this function. |
[in] | pReserved | Reserved. Must be 0! |
[in] | reservedSize | Reserved. Must be 0! |
TDMR_ERROR DMR_CALL DMR_Close | ( | void | ) |
Frees internal data structures and decreases the usage counter for this library.
This function frees memory previously allocated by DMR_Init( HDMR* pHDmr ) and decrements the internal usage counter. For each call to DMR_Init( HDMR* pHDmr ) the user must call this function once before unloading the library from process memory again as otherwise resource leaks and other problems may arise.
When the internal reference counter indicates, that the library is not needed anymore the device manager automatically closes all devices which still might be open.
DllMain
context (Windows)! See DMR_Init( HDMR* pHDmr ) for additional details.TDMR_ERROR DMR_CALL DMR_CloseDevice | ( | HDRV | hDrv, |
HDEV | hDev ) |
Closes a device.
This function will try to close a device previously initialised by a call to DMR_OpenDevice() and associated with hDev and hDrv. Once this function has been called, every device driver object handle (HOBJ, HLIST) for this device will become invalid.
[in] | hDrv | A handle to the device drivers interface. |
[in] | hDev | A handle to the device. |
TDMR_ERROR DMR_CALL DMR_CloseVideoStream | ( | HDMR_VIDEO_STREAM | hVideoStream | ) |
Closes a video stream and frees resources.
Frees all resources allocated previously through a call to DMR_OpenVideoStream() and closes the associated file.
[in] | hVideoStream | The handle for the stream to close as obtained from a previous call to DMR_OpenVideoStream(). |
TDMR_ERROR DMR_CALL DMR_CopyCameraDescription | ( | HDRV | hDrv, |
HLIST | hCameraDescList, | ||
const char * | pNewName ) |
Creates a new camera description list as a copy of the current one(deprecated).
This function can be used to create a new camera description list. It will create a deep copy of the list referenced by hCameraDescList and will append it to the list of camera descriptions.
[in] | hDrv | A handle to the device drivers interface. |
[in] | hCameraDescList | A handle to the camera description list returned from a previous call to DMR_FindList() and one or more of the iterator functions OBJ_GetFirstSibling(), OBJ_GetNextSibling() and OBJ_GetFirstChild(). |
[in] | pNewName | A constant pointer to a C-string containing the name of the new camera description. |
TDMR_ERROR DMR_CALL DMR_CopyImageBuffer | ( | const ImageBuffer * | pSrc, |
ImageBuffer ** | ppDst, | ||
int | flags ) |
Copies the complete data of one ImageBuffer structure into another.
This function copies the image describing structure of one ImageBuffer structure into another. A deep copy is made including the complete pixel data!
[in] | pSrc | A pointer to an ImageBuffer structure to be copied. |
[out] | ppDst | A pointer to a pointer to a structure receiving the data stored in pSrc. |
[in] | flags | Currently unsupported. MUST be set 0. |
TDMR_ERROR DMR_CALL DMR_CopyImageRequestBufferDesc | ( | const ImageBuffer * | pSrc, |
ImageBuffer ** | ppDst, | ||
int | flags ) |
Copies the complete data of one ImageBuffer structure into another.
This function copies the image describing structure of one ImageBuffer structure into another. A swallow copy is made! Just the pointer to the image data (ImageBuffer::vpData) is copied, but NOT the data pointed to.
[in] | pSrc | A pointer to an ImageBuffer structure to be copied. |
[out] | ppDst | A pointer to a pointer to a structure receiving the data stored in pSrc. |
[in] | flags | Currently unsupported. MUST be set 0. |
TDMR_ERROR DMR_CALL DMR_CreateRequestControl | ( | HDRV | hDrv, |
const char * | pName, | ||
const char * | pParentName, | ||
HLIST * | pHList, | ||
int * | pRequestCtrl ) |
Creates a new image request control object.
This function creates a new request control based on an existing one. New request controls can only be derived from request controls that already exist. When the driver has been initialised there will at least be one base request control called 'Base', which acts as the base for all other request controls.
All request control constructed by the application must be derived either from this base or any of its children.
[in] | hDrv | A handle to the device drivers interface. |
[in] | pName | The name of the new request control to create. |
[in] | pParentName | The name of the request control to derive the new request control from. |
[out] | pHList | A pointer to the HLIST variable to receive the new list on a successful function call. This my be 0 if the caller is not interested in this value. |
[out] | pRequestCtrl | A pointer to the variable the receives the number of the new request control on a successful call. This parameter is currently NOT implemented and therefore will NOT be modified by this function. |
TDMR_ERROR DMR_CALL DMR_CreateSetting | ( | HDRV | hDrv, |
const char * | pName, | ||
const char * | pParentName, | ||
HLIST * | pHList ) |
Creates a new setting.
This function creates a new setting based on an existing one. New settings can only be derived from settings that already exist. When the driver has been initialised there will at least be one base setting called 'Base', which acts as the base for all other settings.
When a new setting is created it derives all the properties from the parent setting. That means initially the new setting will contain the very same data as the parent setting. As long as a component hasn't been modified in the new setting it will depend on the parent settings data. That means if e.g. a property in the parent list is modified, the newly created setting will also benefit from the updated value.
To release a certain component from this dependency it must be assigned a new value. The function OBJ_IsDefault() will return false afterwards indicating, that the component no longer depends on the parent.
To restore this parent <-> child dependency the user can call the function OBJ_RestoreDefault() for the object in question. Afterwards settings applied to the parent component will also be visible in the child component again.
When a new setting has been created successfully it can be accessed anywhere in the program by calling the function DMR_FindList().
[in] | hDrv | A handle to the device drivers interface. |
[in] | pName | The name of the new setting to create. |
[in] | pParentName | The name of the setting to derive the new setting from. |
[out] | pHList | A pointer to the HLIST variable to receive the new list on a successful function call. This my be 0 if the caller is not interested in this value. |
TDMR_ERROR DMR_CALL DMR_CreateUserDataEntry | ( | HDEV | hDev, |
HLIST * | pEntry ) |
Creates and returns a new entry to store user specific data.
[in] | hDev | A handle to the device. |
[out] | pEntry | A pointer to the variable receiving the handle to the new user data entry on a successful call. |
TDMR_ERROR DMR_CALL DMR_DeleteList | ( | HDRV | hDrv, |
const char * | pName, | ||
TDMR_ListType | type ) |
Deletes a list previously created by the user.
This function deletes a list previously created by the user due to a call to DMR_CreateSetting() or DMR_CreateRequestControl().
[in] | hDrv | A handle to the device drivers interface. |
[in] | pName | A pointer to the name of the list to delete. |
[in] | type | The type of list to be deleted. |
TDMR_ERROR DMR_CALL DMR_DeleteSetting | ( | const char * | pName, |
TStorageLocation | location, | ||
TScope | scope ) |
Tries to delete a certain setting.
[in] | pName | The name of the setting to look for. |
[in] | location | The storage location where to look for this setting. |
[in] | scope | Specifies where to look for the setting when storageLocation is set to slNative or slNative_Raw under Windows© as then the Registry will be used. |
TDMR_ERROR DMR_CALL DMR_DeleteUserDataEntry | ( | HDEV | hDev, |
HLIST | hEntry ) |
Deletes an entry of user specific data.
If the entry has been stored to the non-volatile memory already and has been assigned the udarPassword flag, this call will fail, when the property password belonging to that entry does not contain the correct password.
[in] | hDev | A handle to the device. |
[in] | hEntry | The handle to the user data entry that shall be deleted. |
const char *DMR_CALL DMR_ErrorCodeToString | ( | int | errorCode | ) |
Returns a string representation of a given error code.
This function returns a string representation for the error code passed to the function.
errorCode | The error code whose string representation shall be returned. This can either be a TDMR_ERROR or a TPROPHANDLING_ERROR error code value. |
TDMR_ERROR DMR_CALL DMR_ExportCameraDescription | ( | HDRV | hDrv, |
HLIST | hCameraDescList ) |
Stores the current camera description on disc(deprecated).
This function can be used to store the current settings of a camera description permanently so that the next time the driver is initialised these settings are restored.
[in] | hDrv | A handle to the device drivers interface. |
[in] | hCameraDescList | A handle to the camera description list returned from a previous call to DMR_FindList() and one or more of the iterator functions OBJ_GetFirstSibling(), OBJ_GetNextSibling() and OBJ_GetFirstChild(). |
TDMR_ERROR DMR_CALL DMR_FindList | ( | HDRV | hDrv, |
const char * | pName, | ||
TDMR_ListType | type, | ||
unsigned int | flags, | ||
HLIST * | pHList ) |
Locates a specified list within the device drivers interface.
This function tries to locate a certain list of device properties within the device driver interface.
Once a list has been located successfully the properties contained in that list can be accessed via the function OBJ_GetHandle().
EXAMPLE:
Apart from that this function can also be used to locate lists previously created by the user. This e.g. might be a new setting. In that case pName should contain the name of the previously created setting.
EXAMPLE:
For hardware real-time controller (HRTC) lists the parameter flags can be used to specify which HRTCs list to locate.
The following code will locate every HRTC for a certain device:
[in] | hDrv | A handle to the device drivers interface. When looking for dmltDeviceDriverLib this parameter is ignored. |
[in] | pName | A pointer to a string containing the exact name of the list to be found if there is more than one of the same type/name. Otherwise pName can be NULL. |
[in] | type | The type of list to look for. |
[in] | flags | Flags to define how to search for certain list types |
[in] | pHList | A pointer to the HLIST variable to receive the located list on a successful function call. |
TDMR_ERROR DMR_CALL DMR_GetDevice | ( | HDEV * | pHDev, |
TDMR_DeviceSearchMode | searchMode, | ||
const char * | pSearchString, | ||
unsigned int | devNr, | ||
char | wildcard ) |
Tries to locate a certain device in the system which matches the input criteria.
This function can be used to locate devices, which obey to criteria passed to the function.
EXAMPLES:
Consider three devices of sample device as installed in the current system. Their serial number may be 'SD00000001',
'SD00000002' and 'SD00000003', two devices are for grey video sources (product string 'SampleDevice-G),
one for color source (product string 'SampleDevice-C'). Each device has been assigned a unique ID,
which is stored in the devices internal memory.
Serial | Product string | device ID | Family string |
SD00000001 | SampleDevice-G | 3 | SampleDevice |
SD00000002 | SampleDevice-C | 66 | SampleDevice |
SD00000003 | SampleDevice-G | 2 | SampleDevice |
[out] | pHDev | A pointer to a variable that receives the handle to the located device on a successful call |
[in] | searchMode | Defines how to search for the device |
[in] | pSearchString | A pointer to a string containing information about the device to search |
[in] | devNr | Either the number of the device to return or the unique device ID stored in the device specific memory. If dmdsmUseDevID is specified, this parameter will be interpreted as the latter one. |
[in] | wildcard | A wild-card character which can be used to mark certain parts of pSearchString as 'to be ignored'. |
TDMR_ERROR DMR_CALL DMR_GetDeviceCount | ( | unsigned int * | pDevCnt | ) |
Receives the number of devices recognized by this interface.
This function returns the number of devices currently recognized by this interface and detected in the current system.
[out] | pDevCnt | A pointer to a variable that receives the number of recognized devices. |
TDMR_ERROR DMR_CALL DMR_GetDeviceInfo | ( | unsigned int | devNr, |
TDMR_DeviceInfo * | pInfo, | ||
size_t | infoSize ) |
Obtains information about a certain device(deprecated).
This function will fill the members of the structure TDMR_DeviceInfo with information about the device.
[in] | devNr | The number of the device from which to receive the information. |
[out] | pInfo | A pointer to a structure receiving the information on a successful call. |
[in] | infoSize | The size of the structure pointed to by pInfo receiving the information. |
TDMR_ERROR DMR_CALL DMR_GetDeviceInfoEx | ( | HDEV | hDev, |
TDMR_DeviceInfoType | infoType, | ||
void * | pInfo, | ||
size_t * | pInfoSize ) |
Obtains information about a certain device.
This function will return various device specific information.
[in] | hDev | A handle to the device. |
[in] | infoType | The information that shall be queried. |
[out] | pInfo | A pointer to a buffer receiving the information on a successful call. This can be NULL in order to query the size of this buffer only but since each infoType has a dedicated data type documented as part of it's description this usually should not be necessary. |
[in,out] | pInfoSize | The size of the buffer pointed to by pInfo . This variable will receive the needed buffer size needed for pInfo , if pInfo is 0 allowing to call this function twice: Once to query the needed buffer size for the requested information and then a second time after allocating a sufficient amount of memory for pInfo . |
TDMR_ERROR DMR_CALL DMR_GetDeviceWithStringID | ( | HDEV * | pHDev, |
TDMR_DeviceSearchMode | searchMode, | ||
const char * | pSearchString, | ||
const char * | pStringID, | ||
char | wildcard ) |
Tries to locate a certain device in the system which matches a certain string ID.
This function can be used to locate devices with a certain string identifier that has previously been written into a devices non-volatile memory. E.g. GenICam devices may support the DeviceUserID
feature to assign a certain user defined name. A user defined name might be useful e.g. to access a device with a certain function without the need to worry about which device is it. You could e.g. have a barcodeReadingDevice
and a monitorCamera
. This functions is similar to the DMR_GetDevice() function in every way, except that the DeviceID
parameter is a const char*
instead of an unsigned int
.
The following line of code will try to locate a device who's product string starts with mvBlueCOUGAR-X
, might contain additional characters afterwards and has a user assigned string identifier of exactly Camera1
.
[out] | pHDev | A pointer to a variable that receives the handle to the located device on a successful call |
[in] | searchMode | Defines how to search for the device. dmdsmUseDevID MUST be specified, otherwise DMR_INVALID_PARAMETER will be returned. |
[in] | pSearchString | A pointer to a string containing information about the device to search |
[in] | pStringID | A pointer to a string containing the string ID of the device to return. |
[in] | wildcard | A wild-card character which can be used to mark certain parts of pSearchString as 'to be ignored'. |
TDMR_ERROR DMR_CALL DMR_GetDriverHandle | ( | HDEV | hDev, |
HDRV * | pHDrv ) |
Obtains the driver interface handle to a initialised device.
The function can be used to check if a certain device is currently open in the current process or not. If the device has already been opened in the current process, the function will obtain a valid handle to the devices driver interface.
[in] | hDev | A handle to the device. |
[out] | pHDrv | A pointer to a variable that receives the handle to the devices driver interface if the device is currently open. If the device handle hDev is valid, but the device is currently not in use, this variable will be set to INVALID_ID. |
TDMR_ERROR DMR_CALL DMR_GetImageRequestBuffer | ( | HDRV | hDrv, |
int | requestNr, | ||
ImageBuffer ** | ppBuffer ) |
Returns the ImageBuffer of the desired request.
This function returns the current image describing structure for the desired request. Always call this function to receive the correct data for the desired request and do not work with references to old structures, as the structure returned will be a copy of the structure currently describing the image buffer and NOT the address to the internal driver structure.
EXAMPLES:
version passing '0' to the first call of DMR_GetImageRequestBuffer
version calling DMR_AllocImageRequestBufferDesc() before:
[in] | hDrv | A handle to the device drivers interface. |
[in] | requestNr | The number of the request from which to read the information. This parameter is typically obtained by a call to DMR_ImageRequestWaitFor(). |
[out] | ppBuffer | A pointer to a pointer retrieving the data of the desired requests image buffer or a pointer to NULL if a new ImageBuffer structure shall be allocated. The memory should be allocated by the function DMR_AllocImageRequestBufferDesc() and NOT as a stack variable as this otherwise might result in memory leaks. |
TDMR_ERROR DMR_CALL DMR_GetImageRequestBufferChannelData | ( | HDRV | hDrv, |
int | requestNr, | ||
int | channelNr, | ||
int * | pChannelOffset, | ||
int * | pLinePitch, | ||
int * | pPixelPitch, | ||
char * | pChannelDesc, | ||
size_t | channelDescSize ) |
Returns information about the channel specific data of the image associated with the desired request.
The function checks each pointer passed to it and only fills out the parameters with valid pointers, so if one or more values are not required you can pass '0' instead.
Always call this function to receive the up to date data for the current request and do NOT use this data for any other request!
[in] | hDrv | A handle to the device drivers interface. |
[in] | requestNr | The number of the request from which to read the information. This parameter is typically obtained by a call to DMR_ImageRequestWaitFor(). |
[in] | channelNr | The number of the channel of the requests image buffer from which to read the parameters. |
[out] | pChannelOffset | A pointer to the variable receiving offset in bytes of this channel with respect to ppData returned by DMR_GetImageRequestBufferData(). This can be 0 if the value is not needed. |
[out] | pLinePitch | A pointer to the variable receiving line pitch of this channel. This can be 0 if the value is not needed. |
[out] | pPixelPitch | A pointer to the variable receiving pixel pitch of this channel. This can be 0 if the value is not needed. |
[out] | pChannelDesc | A pointer to a user supplied string buffer receiving the channel specific descriptor of this channel./ This can be 0 if the value is not needed. |
[in] | channelDescSize | The size in bytes of the user supplied string buffer for the channel descriptor. |
TDMR_ERROR DMR_CALL DMR_GetImageRequestBufferData | ( | HDRV | hDrv, |
int | requestNr, | ||
int * | pBytesPerPixel, | ||
int * | pChannelCount, | ||
int * | pHeight, | ||
int * | pWidth, | ||
int * | pSize, | ||
TImageBufferPixelFormat * | pPixelFormat, | ||
void ** | ppData ) |
Returns information about the image associated with the desired request.
The function checks each pointer passed to it and only fills out the parameters with valid pointers, so if one or more values are not required you can pass '0' instead.
Always call this function to receive the up to date data for the current request and do NOT use this data for any other request!
[in] | hDrv | A handle to the device drivers interface. |
[in] | requestNr | The number of the request from which to read the information. This parameter is typically obtained by a call to DMR_ImageRequestWaitFor(). |
[out] | pBytesPerPixel | A pointer to the variable receiving the bytes per pixel for this image buffer. This can be 0 if the value is not needed. |
[out] | pChannelCount | A pointer to the variable receiving number of channels for this image buffer. This can be 0 if the value is not needed. |
[out] | pHeight | A pointer to the variable receiving the height of this image buffer. This can be 0 if the value is not needed. |
[out] | pWidth | A pointer to the variable receiving the width of this image buffer. This can be 0 if the value is not needed. |
[out] | pSize | A pointer to the variable receiving the size of this image buffer in bytes. This can be 0 if the value is not needed. |
[out] | pPixelFormat | A pointer to the variable receiving the pixel format for this image buffer. This can be 0 if the value is not needed. |
[out] | ppData | A pointer to the variable receiving the address of actual image data associated with this image buffer. This can be 0 if the value is not needed. |
TDMR_ERROR DMR_CALL DMR_GetImageRequestBufferImageData | ( | HDRV | hDrv, |
int | requestNr, | ||
int | xOff, | ||
int | yOff, | ||
int | width, | ||
int | height, | ||
char * | pBuf, | ||
size_t | bufSize ) |
Returns an AOI of raw image data belonging to the specified request.
[in] | hDrv | A handle to the device drivers interface. |
[in] | requestNr | The number of the request from which to read the information. This parameter is typically obtained by a call to DMR_ImageRequestWaitFor(). |
[in] | xOff | The x offset from where to start to copy the data. |
[in] | yOff | The y offset from where to start to copy the data. |
[in] | width | The width of the AOI to copy. |
[in] | height | The height of the AOI to copy. |
[out] | pBuf | A pointer to the variable receiving the pixel values. |
[in] | bufSize | The size of the user supplied buffer. |
MVDMR_API TDMR_ERROR DMR_CALL DMR_GetImageRequestInfo | ( | HDRV | hDrv, |
int | requestNr, | ||
RequestInfo * | pInfo ) |
Retrieves the RequestInfo of the desired request(deprecated).
[in] | hDrv | A handle to the device drivers interface. |
[in] | requestNr | The number of the request from which to read the information. This parameter is typically obtained by a call to DMR_ImageRequestWaitFor(). |
[out] | pInfo | A pointer to a RequestInfo structure to retrieve the result on a successful call to this function. |
TDMR_ERROR DMR_CALL DMR_GetImageRequestInfoEx | ( | HDRV | hDrv, |
int | requestNr, | ||
RequestInfo * | pInfo, | ||
size_t | infoSize, | ||
int | reserved, | ||
int | reserved2 ) |
Retrieves the RequestInfo of the desired request.
[in] | hDrv | A handle to the device drivers interface. |
[in] | requestNr | The number of the request from which to read the information. This parameter is typically obtained by a call to DMR_ImageRequestWaitFor(). |
[out] | pInfo | A pointer to a RequestInfo structure to retrieve the result on a successful call to this function. |
[in] | infoSize | The size of the structure pointed to by pInfo in bytes. |
[in] | reserved | Currently unsupported. MUST be set 0. |
[in] | reserved2 | Currently unsupported. MUST be set 0. |
TDMR_ERROR DMR_CALL DMR_GetImageRequestParamS | ( | HDRV | hDrv, |
int | requestNr, | ||
TImageRequestParam | param, | ||
char * | pBuf, | ||
size_t | bufSize ) |
Retrieves a string representation of a request related parameter.
When certain parameters shall be displayed in a GUI or a console window this function might come in handy. As things like 'pixel format: 3' doesn't have too much explanatory power this function provides a string representation for certain parameters belonging to a request.
[in] | hDrv | A handle to the device drivers interface. |
[in] | requestNr | The number of the request from which to read the information. This parameter is typically obtained by a call to DMR_ImageRequestWaitFor(). |
[in] | param | The parameter whose string representation shall be queried. |
[out] | pBuf | A pointer to a user supplied string buffer. |
[in] | bufSize | The size of the user supplied string buffer in bytes. |
MVDMR_API TDMR_ERROR DMR_CALL DMR_GetImageRequestResult | ( | HDRV | hDrv, |
int | requestNr, | ||
RequestResult * | pResult ) |
Retrieves the RequestResult of the desired request(deprecated).
[in] | hDrv | A handle to the device drivers interface. |
[in] | requestNr | The number of the request from which to read the information. This parameter is typically obtained by a call to DMR_ImageRequestWaitFor(). |
[out] | pResult | A pointer to a RequestResult structure to retrieve the result on a successful call to this function. |
TDMR_ERROR DMR_CALL DMR_GetImageRequestResultEx | ( | HDRV | hDrv, |
int | requestNr, | ||
RequestResult * | pResult, | ||
size_t | resultSize, | ||
int | reserved, | ||
int | reserved2 ) |
Retrieves the RequestResult of the desired request.
[in] | hDrv | A handle to the device drivers interface. |
[in] | requestNr | The number of the request from which to read the information. This parameter is typically obtained by a call to DMR_ImageRequestWaitFor(). |
[out] | pResult | A pointer to a RequestResult structure to retrieve the result on a successful call to this function. |
[in] | resultSize | The size of the structure pointed to by pResult in bytes. |
[in] | reserved | Currently unsupported. MUST be set 0. |
[in] | reserved2 | Currently unsupported. MUST be set 0. |
MVDMR_API TDMR_ERROR DMR_CALL DMR_GetImpactRequestBuffer | ( | HDRV | hDrv, |
int | requestNr, | ||
IPL_BUFHANDLE * | pBuffer ) |
Returns the IPL_BUFHANDLE of the desired request(deprecated).
This function returns the current image as an IPL_BUFHANDLE for the desired request. Always call this function to receive the correct data for the desired request and do not work with references to old structures, as the structure returned will be a copy of the structure currently describing the image buffer and NOT the address to the internal driver structure.
[in] | hDrv | A handle to the device drivers interface. |
[in] | requestNr | The number of the request from which to read the information. This parameter is typically obtained by a call to DMR_ImageRequestWaitFor(). |
[out] | pBuffer | A pointer to a variable retrieving the data of the desired requests image buffer. The handle might be set to IPL_DONT_CARE if a new buffer shall be allocated. |
TDMR_ERROR DMR_CALL DMR_GetImpactRequestBufferEx | ( | HDRV | hDrv, |
int | requestNr, | ||
IPL_BUFHANDLE * | pBuffer, | ||
TImpactBufferFlag | flags, | ||
unsigned int | reserved ) |
Returns the IPL_BUFHANDLE of the desired request.
This function returns the current image as an IPL_BUFHANDLE for the desired request. Always call this function to receive the correct data for the desired request and do not work with references to old structures, as the structure returned will be a copy of the structure currently describing the image buffer and NOT the address to the internal driver structure.
[in] | hDrv | A handle to the device drivers interface. |
[in] | requestNr | The number of the request from which to read the information. This parameter is typically obtained by a call to DMR_ImageRequestWaitFor(). |
[out] | pBuffer | A pointer to a variable retrieving the data of the desired requests image buffer. The handle might be set to IPL_DONT_CARE if a new buffer shall be allocated. |
[in] | flags | Flags to define the behaviour of this function. |
[in] | reserved | Reserved for later enhancement. |
TDMR_ERROR DMR_CALL DMR_GetLastError | ( | TDMR_ERROR * | pErrorCode, |
char * | pErrorText, | ||
size_t * | pErrorTextSize ) |
Returns the last error code and string that did occur within the current thread.
This function returns the last error code and string that did occur within the current thread.
[out] | pErrorCode | A pointer to a variable that receives the last error code that has been set within the current thread. This parameter must not be NULL! |
[out] | pErrorText | A pointer to a user allocated buffer that receives the last error string that has been set within the current thread. Pass NULL to query the size needed in pErrorTextSize . |
[in,out] | pErrorTextSize | A pointer to a variable containing the size of the user allocated buffer pointed to by pErrorText if pErrorText is not NULL. pErrorText is NULL the needed size for pErrorText will be returned. This parameter must not be NULL! |
const char *DMR_CALL DMR_GetVersion | ( | TLibraryQuery | libraryQuery | ) |
Returns a string containing the version number of the specified library.
This function returns a string containing the version number of the specified library.
The format of the string will be MAJOR.MINOR.RELEASE.BUILD.
[in] | libraryQuery | The type of library to query information from. |
TDMR_ERROR DMR_CALL DMR_ImageRequestConfigure | ( | HDRV | hDrv, |
int | requestNr, | ||
int | reserved, | ||
void * | pReserved ) |
Sets a request into configuration mode.
In configuration mode certain properties of a request object can be modified. Only requests that are currently not used by the driver and are not locked because they contain image data that hasn't been processed can be set into configuration mode.
[in] | hDrv | A handle to the device drivers interface. |
[in] | requestNr | The number of the image request to use for this call. |
[in] | reserved | Currently unsupported. MUST be set 0. |
[in] | pReserved | Currently unsupported. MUST be set 0. |
TDMR_ERROR DMR_CALL DMR_ImageRequestReset | ( | HDRV | hDrv, |
int | requestCtrl, | ||
int | mode ) |
Deletes all requests currently queued for the specified request control.
This function will terminate all running image acquisitions associated with the queue bound to the specified image request control and in addition to that will empty the queue of pending image requests for that queue. Also all requests that reside in the result queue and have not been picked up by the application will be unlocked and removed from the result queue. So after this function returns only the requests currently in possession of the application (so requests that have been picked up by successful calls to DMR_ImageRequestWaitFor() that have NOT been unlocked) need to be handled. All other requests are in a state where they can be queued for an acquisition again.
It does NOT unlock requests currently locked by the user!
[in] | hDrv | A handle to the device drivers interface. |
[in] | requestCtrl | The number of the image request control to use for this call. |
[in] | mode | Currently unsupported. MUST be set 0. |
TDMR_ERROR DMR_CALL DMR_ImageRequestResultQueueElementCount | ( | HDRV | hDrv, |
int | queueNr, | ||
int * | pResultQueueElements ) |
Returns the number of Request objects in the result queue.
This functions queries the number of Request objects currently in the result queue that are available for pickup. This number reflects the number of DMR_imageRequestWaitFor() calls that could be executed afterwards the would return with a valid Request object immediately without waiting!
[in] | hDrv | A handle to the device drivers interface. |
[in] | queueNr | The queue to be queried. |
[out] | pResultQueueElements | A pointer to a variable which receives the number of request objects in the result queue |
TDMR_ERROR DMR_CALL DMR_ImageRequestSave | ( | HDRV | hDrv, |
int | requestNr, | ||
const char * | pFileName, | ||
TImageFileFormat | format ) |
Stores the image data described by a request into a file.
This function stores the image described by a request into a file.
[in] | hDrv | A handle to the device drivers interface. |
[in] | requestNr | The number of the request which shall be saved. This parameter is typically obtained by a call to DMR_ImageRequestWaitFor(). |
[in] | pFileName | The full path of the file to create. |
[in] | format | The format of the file to be created. If this parameter is set to iffAuto make sure to specify a proper file extension. |
TDMR_ERROR DMR_CALL DMR_ImageRequestSaveToVideoStream | ( | HDRV | hDrv, |
int | requestNr, | ||
HDMR_VIDEO_STREAM | hVideoStream ) |
Stores the image data described by a request into a video stream.
This function stores the image described by a request into a video stream.
[in] | hDrv | A handle to the device drivers interface. |
[in] | requestNr | The number of the request which shall be stored into the video stream. This parameter is typically obtained by a call to DMR_ImageRequestWaitFor(). |
[in] | hVideoStream | The handle for the stream as obtained from a previous call to DMR_OpenVideoStream(). |
TDMR_ERROR DMR_CALL DMR_ImageRequestSingle | ( | HDRV | hDrv, |
int | requestCtrl, | ||
int * | pRequestUsed ) |
Sends an image request to the device driver.
This functions sends a single image request to the device driver. To wait for the image to become ready call the function DMR_ImageRequestWaitFor().
[in] | hDrv | A handle to the device drivers interface. |
[in] | requestCtrl | The number of the request control to use for this request |
[out] | pRequestUsed | A pointer to a variable that will receive the number of the request used. This can be NULL if the value is not needed. |
TDMR_ERROR DMR_CALL DMR_ImageRequestUnlock | ( | HDRV | hDrv, |
int | requestNr ) |
Unlocks the request for the driver again.
To ensure that no image data is overwritten by another image request while the user still deals with the image from a previous acquisition each image buffer will be locked by the driver when it is returned to the user by a call to DMR_ImageRequestWaitFor(). No new image will be captured into the same buffer until the user unlocks the buffer again by calling DMR_ImageRequestUnlock().
After unlocking a request it is no longer guaranteed that the memory once referenced by the request and the image buffer belonging to it stays valid, so do NEVER try to access memory belonging to an unlocked request object. If you need to copy the image buffer or modify it in any other way, do everything you have to do BEFORE calling this function! Besides the actual image buffer (the information about the image and the image data itself) a request object consists of certain other data like e.g. the result, a time stamp etc. that can be queried using the various functions provided for this purpose. Among others these are:
DMR_GetImageRequestBufferData(),
DMR_GetImageRequestInfoEx(),
DMR_GetImageRequestParamS(),
DMR_GetImageRequestResultEx(),
DMR_GetImpactRequestBufferEx()
None of these functions should be called AFTER DMR_ImageRequestUnlock() has been called, as the result can either be an access to invalid memory or data that is no longer correct.
[in] | hDrv | A handle to the device drivers interface. |
[in] | requestNr | The number of the request to unlock as received from a previous call to DMR_ImageRequestWaitFor() |
TDMR_ERROR DMR_CALL DMR_ImageRequestWaitFor | ( | HDRV | hDrv, |
int | timeout_ms, | ||
int | queueNr, | ||
int * | pRequestNr ) |
Waits for a request object to become ready.
This function waits for a request object previously sent to the capture device by calling DMR_ImageRequestSingle(). When a new request became ready during the period of time specified by the timeout_ms parameter this request is extracted from the result queue and is returned to the user so the same request can not be returned twice until it has been processed and unlocked by the application.
[in] | hDrv | A handle to the device drivers interface. |
[in] | timeout_ms | The maximum wait time in milliseconds(ms) for this request to become ready. If timeout_ms is '-1', the function's timeout interval never elapses. If the result queue specified by the queueNr parameter already contains a request when calling this function the function will return immediately. Please note that each request has its own timeout that is independent from this wait timeout, thus this function will return with a valid request after the timeout for this request has elapsed even if e.g. a trigger has not been detected. For detailed information on the interaction of the timeout of this function and the timeout of a request please refer to the chapter Acquiring Data in the C section. |
[in] | queueNr | The queue where to wait for the request. The number of request queues available depends on the number of video channels offered by the device. The queue a processed request ends up in can be defined by setting the property resultQueue of the used image request control BEFORE calling DMR_ImageRequestSingle(). |
[out] | pRequestNr | A pointer to a variable which receives the number of the request which contains the captured image on a successful call. This number can e.g. be passed to the function DMR_GetImageRequestBuffer() |
TDMR_ERROR DMR_CALL DMR_ImportCameraDescription | ( | HDRV | hDrv, |
HLIST | hCameraDescList ) |
Updates a camera description with the data stored in a previous session or with the original default data(deprecated).
To restore the default values valid during the driver was initialised the function OBJ_RestoreDefault() with hCameraDescList as parameter can be used as well.
[in] | hDrv | A handle to the device drivers interface. |
[in] | hCameraDescList | A handle to the camera description list returned from a previous call to DMR_FindList() and one or more of the iterator functions OBJ_GetFirstSibling(), OBJ_GetNextSibling() and OBJ_GetFirstChild(). |
TDMR_ERROR DMR_CALL DMR_Init | ( | HDMR * | pDevices | ) |
Initialises the library.
This group contains functions for accessing device and memory (especially image specific/captured data) functionality. This function initialises internal data structures and locates devices and device drivers in the system.
Before any device can be accessed the user MUST successfully call this function. DMR_Init( HDMR* pHDmr ) can be called multiple times, but for each call to this function a call to DMR_Close() must be executed before unloading the library from process memory again.
If this function is called multiple times in the same process without calling DMR_Close() in between no additional work is performed by the function, but an internal usage counter is incremented.
When calling this function for the first time ever or for the first time after shutting down the library again with an appropriate number of calls to DMR_Close() this will result in all supported driver stacks to be loaded dynamically. See remarks below for consequences that result from this.
DllMain
context (Windows) of a dynamic library(*.dll, *.so, *.ocx, ...) as this will result in other shared libraries to be loaded dynamically by the framework and loading other libraries from within DllMain
is discouraged (see DllMain
Best
Practices
in MSDN for example). Violating this may cause lock ups in applications using your library. Instead define custom library init/close for this functions or use any other approach that suits your needs.pDevices | A pointer to variable that receives the handle to the initialised device manager on a successful call to the function. |
TDMR_ERROR DMR_CALL DMR_InitVideoStreamAPI | ( | void * | pReserved, |
size_t | reserved ) |
Initialises the video stream API.
Calling this function will initialise the video stream API.
Because of what is stated in the above section Impact Acquire is NOT shipped with the FFmpeg binaries required to use this class!
On Windows the FFmpeg-share package matching the platform the application shall run with (32- or 64-bit) is needed. This can either be extracted into the installation folder of Impact Acquire e.g. into Toolkits/ffmpeg-4.2.2-win64-shared or Toolkits/ffmpeg-4.2.2-win32-shared (Works only for this versions) OR at the location pointed to by MVIMPACT_ACQUIRE_FFMPEG_DIR (see below) OR anywhere into the systems search path.
On Linux the package ffmpeg must be installed and if e.g. H.264 support is needed the libavcodec-extra package as well.
[in] | pReserved | Currently unsupported. MUST be set 0. |
[in] | reserved | Currently unsupported. MUST be set 0. |
TDMR_ERROR DMR_CALL DMR_IsSettingAvailable | ( | const char * | pName, |
TStorageLocation | storageLocation, | ||
TScope | scope ) |
Checks if a certain setting is available.
[in] | pName | The name of the setting to look for. |
[in] | storageLocation | The storage location where to look for this setting. |
[in] | scope | Specifies where to look for the setting when storageLocation is set to slNative or slNative_Raw under Windows© as then the Registry will be used. |
TDMR_ERROR DMR_CALL DMR_IsVideoStreamPaused | ( | HDMR_VIDEO_STREAM | hVideoStream | ) |
Checks is this video stream currently is paused.
[in] | hVideoStream | The handle for the stream as obtained from a previous call to DMR_OpenVideoStream(). |
TDMR_ERROR DMR_CALL DMR_LoadImageBuffer | ( | ImageBuffer ** | ppBuffer, |
const char * | pFileName, | ||
TImageFileFormat | format ) |
Loads an image from a file into a newly allocated image buffer structure.
If ppBuffer points to a structure previously allocated by any other function, this memory will be lost(memory leak). In that case DMR_ReleaseImageRequestBufferDesc() (if the structure has been allocated with DMR_AllocImageRequestBufferDesc() or DMR_GetImageRequestBuffer()) or DMR_ReleaseImageBuffer()(if the structure has been allocated with DMR_AllocImageBuffer()) should be called before.
This function will allocate memory for the pixel data pointed to by ImageBuffer::vpData and also will fill the structure with channel specific data depending on the format of the pixel data detected in the file specified by pFileName
.
This function will call DMR_AllocImageRequestBuffer(), so everything described in that functions description will be valid for this call as well.
[out] | ppBuffer | A pointer to a pointer receiving the address of the newly allocated structure on a successful call to this function. |
[in] | pFileName | The full path of the file to create. |
[in] | format | The format of the file to be created. If this parameter is set to iffAuto make sure to specify a proper file extension. |
TDMR_ERROR DMR_CALL DMR_LoadRTCtrProgram | ( | HDRV | hDrv, |
HLIST | hRTCtrList ) |
Loads a program from a file into a hardware real-time controller (HRTC)
This function loads a program from a file into the HRTC associated with the parameter hRTCtrList. The name and full path for the file to be loaded is stored in the string property 'FileName' in the list bound to hRTCtrList. It can be modified by the user. The parameter hRTCtrList can be obtained by a previous call to DMR_FindList() where the type has been set to dmltRTCtr. In this case the parameter flags can be used as an index to the HRTC in question.
[in] | hDrv | A handle to the device drivers interface. |
[in] | hRTCtrList | A handle to the HRTC as returned from a previous call to DMR_FindList(). |
TDMR_ERROR DMR_CALL DMR_LoadSetting | ( | HDRV | hDrv, |
const char * | pName, | ||
TStorageFlag | storageFlags, | ||
TScope | scope ) |
Loads a previously stored setting.
This function can be used to restore a previously stored setting again.
To load a setting from a file the sfFile should be specified as part of storageFlags. To load a setting from a platform specific location such as the Registry under Windows© sfNative should be specified. It's not allowed to combine sfFile and sfNative for this operation.
Impact Acquire Version | Loading a XML settings file created with Impact Acquire version < 2.9.0 | Loading a XML settings file created with Impact Acquire version 2.9.0 - 2.10.1 | Loading a XML settings file created with Impact Acquire version 2.11.0 or later |
---|---|---|---|
< 2.9.0 | YES | NO | NO |
2.9.0 - 2.10.1 | YES | YES | NO |
>= 2.11.0 | YES | YES | YES |
Product
inside the device list (the one device specific property list that is accessible without initialising the device before). Even if a setting can be used with various firmware versions it is recommended to use one setting for multiple devices all updated to the very same firmware version to avoid compatibility problems.[in] | hDrv | A handle to the device drivers interface. |
[in] | pName | The name or the full path under where the setting is located |
[in] | storageFlags | The flags which define which information shall be read from the location and how this information shall be interpreted. |
[in] | scope | Specifies where the information is located. |
TDMR_ERROR DMR_CALL DMR_LoadSettingFromDefault | ( | HDRV | hDrv, |
TScope | scope ) |
Loads the default settings.
This function will try to load the settings from a default location. This function can only succeed if a setting has been stored previously by a call to DMR_SaveSettingToDefault().
[in] | hDrv | A handle to the device drivers interface. |
[in] | scope | Specifies where the information is located. |
TDMR_ERROR DMR_CALL DMR_OpenDevice | ( | HDEV | hDev, |
HDRV * | pHDrv ) |
Initialises a device.
This function will try to initialise the device associated with hDev. On a successful call to this function pHDrv will contain a handle to the device's driver interface. This handle then can be used to call various driver functions or access and use device specific properties and objects.
Whenever a device is opened, the driver will execute the following procedure:
Please have a look at the tool ImpactControlCenter for more information about automatic loading of settings when a device is opened.
[in] | hDev | The valid handle to a device. |
[out] | pHDrv | A pointer to a variable that receives the handle to the successfully initialised devices interface. |
TDMR_ERROR DMR_CALL DMR_OpenVideoStream | ( | const char * | pFileName, |
const unsigned int | imageWidth, | ||
const unsigned int | imageHeight, | ||
const TVideoCodec | codec, | ||
const unsigned int | quality_pc, | ||
const unsigned int | bitrate, | ||
HDMR_VIDEO_STREAM * | pHVideoStream ) |
Creates a new video stream.
Calling this function will create a new video stream. After successful creation functions like DMR_SaveImageBufferToVideoStream() or DMR_ImageRequestSaveToVideoStream() can be called to store images into this stream. Once the stream is no longer needed an application should call DMR_CloseVideoStream() to free all resources again. Not doing so will block these resources until the mvDeviceManager library is unloaded from the process memory.
PixelFormat
property of the Image Format Conversion Filter.[in] | pFileName | The full path or file name for the video stream to create. |
[in] | imageWidth | The inpout image width in pixels. |
[in] | imageHeight | The input image height in pixels. |
[in] | codec | The video codec to use for the stream to create. |
[in] | quality_pc | The quality of the resulting video stream in percent. The higher this value the larger the file will get. This value is only taken into account for the following codecs: vcH264. vcH265 |
[in] | bitrate | The bitrate of the resulting MPEG video stream in kBit/s. This value is only taken into account for the following codecs: vcMPEG2. |
[out] | pHVideoStream | On a successful call this variable will contain a new handle to a video stream after the function did return. |
TDMR_ERROR DMR_CALL DMR_PauseVideoStream | ( | HDMR_VIDEO_STREAM | hVideoStream | ) |
Pauses a video stream.
This function pauses a video stream. While paused no images can be written into the stream. Pausing internally simply starts a timer and all accumulated pause times will be subtracted from images that will be written into the stream after the pause has been ended effectively allowing to remove inactive sections from the video stream.
[in] | hVideoStream | The handle for the stream as obtained from a previous call to DMR_OpenVideoStream(). |
TDMR_ERROR DMR_CALL DMR_ReleaseImageBuffer | ( | ImageBuffer ** | ppBuffer | ) |
frees the memory previously allocated for the specified ImageBuffer structure again.
These functions will require a subsequent call to DMR_ReleaseImageBuffer():
[in,out] | ppBuffer | A pointer to the ImageBuffer structure whose memory shall be freed. On a successful call to this function, the pointer pointing to the actual structure will be reset to 0. |
TDMR_ERROR DMR_CALL DMR_ReleaseImageRequestBufferDesc | ( | ImageBuffer ** | ppBuffer | ) |
frees the memory previously allocated for the specified ImageBuffer structure again.
These functions will require a subsequent call to DMR_ReleaseImageRequestBufferDesc():
DMR_GetImageRequestBuffer() if called with ppBuffer = 0,
DMR_CopyImageRequestBufferDesc() if called with ppDst = 0,
DMR_AllocImageRequestBufferDesc()
In that case the function DMR_ReleaseImageBuffer() must be called in order to avoid memory leaks.
[in,out] | ppBuffer | A pointer to the ImageBuffer structure whose memory shall be freed. On a successful call to this function, the pointer pointing to the actual structure will be reset to NULL. |
TDMR_ERROR DMR_CALL DMR_ResumeVideoStream | ( | HDMR_VIDEO_STREAM | hVideoStream | ) |
Resumes a video stream.
This function resumes a previously paused video stream. While paused no images can be written into the stream. Pausing internally simply starts a timer and all accumulated pause times will be subtracted from images that will be written into the stream after the pause has been ended effectively allowing to remove inactive sections from the video stream.
[in] | hVideoStream | The handle for the stream as obtained from a previous call to DMR_OpenVideoStream(). |
TDMR_ERROR DMR_CALL DMR_SaveImageBuffer | ( | const ImageBuffer * | pBuffer, |
const char * | pFileName, | ||
TImageFileFormat | format ) |
Stores the complete data of one ImageBuffer structure into a file.
This function stores the image described by a ImageBuffer structure pointed to by the pBuffer
variable into a file.
pBuffer
or pFileName refers to a NULL pointer.[in] | pBuffer | A pointer to an ImageBuffer structure to be stored. |
[in] | pFileName | The full path of the file to create. |
[in] | format | The format of the file to be created. If this parameter is set to iffAuto make sure to specify a proper file extension. |
TDMR_ERROR DMR_CALL DMR_SaveImageBufferToVideoStream | ( | HDMR_VIDEO_STREAM | hVideoStream, |
const ImageBuffer * | pBuffer, | ||
const int64_type | timestamp_us ) |
Stores an image into a video stream.
This function stores an image into a video stream.
[in] | hVideoStream | The handle for the stream as obtained from a previous call to DMR_OpenVideoStream(). |
[in] | pBuffer | |
[in] | timestamp_us | The timestamp (in micro-seconds) to associate with this image |
TDMR_ERROR DMR_CALL DMR_SaveRTCtrProgram | ( | HDRV | hDrv, |
HLIST | hRTCtrList ) |
Stores the current program of a hardware real-time controller (HRTC) into a file.
This function stores the current state of the program associated with an HRTC into a file. The name and full path for the file to be written is stored in the string property 'FileName' in the list bound to hRTCtrList. It can be modified by the user. The parameter hRTCtrList can be obtained by a previous call to DMR_FindList() where the type has been set to dmltRTCtr. In this case the parameter flags can be used as an index to the HRTC in question.
[in] | hDrv | A handle to the device drivers interface. |
[in] | hRTCtrList | A handle to the HRTC as returned from a previous call to DMR_FindList(). |
TDMR_ERROR DMR_CALL DMR_SaveSetting | ( | HDRV | hDrv, |
const char * | pName, | ||
TStorageFlag | storageFlags, | ||
TScope | scope ) |
Stores the current settings.
This function can be used to store the current settings either in a XML-file or (under Windows©) into the Registry.
To store a setting in a file the sfFile should be specified as part of storageFlags. To store a setting in a platform specific location such as the Registry under Windows© sfNative should be specified. Both flags can be combined. In that case the same setting will be stored in a file AND in a platform specific location if these location differ (platform dependent!).
[in] | hDrv | A handle to the device drivers interface. |
[in] | pName | The name or the full path under which this setting shall be stored |
[in] | storageFlags | The flags which define which information shall be stored and how this information shall be stored. |
[in] | scope | Specifies where the information shall be stored. |
TDMR_ERROR DMR_CALL DMR_SaveSettingToDefault | ( | HDRV | hDrv, |
TScope | scope ) |
Stores the current settings under a default location.
Under Windows® this will be the Registry.
[in] | hDrv | A handle to the device drivers interface. |
[in] | scope | Currently unsupported. MUST be set sUser. |
TDMR_ERROR DMR_CALL DMR_SetDeviceID | ( | HDEV | hDev, |
int | newID ) |
Assigns a new ID to this device.
To allow any application to distinguish between different devices of the same type the user can assign an unique ID to each device using this function. This ID currently is limited to values between 0 and 250 and is stored in the physical devices EEPROM.
[in] | hDev | A handle to the device. |
[in] | newID | The new ID to be written to the devices internal memory |
TDMR_ERROR DMR_CALL DMR_SetImageRequestBufferImageData | ( | HDRV | hDrv, |
int | requestNr, | ||
int | xOff, | ||
int | yOff, | ||
int | width, | ||
int | height, | ||
char * | pBuf, | ||
size_t | bufSize ) |
Sets an AOI of raw image data belonging to the specified request.
[in] | hDrv | A handle to the device drivers interface. |
[in] | requestNr | The number of the request to apply the parameter set to. This parameter is typically obtained by a call to DMR_ImageRequestWaitFor(). |
[in] | xOff | The x offset from where to start to copy the data. |
[in] | yOff | The y offset from where to start to copy the data. |
[in] | width | The width of the AOI to copy. |
[in] | height | The height of the AOI to copy. |
[in] | pBuf | A pointer to the variable containing the pixel values. |
[in] | bufSize | The size of the user supplied buffer. Currently not used. |
TDMR_ERROR DMR_CALL DMR_UpdateDeviceList | ( | unsigned int | reserved, |
int | reserved2 ) |
Updates the internal device list.
Most devices can't appear out of nowhere. For example a PCI device is either connected to the current system when the device manager is initialised or not but it will never appear at runtime after the DMR_Init() function has been called successfully.
However certain device classes (e.g. network devices) might be connected to the system AFTER the device manager has been initialised. In order not to pollute the network or bus with constant rescan messages the user should call this function instead. This can either be done in reasonable intervals or after it is known that a new device has been connected to the system.
If new devices have been detected a subsequent call to DMR_GetDeviceCount() will result in a higher value when compared to a previous call and the changed counter of the HDMR returned from DMR_Init() will contain a different value as well then (however this could also happen because a certain device related property did change its state).
[in] | reserved | Currently unsupported. MUST be set 0. |
[in] | reserved2 | Currently unsupported. MUST be set 0. |
TDMR_ERROR DMR_CALL DMR_UpdateDigitalInputs | ( | HDRV | hDrv | ) |
Updates the property representation of the digital inputs by checking the physical device's inputs.
The actual value of the digital inputs can be queried by reading the property DigitalInputs in the IOSubSystem property list. However the value stored in this property will only reflect the current state of the digital inputs if the function DMR_UpdateDigitalInputs() has been called since the last change on the digital inputs has occurred.
[in] | hDrv | A handle to the device drivers interface. |
TDMR_ERROR DMR_CALL DMR_UpdateFirmware | ( | HDEV | hDev | ) |
Updates the firmware of the device.
calling this function will cause the driver to download the firmware version compiled into the driver library into the devices internal memory. This ID is NOT volatile. It will remain stored even if the device is unplugged.
DeviceConfigure
(this tool also offers a command-line interface)[in] | hDev | A handle to the device. |
TDMR_ERROR DMR_CALL DMR_WriteUserDataToHardware | ( | HDEV | hDev | ) |
Writes the current set of user data into the devices non-volatile memory.
This function might take a while. Depending on the device architecture and the amount of memory up to some hundred ms. Therefore make sure this function is not called more often then necessary to let your application perform efficiently.
[in] | hDev | A handle to the device. |