fast/3rdparty/hikvision/rgbd_camera/inc/Mv3dRgbdApi.h

489 lines
26 KiB
C
Raw Normal View History

2025-01-20 10:30:01 +08:00
#ifndef _MV3D_RGBD_API_H_
#define _MV3D_RGBD_API_H_
#include "Mv3dRgbdDefine.h"
#ifdef __cplusplus
extern "C" {
#endif
/*************************************************************************
* @~chinese
* @brief SDK版本号
* @param pstVersion [OUT]
* @return MV3D_RGBD_OK
* @~english
* @brief Get SDK Version
* @param pstVersion [OUT] version info
* @return Success, return MV3D_RGBD_OK. Failure, return error code
************************************************************************/
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_GetSDKVersion(MV3D_RGBD_VERSION_INFO* pstVersion);
/************************************************************************
* @~chinese
* @brief SDK运行环境初始化
* @return MV3D_RGBD_OK
* @~english
* @brief SDK run environment initialization
* @return Success, return MV3D_RGBD_OK. Failure, return error code
************************************************************************/
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_Initialize();
/************************************************************************
* @~chinese
* @brief SDK运行环境释放
* @return MV3D_RGBD_OK
* @~english
* @brief SDK run environment release
* @return Success, return MV3D_RGBD_OK. Failure, return error code
************************************************************************/
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_Release();
/************************************************************************
* @~chinese
* @brief
* @param nDeviceType [IN] ,Mv3dRgbdDeviceType,(DeviceType_Ethernet | DeviceType_USB | DeviceType_Ethernet_Vir | DeviceType_USB_Vir)
* @param pDeviceNumber [OUT]
* @return MV3D_RGBD_OK
* @~english
* @brief gets the number of devices in the current environment
* @param nDeviceType [IN] device typerefer to Mv3dRgbdDeviceTypeget all(DeviceType_Ethernet | DeviceType_USB | DeviceType_Ethernet_Vir | DeviceType_USB_Vir)
* @param pDeviceNumber [OUT] device number
* @return Success, return MV3D_RGBD_OK. Failure, return error code
************************************************************************/
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_GetDeviceNumber(uint32_t nDeviceType, uint32_t* pDeviceNumber);
/************************************************************************
* @~chinese
* @brief
* @param nDeviceType [IN] ,Mv3dRgbdDeviceType,(DeviceType_Ethernet | DeviceType_USB | DeviceType_Ethernet_Vir | DeviceType_USB_Vir)
* @param pstDeviceInfos [IN OUT]
* @param nMaxDeviceCount [IN]
* @param pDeviceCount [OUT]
* @return MV3D_RGBD_OK
* @~english
* @brief gets 3D cameras list
* @param nDeviceType [IN] device typerefer to Mv3dRgbdDeviceTypeget all(DeviceType_Ethernet | DeviceType_USB | DeviceType_Ethernet_Vir | DeviceType_USB_Vir)
* @param pstDeviceInfos [IN OUT] devices list
* @param nMaxDeviceCount [IN] max number of device list caches
* @param pDeviceCount [OUT] number of devices in the fill list
* @return Success, return MV3D_RGBD_OK. Failure, return error code
************************************************************************/
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_GetDeviceList(uint32_t nDeviceType, MV3D_RGBD_DEVICE_INFO* pstDeviceInfos, uint32_t nMaxDeviceCount, uint32_t* pDeviceCount);
/************************************************************************
* @~chinese
* @brief
* @param handle [IN OUT]
* @param pstDeviceInfo [IN]
* @return MV3D_RGBD_OK
* @remark RGB Chunk
* @~english
* @brief open device
* @param handle [IN OUT] camera handle
* @param pstDeviceInfo [IN] enum camera info. the default is null, open first camera
* @return Success, return MV3D_RGBD_OK. Failure, return error code
* @remark Set working mode to depth, image mode to depth, and open RGB Chunk
************************************************************************/
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_OpenDevice(HANDLE *handle, MV3D_RGBD_DEVICE_INFO* pstDeviceInfo = NULL);
/************************************************************************
* @~chinese
* @brief
* @param handle [IN OUT]
* @param chDeviceName [IN]
* @return MV3D_RGBD_OK
* @remark RGB Chunk
* @~english
* @brief open device by device user defined name
* @param handle [IN OUT] camera handle
* @param chDeviceName [IN] device user defined name
* @return Success, return MV3D_RGBD_OK. Failure, return error code
* @remark Set working mode to depth, image mode to depth, and open RGB Chunk
************************************************************************/
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_OpenDeviceByName(HANDLE *handle, const char* chDeviceName);
/************************************************************************
* @~chinese
* @brief
* @param handle [IN OUT]
* @param chSerialNumber [IN]
* @return MV3D_RGBD_OK
* @remark RGB Chunk
* @~english
* @brief open device by serial number
* @param handle [IN OUT] camera handle
* @param chSerialNumber [IN] serial number
* @return Success, return MV3D_RGBD_OK. Failure, return error code
* @remark Set working mode to depth, image mode to depth, and open RGB Chunk
************************************************************************/
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_OpenDeviceBySerialNumber(HANDLE *handle, const char* chSerialNumber);
/************************************************************************
* @~chinese
* @brief IP打开设备,
* @param handle [IN OUT]
* @param chIP [IN] IP地址
* @return MV3D_RGBD_OK
* @remark RGB Chunk
* @~english
* @brief open device by iponly network device is valid
* @param handle [IN OUT] camera handle
* @param chIP [IN] IP
* @return Success, return MV3D_RGBD_OK. Failure, return error code
* @remark Set working mode to depth, image mode to depth, and open RGB Chunk
************************************************************************/
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_OpenDeviceByIp(HANDLE *handle, const char* chIP);
/************************************************************************
* @~chinese
* @brief
* @param handle [IN]
* @return MV3D_RGBD_OK
* @~english
* @brief close Device
* @param handle [IN] camera handle
* @return Success, return MV3D_RGBD_OK. Failure, return error code
************************************************************************/
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_CloseDevice(HANDLE *handle);
/************************************************************************
* @~chinese
* @brief
* @param handle [IN]
* @param pstDevInfo [IN][OUT]
* @return ,MV3D_RGBD_OK,,
* @~english
* @brief get current device information
* @param handle [IN] camera handle
* @param pstDevInfo [IN][OUT] structure pointer of device information
* @return Success, return MV3D_RGBD_OK. Failure, return error code
************************************************************************/
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_GetDeviceInfo(HANDLE handle, MV3D_RGBD_DEVICE_INFO* pstDevInfo);
/************************************************************************
* @~chinese
* @brief IP,
* @param chSerialNumber [IN]
* @param pstIPConfig [IN] IP配置IPDHCP等
* @return ,MV3D_RGBD_OK,,
* @~english
* @brief ip configurationonly network device is valid
* @param chSerialNumber [IN] serial number
* @param pstIPConfig [IN] IP Config, Static IPDHCP
* @return Success, return MV3D_RGBD_OK. Failure, return error code
************************************************************************/
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_SetIpConfig(const char* chSerialNumber, MV3D_RGBD_IP_CONFIG* pstIPConfig);
/***********************************************************************
* @~chinese
* @brief
* @param handle [IN]
* @param cbOutput [IN]
* @param pUser [IN]
* @return MV3D_RGBD_OK
* @remark NULL时,
* @~english
* @brief register image data callback
* @param handle [IN] camera handle
* @param cbOutput [IN] callback function pointer
* @param pUser [IN] user defined variable
* @return Success, return MV3D_RGBD_OK. Failure, return error code
* @remark Cancel callback registration when pUser is NULL
***********************************************************************/
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_RegisterFrameCallBack(HANDLE handle, MV3D_RGBD_FrameDataCallBack cbOutput, void* pUser);
/************************************************************************
* @~chinese
* @brief
* @param handle [IN]
* @param cbException [IN]
* @param pUser [IN]
* @return
* @~english
* @brief register exception message callBack
* @param handle: [IN] camera handle
* @param cbException [IN] exception message callback function pointer
* @param pUser [IN] user defined variable
* @return Refer to error code
************************************************************************/
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_RegisterExceptionCallBack(HANDLE handle, MV3D_RGBD_ExceptionCallBack cbException, void* pUser);
/************************************************************************
* @~chinese
* @brief
* @param handle [IN]
* @param pstStreamCfgList [IN][OUT]
* @return ,MV3D_RGBD_OK,,
* @~english
* @brief get stream cfg list before start working
* @param handle [IN] camera handle
* @param pstStreamCfgList [IN][OUT] structure pointer of stream cfg list
* @return Success, return MV3D_RGBD_OK. Failure, return error code
************************************************************************/
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_GetStreamCfgList(HANDLE handle, MV3D_RGBD_STREAM_CFG_LIST* pstStreamCfgList);
/***********************************************************************
* @~chinese
* @brief
* @param handle [IN]
* @return MV3D_RGBD_OK
* @~english
* @brief start working
* @param handle [IN] camera handle
* @return Success, return MV3D_RGBD_OK. Failure, return error code
***********************************************************************/
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_Start(HANDLE handle);
/***********************************************************************
* @~chinese
* @brief
* @param handle [IN]
* @return MV3D_RGBD_OK
* @~english
* @brief stop working
* @param handle [IN] camera handle
* @return Success, return MV3D_RGBD_OK. Failure, return error code
***********************************************************************/
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_Stop(HANDLE handle);
/************************************************************************
* @~chinese
* @brief
* @param handle [IN]
* @param pstFrameData [IN][OUT]
* @param nTimeOut [IN] (ms)
* @return MV3D_RGBD_OK
* @~english
* @brief fetch frame data
* @param handle [IN] camera handle
* @param pstFrameData [IN] data set pointer
* @param nTimeOut [IN] timevalue(ms)
* @return Success, return MV3D_RGBD_OK. Failure, return error code
************************************************************************/
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_FetchFrame(HANDLE handle, MV3D_RGBD_FRAME_DATA* pstFrameData, uint32_t nTimeOut);
/************************************************************************
* @~chinese
* @brief
* @param handle [IN]
* @return ,MV3D_RGBD_OK,,
* @remark
* @~english
* @brief execute camera soft trigger
* @param handle [IN] camera handle
* @return Success, return MV3D_RGBD_OK. Failure, return error code
* @remark Set trigger mode to open, trigger source to software, and excute soft trigger
************************************************************************/
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_SoftTrigger(HANDLE handle);
/************************************************************************
* @~chinese
* @brief Command命令
* @param handle [IN]
* @param strKey [IN]
* @return ,MV3D_RGBD_OK,,
* @~english
* @brief execute camera command
* @param handle [IN] camera handle
* @param strKey [IN] key value
* @return Success, return MV3D_RGBD_OK. Failure, return error code
************************************************************************/
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_Execute(HANDLE handle, const char* strKey);
/************************************************************************
* @~chinese
* @brief
* @param handle [IN]
* @param nCoordinateType [IN] Mv3dRgbdCoordinateType
* @param pstCalibInfo [IN][OUT]
* @return ,MV3D_RGBD_OK,,
* @~english
* @brief get camera current calibration info
* @param handle [IN] camera handle
* @param nCoordinateType [IN] coordinate type, refer to Mv3dRgbdCoordinateType
* @param pstCalibInfo [IN][OUT] calibration info
* @return Success, return MV3D_RGBD_OK. Failure, return error code
************************************************************************/
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_GetCalibInfo(HANDLE handle, uint32_t nCoordinateType, MV3D_RGBD_CALIB_INFO* pstCalibInfo);
/************************************************************************
* @~chinese
* @brief
* @param handle [IN]
* @param pstCameraParam [IN][OUT]
* @return ,MV3D_RGBD_OK,,
* @~english
* @brief get camera intrinsic and extrinsic information
* @param handle [IN] camera handle
* @param pstCameraParam [IN][OUT] camera intrinsic and extrinsic Info
* @return Success, return MV3D_RGBD_OK. Failure, return error code
************************************************************************/
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_GetCameraParam(HANDLE handle, MV3D_RGBD_CAMERA_PARAM* pstCameraParam);
/************************************************************************
* @~chinese
* @brief
* @param handle [IN]
* @param pFilePathName [IN]
* @return ,MV3D_RGBD_OK,,
* @~english
* @brief device upgrade
* @param handle [IN] camera handle
* @param pFilePathName [IN] file name
* @return Success, return MV3D_RGBD_OK. Failure, return error code
************************************************************************/
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_LocalUpgrade(HANDLE handle, const char* pFilePathName);
/************************************************************************
* @~chinese
* @brief
* @param handle [IN]
* @param pProcess [OUT]
* @return ,MV3D_RGBD_OK,,
* @~english
* @brief get upgrade progress
* @param handle [IN] camera handle
* @param pProcess [OUT] progress receiving address
* @return Success, return MV3D_RGBD_OK. Failure, return error code
************************************************************************/
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_GetUpgradeProcess(HANDLE handle, uint32_t* pProcess);
/************************************************************************
* @~chinese
* @brief
* @param handle [IN]
* @param strKey [IN]
* @param pstParam [IN]
* @return ,MV3D_RGBD_OK,,
* @~english
* @brief get camera param value
* @param handle [IN] camera handle
* @param strKey [IN] key value
* @param pstParam [IN] structure pointer of camera param
* @return Success, return MV3D_RGBD_OK. Failure, return error code
************************************************************************/
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_GetParam(HANDLE handle, const char* strKey, MV3D_RGBD_PARAM* pstParam);
/************************************************************************
* @~chinese
* @brief
* @param handle [IN]
* @param strKey [IN]
* @param pstParam [IN]
* @return ,MV3D_RGBD_OK,,
* @~english
* @brief set camera param value
* @param handle [IN] camera handle
* @param strKey [IN] key value
* @param pstParam [IN] structure pointer of camera param
* @return Success, return MV3D_RGBD_OK. Failure, return error code
************************************************************************/
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_SetParam(HANDLE handle, const char* strKey, MV3D_RGBD_PARAM* pstParam);
/************************************************************************
* @~chinese
* @brief
* @param handle [IN]
* @param pOutFileName [IN]
* @return MV3D_RGBD_OK
* @~english
* @brief export camera param
* @param handle [IN] camera handle
* @param pOutFileName [IN] export file name
* @return Success, return MV3D_RGBD_OK. Failure, return error code
************************************************************************/
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_ExportAllParam(HANDLE handle, const char* pOutFileName);
/************************************************************************
* @~chinese
* @brief
* @param handle [IN]
* @param pInFileName [IN]
* @return MV3D_RGBD_OK
* @~english
* @brief import camera param
* @param handle [IN] camera handle
* @param pInFileName [IN] import file name
* @return Success, return MV3D_RGBD_OK. Failure, return error code
************************************************************************/
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_ImportAllParam(HANDLE handle, const char* pInFileName);
/************************************************************************
* @~chinese
* @brief
* @param handle [IN]
* @param pstFileAccess [IN]
* @return MV3D_RGBD_OK
* @~english
* @brief read the file from the camera
* @param handle [IN] camera handle
* @param pstFileAccess [IN] file access structure
* @return Success, return MV3D_RGBD_OK. Failure, return error code
************************************************************************/
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_FileAccessRead(void* handle, MV3D_RGBD_FILE_ACCESS* pstFileAccess);
/************************************************************************
* @~chinese
* @brief
* @param handle [IN]
* @param pstFileAccess [IN]
* @return MV3D_RGBD_OK
* @~english
* @brief write the file to camera
* @param handle [IN] camera handle
* @param pstFileAccess [IN] file access structure
* @return Success, return MV3D_RGBD_OK. Failure, return error code
************************************************************************/
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_FileAccessWrite(void* handle, MV3D_RGBD_FILE_ACCESS* pstFileAccess);
/************************************************************************
* @~chinese
* @brief
* @param handle [IN]
* @param pstFileAccessProgress [IN]
* @return MV3D_RGBD_OK
* @~english
* @brief get file access progress
* @param handle [IN] camera handle
* @param pstFileAccessProgress [IN] file access progress structure
* @return Success, return MV3D_RGBD_OK. Failure, return error code
************************************************************************/
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_GetFileAccessProgress(void* handle, MV3D_RGBD_FILE_ACCESS_PROGRESS* pstFileAccessProgress);
#ifdef __cplusplus
}
#endif
#endif // _MV3D_RGBD_API_H_