提交 | 用户 | age
|
4b03ae
|
1 |
|
Q |
2 |
#ifndef __MV_TLFACTORY_H__
|
|
3 |
#define __MV_TLFACTORY_H__
|
|
4 |
|
|
5 |
#include "GenApi/Synch.h"
|
|
6 |
#include "MvInclude.h"
|
|
7 |
#include "MvDeviceBase.h"
|
|
8 |
|
|
9 |
namespace MvCamCtrl
|
|
10 |
{
|
|
11 |
class MV_CAMCTRL_API CTlFactory : public IDeviceFactory
|
|
12 |
{
|
|
13 |
public:
|
|
14 |
|
|
15 |
/// Retrieve the transport layer factory singleton
|
|
16 |
static CTlFactory& GetInstance();
|
|
17 |
|
|
18 |
|
|
19 |
/// Retrieve all available transport layers
|
|
20 |
unsigned int EnumerateTls();
|
|
21 |
|
|
22 |
|
|
23 |
/** @fn EnumDevices( unsigned int nTLayerType , MV_CC_DEVICE_INFO_LIST& stDevList )
|
|
24 |
* @brief 枚举子网内,指定的传输协议对应的所有设备
|
|
25 |
* @param nTLayerType [IN] - 指定的传输协议
|
|
26 |
stDevList [OUT] - 设备信息列表
|
|
27 |
*
|
|
28 |
* @return 成功,返回MV_OK;失败,返回错误码
|
|
29 |
*/
|
|
30 |
virtual int EnumDevices( unsigned int nTLayerType , MV_CC_DEVICE_INFO_LIST& stDevList );
|
|
31 |
|
|
32 |
|
|
33 |
/** @fn CreateDevice( const MV_CC_DEVICE_INFO& device )
|
|
34 |
* @brief 创建设备代理类
|
|
35 |
* @param device [IN] - 设备信息(仅要求传输层类型有效即可)
|
|
36 |
*
|
|
37 |
* @return 成功,返回设备代理实例;失败,返回NULL
|
|
38 |
*/
|
|
39 |
virtual IMvDevice* CreateDevice( const MV_CC_DEVICE_INFO& device );
|
|
40 |
|
|
41 |
|
|
42 |
/** @fn DestroyDevice( IMvDevice* pDevice)
|
|
43 |
* @brief 销毁指定设备的内部资源
|
|
44 |
* @param pDevice [IN] - 设备对象
|
|
45 |
*
|
|
46 |
* @return 成功,返回MV_OK;失败,返回错误码
|
|
47 |
*/
|
|
48 |
virtual int DestroyDevice( IMvDevice* );
|
|
49 |
|
|
50 |
|
|
51 |
/** @fn IsDeviceAccessible( const MV_CC_DEVICE_INFO& deviceInfo)
|
|
52 |
* @brief 判断指定的设备是否可以访问
|
|
53 |
* @param deviceInfo [IN] - 指定的设备信息
|
|
54 |
*
|
|
55 |
* @return 可以访问,返回 true ;没有权限或设备已掉线,返回 false
|
|
56 |
* @note 暂不支持
|
|
57 |
*/
|
|
58 |
virtual bool IsDeviceAccessible( const MV_CC_DEVICE_INFO& deviceInfo);
|
|
59 |
|
|
60 |
~CTlFactory( void );
|
|
61 |
|
|
62 |
virtual unsigned int GetSDKVersion();
|
|
63 |
|
|
64 |
protected:
|
|
65 |
|
|
66 |
static CTlFactory m_sTLinstance;
|
|
67 |
GenApi::CLock m_cLock;
|
|
68 |
CTlRefs* m_pCreatedTls;
|
|
69 |
|
|
70 |
private:
|
|
71 |
|
|
72 |
CTlFactory( void );
|
|
73 |
CTlFactory& operator=( const CTlFactory& );
|
|
74 |
CTlFactory( const CTlFactory& );
|
|
75 |
};
|
|
76 |
|
|
77 |
}
|
|
78 |
|
|
79 |
#endif /* __MV_TLFACTORY_H__ */
|