提交 | 用户 | age
|
4b03ae
|
1 |
|
Q |
2 |
#ifndef __MV_USB3V_DEVICE_H__
|
|
3 |
#define __MV_USB3V_DEVICE_H__
|
|
4 |
|
|
5 |
#include "MvDeviceBase.h"
|
|
6 |
|
|
7 |
namespace MvCamCtrl
|
|
8 |
{
|
|
9 |
class CMvUsb3VDevice : public IMvDevice
|
|
10 |
{
|
|
11 |
public:
|
|
12 |
|
|
13 |
// 打开设备
|
|
14 |
virtual int Open(unsigned int nAccessMode = MV_ACCESS_Exclusive, unsigned short nSwitchoverKey = 0);
|
|
15 |
|
|
16 |
|
|
17 |
// 关闭设备
|
|
18 |
virtual int Close();
|
|
19 |
|
|
20 |
|
|
21 |
// 判断设备的状态,仅当返回false时,可打开设备
|
|
22 |
virtual bool IsOpen();
|
|
23 |
|
|
24 |
|
|
25 |
// 开启抓图
|
|
26 |
virtual int StartGrabbing();
|
|
27 |
|
|
28 |
|
|
29 |
// ֹͣץͼ
|
|
30 |
virtual int StopGrabbing();
|
|
31 |
|
|
32 |
|
|
33 |
// 获取设备信息
|
|
34 |
virtual int GetDeviceInfo(MV_CC_DEVICE_INFO&);
|
|
35 |
|
|
36 |
|
|
37 |
/** @fn GetGenICamXML(unsigned char* pData, unsigned int nDataSize, unsigned int* pnDataLen)
|
|
38 |
* @brief 获取设备的XML文件
|
|
39 |
* @param pData [IN][OUT] - 待拷入的缓存地址
|
|
40 |
nDataSize [IN] - 缓存大小
|
|
41 |
pnDataLen [OUT] - xml 文件数据长度
|
|
42 |
*
|
|
43 |
* @return 成功,返回MV_OK;失败,返回错误码
|
|
44 |
* @note 当pData为NULL或nDataSize比实际的xml文件小时,不拷贝数据,由pnDataLen返回xml文件大小;
|
|
45 |
* 当pData为有效缓存地址,且缓存足够大时,拷贝完整数据,并由pnDataLen返回xml文件大小。
|
|
46 |
*/
|
|
47 |
virtual int GetGenICamXML(unsigned char* pData, unsigned int nDataSize, unsigned int* pnDataLen);
|
|
48 |
|
|
49 |
|
|
50 |
/** @fn GetOneFrame(unsigned char * pData , unsigned int nDataSize, MV_FRAME_OUT_INFO* pFrameInfo)
|
|
51 |
* @brief 获取一帧图像数据
|
|
52 |
* @param pData [IN][OUT] - 数据指针
|
|
53 |
nDataLen [IN] - 数据长度
|
|
54 |
pFrameInfo [OUT] - 输出的帧信息
|
|
55 |
*
|
|
56 |
* @return 成功,返回MV_OK;失败,返回错误码
|
|
57 |
*/
|
|
58 |
virtual int GetOneFrame(unsigned char * pData , unsigned int nDataSize, MV_FRAME_OUT_INFO* pFrameInfo);
|
|
59 |
|
|
60 |
|
|
61 |
// 获取GenICam使用的传输层代理类
|
|
62 |
virtual TlProxy GetTlProxy();
|
|
63 |
|
|
64 |
|
|
65 |
virtual ~CMvUsb3VDevice( void );
|
|
66 |
|
|
67 |
|
|
68 |
CMvUsb3VDevice( const MV_CC_DEVICE_INFO* pInfo );
|
|
69 |
|
|
70 |
// 显示一帧图像
|
|
71 |
virtual int Display(void* hWnd);
|
|
72 |
|
|
73 |
|
|
74 |
// 获取各种类型的信息
|
|
75 |
virtual int GetAllMatchInfo(MV_ALL_MATCH_INFO* pstInfo);
|
|
76 |
|
|
77 |
// 注册消息异常回调
|
|
78 |
virtual int RegisterExceptionCallBack(void(__stdcall* cbException)(unsigned int nMsgType, void* pUser),
|
|
79 |
void* pUser);
|
|
80 |
|
|
81 |
|
|
82 |
virtual int SetSingleShot(void(__stdcall* cbSingleShot)(unsigned char* pData , unsigned int nDataLen,
|
|
83 |
MV_FRAME_OUT_INFO* pFrameInfo, void* pUser),
|
|
84 |
void* pUser);
|
|
85 |
|
|
86 |
// 设置设备采集模式
|
|
87 |
virtual int SetAcquisitionMode(MV_CAM_ACQUISITION_MODE enMode);
|
|
88 |
|
|
89 |
|
|
90 |
// 设备本地升级
|
|
91 |
virtual int LocalUpgrade(const void *pFilePathName);
|
|
92 |
|
|
93 |
// 获取当前升级进度
|
|
94 |
virtual int GetUpgradeProcess(unsigned int* pnProcess);
|
|
95 |
|
|
96 |
virtual int ReadMemory(void *pBuffer, int64_t nAddress, int64_t nLength);
|
|
97 |
|
|
98 |
virtual int WriteMemory(const void *pBuffer, int64_t nAddress, int64_t nLength);
|
|
99 |
|
|
100 |
// 设置SDK内部图像缓存节点个数,范围[1, 30],在抓图前调用
|
|
101 |
virtual int SetImageNodeNum(unsigned int nNum);
|
|
102 |
|
|
103 |
// 注册图像数据回调
|
|
104 |
virtual int RegisterImageCallBack(void(__stdcall* cbOutput)(unsigned char * pData, MV_FRAME_OUT_INFO* pFrameInfo, void* pUser),
|
|
105 |
void* pUser);
|
|
106 |
|
|
107 |
private:
|
|
108 |
CDevRefs* m_pRefs;
|
|
109 |
};
|
|
110 |
|
|
111 |
|
|
112 |
}
|
|
113 |
|
|
114 |
#endif /* __MV_GIGE_DEVICE_H__ */
|