zxd
2023-09-14 d34256830982fb9ea822c1e9b874c3b7fa0a614d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
 
#ifndef __MV_GIGE_DEVICE_H__
#define __MV_GIGE_DEVICE_H__
 
#include "MvDeviceBase.h"
 
namespace MvCamCtrl
{
    class CMvGigEDevice : public IMvDevice
    {
    public:
 
        // ´ò¿ªÉ豸
        virtual int     Open(unsigned int nAccessMode = MV_ACCESS_Exclusive, unsigned short nSwitchoverKey = 0);
 
 
        // ¹Ø±ÕÉ豸
        virtual int     Close();
 
 
        // ÅжÏÉ豸µÄ״̬£¬½öµ±·µ»Øfalseʱ£¬¿É´ò¿ªÉ豸
        virtual bool    IsOpen();
 
 
        // ¿ªÆôץͼ
        virtual int     StartGrabbing();
 
 
        // Í£Ö¹×¥Í¼
        virtual int     StopGrabbing();
 
 
        // »ñÈ¡É豸ÐÅÏ¢
        virtual int     GetDeviceInfo(MV_CC_DEVICE_INFO&);
 
 
        /** @fn     GetGenICamXML(unsigned char* pData, unsigned int nDataSize, unsigned int* pnDataLen)
         *  @brief  »ñÈ¡É豸µÄXMLÎļþ
         *  @param  pData           [IN][OUT]   - ´ý¿½ÈëµÄ»º´æµØÖ·
                    nDataSize       [IN]        - »º´æ´óС
                    pnDataLen       [OUT]       - xml ÎļþÊý¾Ý³¤¶È
         *  
         *  @return ³É¹¦£¬·µ»ØMV_OK£»Ê§°Ü£¬·µ»Ø´íÎóÂë
         *  @note   µ±pDataΪNULL»ònDataSize±Èʵ¼ÊµÄxmlÎļþСʱ£¬²»¿½±´Êý¾Ý£¬ÓÉpnDataLen·µ»ØxmlÎļþ´óС£»
         *          µ±pDataΪÓÐЧ»º´æµØÖ·£¬ÇÒ»º´æ×ã¹»´óʱ£¬¿½±´ÍêÕûÊý¾Ý£¬²¢ÓÉpnDataLen·µ»ØxmlÎļþ´óС¡£
         */
        virtual int     GetGenICamXML(unsigned char* pData, unsigned int nDataSize, unsigned int* pnDataLen);
 
 
        /** @fn     GetOneFrame(unsigned char * pData , unsigned int nDataSize, MV_FRAME_OUT_INFO* pFrameInfo)
         *  @brief  »ñȡһ֡ͼÏñÊý¾Ý
         *  @param  pData           [IN][OUT]   - Êý¾ÝÖ¸Õë
                    nDataLen        [IN]        - Êý¾Ý³¤¶È
                    pFrameInfo      [OUT]       - Êä³öµÄÖ¡ÐÅÏ¢
         *  
         *  @return ³É¹¦£¬·µ»ØMV_OK£»Ê§°Ü£¬·µ»Ø´íÎóÂë
         */
        virtual int     GetOneFrame(unsigned char * pData , unsigned int nDataSize, MV_FRAME_OUT_INFO* pFrameInfo);
 
 
        // »ñÈ¡GenICamʹÓõĴ«Êä²ã´úÀíÀà
        virtual TlProxy     GetTlProxy();
 
 
        virtual ~CMvGigEDevice( void );
 
 
        CMvGigEDevice( const MV_CC_DEVICE_INFO* pInfo );
 
 
        // »ñÈ¡ÍøÂçÐÅÏ¢
        virtual int     GetNetTransInfo(MV_NETTRANS_INFO* pstInfo);
 
 
        // Ç¿ÖÆIP
        virtual int     ForceIp(unsigned int nIP);
 
 
        // ÅäÖÃIP·½Ê½
        virtual int     SetIpConfig(unsigned int nType);
 
 
        // »ñÈ¡¸÷ÖÖÀàÐ͵ÄÐÅÏ¢
        virtual int     GetAllMatchInfo(MV_ALL_MATCH_INFO* pstInfo);
        // add new interface here...
 
        // ×¢²áÏûÏ¢Òì³£»Øµ÷
        virtual int     RegisterExceptionCallBack(void(__stdcall* cbException)(unsigned int nMsgType, void* pUser),
                                                    void* pUser);
 
        virtual int     SetSingleShot(void(__stdcall* cbSingleShot)(unsigned char* pData , unsigned int nDataLen, 
                                                                    MV_FRAME_OUT_INFO* pFrameInfo, void* pUser), 
                                        void* pUser);
 
        // ÉèÖÃÉ豸²É¼¯Ä£Ê½
        virtual int     SetAcquisitionMode(MV_CAM_ACQUISITION_MODE enMode);
 
 
        // É豸±¾µØÉý¼¶
        virtual int     LocalUpgrade(const void *pFilePathName);
 
        // »ñÈ¡µ±Ç°Éý¼¶½ø¶È
        virtual int     GetUpgradeProcess(unsigned int* pnProcess);
 
        virtual int     GetOptimalPacketSize();
 
        // ÏÔʾһ֡ͼÏñ
        virtual int     Display(void* hWnd);
 
        virtual int     SetNetTransMode(unsigned int nType);
 
        virtual int     ReadMemory(void *pBuffer, int64_t nAddress, int64_t nLength);
 
        virtual int     WriteMemory(const void *pBuffer, int64_t nAddress, int64_t nLength);
 
        // ·µ»ØÖµ 0Çý¶¯²»Õý³££¬1Çý¶¯Õý³£¹¤×÷
        virtual int     IsDriverWorking();
 
        // 0£º²»¶ªÆú£»1£º¶ªÆú
        virtual int     SetThrowAbnormalImage(int bThrow);
 
        // ÉèÖÃSDKÄÚ²¿Í¼Ïñ»º´æ½Úµã¸öÊý£¬·¶Î§[1, 30]£¬ÔÚץͼǰµ÷ÓÃ
        virtual int     SetImageNodeNum(unsigned int nNum);
 
        // ÉèÖÃgvcp³¬Ê±Ê±¼ä
        virtual int     SetGvcpTimeout(unsigned int nTimeout);
 
        // ×¢²áͼÏñÊý¾Ý»Øµ÷
        virtual int     RegisterImageCallBack(void(__stdcall* cbOutput)(unsigned char * pData, MV_FRAME_OUT_INFO* pFrameInfo, void* pUser),
                                                    void* pUser);
 
        // ×¢²áEVENTÏûÏ¢»Øµ÷
        virtual int     RegisterEventCallBack(void(__stdcall* cbEvent)(unsigned int nUserDefinedId, void* pUser),
                                                void* pUser);
 
        // ×¢²áͼÏñÊý¾Ý»Øµ÷,chunk
        virtual int     RegisterImageCallBackEx(void(__stdcall* cbOutput)(unsigned char * pData, MV_FRAME_OUT_INFO_EX* pFrameInfo, void* pUser),void* pUser);
 
        virtual int     RegisterImageCallBackForRGB(void(__stdcall* cbOutput)(unsigned char * pData, MV_FRAME_OUT_INFO_EX* pFrameInfo, void* pUser),void* pUser);
        virtual int     RegisterImageCallBackForBGR(void(__stdcall* cbOutput)(unsigned char * pData, MV_FRAME_OUT_INFO_EX* pFrameInfo, void* pUser),void* pUser);
 
        virtual int     GetOneFrameEx(unsigned char * pData , unsigned int nDataSize, MV_FRAME_OUT_INFO_EX* pFrameInfo);
 
        virtual int     GetImageForRGB(unsigned char * pData , unsigned int nDataSize, MV_FRAME_OUT_INFO_EX* pFrameInfo, int nMsec);
        virtual int     GetImageForBGR(unsigned char * pData , unsigned int nDataSize, MV_FRAME_OUT_INFO_EX* pFrameInfo, int nMsec);
 
        virtual int     GetOneFrameTimeout(unsigned char * pData , IN unsigned int nDataSize, IN OUT MV_FRAME_OUT_INFO_EX* pFrameInfo, int nMsec);
 
    private:
        CDevRefs*       m_pRefs;
    };
 
 
}
 
#endif /* __MV_GIGE_DEVICE_H__ */