123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144 |
- #ifndef _MV_CAMERA_H_
- #define _MV_CAMERA_H_
- #include "MvCameraControl.h"
- #include <string.h>
- #ifdef MV_CAMERA_EXPORTS
- #define MV_CAMERA_DLL_API __declspec(dllexport)
- #else
- #define MV_CAMERA_DLL_API
- #endif
- #ifndef MV_NULL
- #define MV_NULL 0
- #endif
- class CMvCamera
- {
- public:
- CMvCamera();
- ~CMvCamera();
-
- static int GetSDKVersion();
-
- static int EnumDevices(unsigned int nTLayerType, MV_CC_DEVICE_INFO_LIST* pstDevList);
-
- static bool IsDeviceAccessible(MV_CC_DEVICE_INFO* pstDevInfo, unsigned int nAccessMode);
-
- int Open(MV_CC_DEVICE_INFO* pstDeviceInfo);
-
- int Close();
-
- bool IsDeviceConnected();
-
- int RegisterImageCallBack(void(__stdcall* cbOutput)(unsigned char * pData, MV_FRAME_OUT_INFO_EX* pFrameInfo, void* pUser), void* pUser);
-
- int StartGrabbing();
-
- int StopGrabbing();
-
- int GetImageBuffer(MV_FRAME_OUT* pFrame, int nMsec);
-
- int FreeImageBuffer(MV_FRAME_OUT* pFrame);
-
- int DisplayOneFrame(MV_DISPLAY_FRAME_INFO* pDisplayInfo);
-
- int SetImageNodeNum(unsigned int nNum);
-
- int GetDeviceInfo(MV_CC_DEVICE_INFO* pstDevInfo);
-
- int GetGevAllMatchInfo(MV_MATCH_INFO_NET_DETECT* pMatchInfoNetDetect);
-
- int GetU3VAllMatchInfo(MV_MATCH_INFO_USB_DETECT* pMatchInfoUSBDetect);
-
- int SetExposureTime(IN float iExposureTime);
-
- int SetGain(IN float iGain);
-
-
- int GetIntValue(IN const char* strKey, OUT MVCC_INTVALUE_EX *pIntValue);
- int SetIntValue(IN const char* strKey, IN int64_t nValue);
-
-
- int GetEnumValue(IN const char* strKey, OUT MVCC_ENUMVALUE *pEnumValue);
- int SetEnumValue(IN const char* strKey, IN unsigned int nValue);
- int SetEnumValueByString(IN const char* strKey, IN const char* sValue);
-
-
- int GetFloatValue(IN const char* strKey, OUT MVCC_FLOATVALUE *pFloatValue);
- int SetFloatValue(IN const char* strKey, IN float fValue);
-
-
- int GetBoolValue(IN const char* strKey, OUT bool *pbValue);
- int SetBoolValue(IN const char* strKey, IN bool bValue);
-
-
- int GetStringValue(IN const char* strKey, MVCC_STRINGVALUE *pStringValue);
- int SetStringValue(IN const char* strKey, IN const char * strValue);
-
-
- int CommandExecute(IN const char* strKey);
-
- int GetOptimalPacketSize(unsigned int* pOptimalPacketSize);
-
- int RegisterExceptionCallBack(void(__stdcall* cbException)(unsigned int nMsgType, void* pUser), void* pUser);
-
- int RegisterEventCallBack(const char* pEventName, void(__stdcall* cbEvent)(MV_EVENT_OUT_INFO * pEventInfo, void* pUser), void* pUser);
-
- int ForceIp(unsigned int nIP, unsigned int nSubNetMask, unsigned int nDefaultGateWay);
-
- int SetIpConfig(unsigned int nType);
-
- int SetNetTransMode(unsigned int nType);
-
- int ConvertPixelType(MV_CC_PIXEL_CONVERT_PARAM* pstCvtParam);
-
- int SaveImage(MV_SAVE_IMAGE_PARAM_EX* pstParam);
-
- int SaveImageToFile(MV_SAVE_IMG_TO_FILE_PARAM* pstParam);
- private:
- void* m_hDevHandle;
- };
- #endif
|