#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__ */