Functions
U3V Camera

APIs only supported by U3V cameras. More...

Functions

MV_CAMCTRL_API int __stdcall MV_USB_SetTransferSize (IN void *handle, IN unsigned int nTransferSize)
 Set the packet size of USB3 vision device. More...
 
MV_CAMCTRL_API int __stdcall MV_USB_GetTransferSize (IN void *handle, IN OUT unsigned int *pnTransferSize)
 Get the packet size of USB3 vision device. More...
 
MV_CAMCTRL_API int __stdcall MV_USB_SetTransferWays (IN void *handle, IN unsigned int nTransferWays)
 Set the number of transmission channels for USB3 vision device. More...
 
MV_CAMCTRL_API int __stdcall MV_USB_GetTransferWays (IN void *handle, unsigned int *pnTransferWays)
 Get the number of transmission channels for USB3 vision device. More...
 
MV_CAMCTRL_API int __stdcall MV_USB_RegisterStreamExceptionCallBack (IN void *handle, IN void(__stdcall *cbException)(MV_CC_STREAM_EXCEPTION_TYPE enExceptionType, void *pUser), IN void *pUser)
 Register the callback function for receiving the stream exceptions (only USB3Vision camera is supported, and GenTL device is not supported). More...
 
MV_CAMCTRL_API int __stdcall MV_USB_SetEventNodeNum (IN void *handle, IN unsigned int nEventNodeNum)
 Set the number of event buffer nodes for U3V cameras. More...
 
MV_CAMCTRL_API int __stdcall MV_USB_SetSyncTimeOut (IN void *handle, IN unsigned int nMills)
 Set U3V camera's synchronization timeout period. Range: [1000 , UINT_MAX), default value: 1000, unit: ms. More...
 
MV_CAMCTRL_API int __stdcall MV_USB_GetSyncTimeOut (IN void *handle, IN OUT unsigned int *pnMills)
 Get U3V camera's synchronization timeout period. More...
 

Detailed Description

APIs only supported by U3V cameras.

Function Documentation

◆ MV_USB_SetTransferSize()

MV_CAMCTRL_API int __stdcall MV_USB_SetTransferSize ( IN void *  handle,
IN unsigned int  nTransferSize 
)

Set the packet size of USB3 vision device.

Parameters
handle[IN] Device handle.
nTransferSize[IN] Packet size, unit: byte. The value is larger than or equal to 0x400. For Windows, the maximum value is 0x400000. For Linux, the maximum value is 0x200000. The default value is 1 MB.
Returns
Return MV_OK for success, and return corresponding error code for failure.
Remarks
Increasing the packet size can reduce the CPU usage properly, but for different computer and USB expansion cards, the compatibility are different. If the packet size is too large, the image might not be acquired.

◆ MV_USB_GetTransferSize()

MV_CAMCTRL_API int __stdcall MV_USB_GetTransferSize ( IN void *  handle,
IN OUT unsigned int *  pnTransferSize 
)

Get the packet size of USB3 vision device.

Parameters
handle[IN] Device handle.
pnTransferSize[IN][OUT] Packet size (1 MB by default).
Returns
Return MV_OK for success, and return corresponding error code for failure.

◆ MV_USB_SetTransferWays()

MV_CAMCTRL_API int __stdcall MV_USB_SetTransferWays ( IN void *  handle,
IN unsigned int  nTransferWays 
)

Set the number of transmission channels for USB3 vision device.

Parameters
handle[IN] Device handle.
nTransferWays[IN] The number of transmission channels, range: [1,10]
Returns
Return MV_OK for success, and return corresponding error code for failure.
Remarks
This API can be called to set the number of transmission channels according to the factors of computer performance, output image frame rate, image size, memory usage, and so on. But you should notice that for different computer and USB expansion cards, the compatibility are different.

◆ MV_USB_GetTransferWays()

MV_CAMCTRL_API int __stdcall MV_USB_GetTransferWays ( IN void *  handle,
unsigned int *  pnTransferWays 
)

Get the number of transmission channels for USB3 vision device.

Parameters
handle[IN] Device handle。
pnTransferWays[IN][OUT] Pointer to the number of transmission channels.
Returns
Return MV_OK for success, and return corresponding error code for failure.
Remarks
This API is used to get the current number of U3V asynchronous streaming nodes.
For USB3 vision cameras, the transmission channels quantity are closely related to packet size of pixel format, and the quantity can be calculated based on the max. asynchronous registeration lenghth/packet size of pixel format.
For 2000W cameras, the default number is: MONO8-3, YUV-2, RGB-1, others-8.

◆ MV_USB_RegisterStreamExceptionCallBack()

MV_CAMCTRL_API int __stdcall MV_USB_RegisterStreamExceptionCallBack ( IN void *  handle,
IN   void__stdcall *cbException)(MV_CC_STREAM_EXCEPTION_TYPE enExceptionType, void *pUser,
IN void *  pUser 
)

Register the callback function for receiving the stream exceptions (only USB3Vision camera is supported, and GenTL device is not supported).

Parameters
handle[IN] Device handle.
cbException[IN] Callback function for receiving stream exceptions.
pUser[IN] User data.
Returns
Return MV_OK for success, and return corresponding error code for failure.

◆ MV_USB_SetEventNodeNum()

MV_CAMCTRL_API int __stdcall MV_USB_SetEventNodeNum ( IN void *  handle,
IN unsigned int  nEventNodeNum 
)

Set the number of event buffer nodes for U3V cameras.

Parameters
handle[IN] Device handle.
nEventNodeNum[IN] The number of event cache nodes, range: [1,64].
Returns
Return MV_OK for success, and return corresponding error code for failure.
Remarks
This interface is used to set the current number of U3V event nodes. The default value is 5.

◆ MV_USB_SetSyncTimeOut()

MV_CAMCTRL_API int __stdcall MV_USB_SetSyncTimeOut ( IN void *  handle,
IN unsigned int  nMills 
)

Set U3V camera's synchronization timeout period. Range: [1000 , UINT_MAX), default value: 1000, unit: ms.

Parameters
handle[IN] Device handle.
nMills[IN] Set synchronization timeout period.
Returns
Return MV_OK for success, and return corresponding error code for failure.
Remarks
Increasing the timeout period can help deal with the problem that some cameras' parameter configuration process is very slow (more than 1s).

◆ MV_USB_GetSyncTimeOut()

MV_CAMCTRL_API int __stdcall MV_USB_GetSyncTimeOut ( IN void *  handle,
IN OUT unsigned int *  pnMills 
)

Get U3V camera's synchronization timeout period.

Parameters
handle[IN] Device handle.
pnMills[IN][OUT] Get timeout period, unit: ms.
Returns
Return MV_OK for success, and return corresponding error code for failure.
Remarks
This API is used to get the current U3V timeout period. Default: 1000ms.