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
 
#ifndef __MV_TLFACTORY_H__
#define __MV_TLFACTORY_H__
 
#include "GenApi/Synch.h"
#include "MvInclude.h"
#include "MvDeviceBase.h"
 
namespace MvCamCtrl
{
    class MV_CAMCTRL_API CTlFactory : public IDeviceFactory
    {
    public:
 
        /// Retrieve the transport layer factory singleton
        static CTlFactory& GetInstance();
 
 
        /// Retrieve all available transport layers
        unsigned int EnumerateTls();
 
 
        /** @fn     EnumDevices( unsigned int nTLayerType , MV_CC_DEVICE_INFO_LIST& stDevList )
         *  @brief  Ã¶¾Ù×ÓÍøÄÚ£¬Ö¸¶¨µÄ´«ÊäЭÒé¶ÔÓ¦µÄËùÓÐÉ豸
         *  @param  nTLayerType     [IN]    - Ö¸¶¨µÄ´«ÊäЭÒé
                    stDevList       [OUT]   - É豸ÐÅÏ¢Áбí
         *  
         *  @return ³É¹¦£¬·µ»ØMV_OK£»Ê§°Ü£¬·µ»Ø´íÎóÂë
         */
        virtual int EnumDevices( unsigned int nTLayerType , MV_CC_DEVICE_INFO_LIST& stDevList );
 
 
        /** @fn     CreateDevice( const MV_CC_DEVICE_INFO& device )
         *  @brief  ´´½¨É豸´úÀíÀà
         *  @param  device          [IN]    - É豸ÐÅÏ¢£¨½öÒªÇó´«Êä²ãÀàÐÍÓÐЧ¼´¿É£©
         *  
         *  @return ³É¹¦£¬·µ»ØÉ豸´úÀíʵÀý£»Ê§°Ü£¬·µ»ØNULL
         */
        virtual IMvDevice* CreateDevice( const MV_CC_DEVICE_INFO& device );
 
 
        /** @fn     DestroyDevice( IMvDevice* pDevice)
         *  @brief  Ïú»ÙÖ¸¶¨É豸µÄÄÚ²¿×ÊÔ´
         *  @param  pDevice         [IN]    - É豸¶ÔÏó
         *  
         *  @return ³É¹¦£¬·µ»ØMV_OK£»Ê§°Ü£¬·µ»Ø´íÎóÂë
         */
        virtual int DestroyDevice( IMvDevice* );
 
 
        /** @fn     IsDeviceAccessible( const MV_CC_DEVICE_INFO& deviceInfo)
         *  @brief  ÅжÏÖ¸¶¨µÄÉ豸ÊÇ·ñ¿ÉÒÔ·ÃÎÊ
         *  @param  deviceInfo      [IN]    - Ö¸¶¨µÄÉ豸ÐÅÏ¢
         *  
         *  @return ¿ÉÒÔ·ÃÎÊ£¬·µ»Ø true £»Ã»ÓÐȨÏÞ»òÉ豸ÒѵôÏߣ¬·µ»Ø false 
         *  @note   Ôݲ»Ö§³Ö
         */
        virtual bool IsDeviceAccessible( const MV_CC_DEVICE_INFO& deviceInfo);
 
        ~CTlFactory( void );
 
        virtual unsigned int  GetSDKVersion();
 
    protected:
 
        static CTlFactory   m_sTLinstance;
        GenApi::CLock       m_cLock;
        CTlRefs*            m_pCreatedTls;
 
    private:
 
        CTlFactory( void );
        CTlFactory& operator=( const CTlFactory& );
        CTlFactory( const CTlFactory& );
    };
 
}
 
#endif /* __MV_TLFACTORY_H__ */