-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathIGXFactory.h
165 lines (145 loc) · 6.77 KB
/
IGXFactory.h
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
157
158
159
160
161
162
163
164
165
//------------------------------------------------------------------------
/**
\file IGXFactory.h
\brief Definition of IGXFactory class. Initialize library, enumerates and open devices.
\Date 2018-9-04
\Version 1.1.1809.9041
*/
//------------------------------------------------------------------------
#pragma once
#include "GXIAPIBase.h"
#include "GXDeviceInfo.h"
#include "GXSmartPtr.h"
#include "IGXDevice.h"
#include "GXStringCPP.h"
#include "GXDeviceInfoVector.h"
class GXIAPICPP_API IGXFactory
{
protected:
///Constructor
IGXFactory(){}
///Destructor
virtual ~IGXFactory(){}
public:
//----------------------------------------------------------------------------------
/**
\brief Get the static instance object of IGXFactory
\return The static instance object of IGXFactory
*/
//----------------------------------------------------------------------------------
static IGXFactory& GetInstance();
//----------------------------------------------------------------------------------
/**
\brief Initializes the GxIAPICPP runtime system
You must call Init before calling any other functions.
When finished you must call Uninit to free up all resources used by GxIAPICPP.
\return void
*/
//----------------------------------------------------------------------------------
virtual void Init() = 0;
//----------------------------------------------------------------------------------
/**
\brief Frees resources allocated by the GxIAPICPP runtime system.
\return void
*/
//----------------------------------------------------------------------------------
virtual void Uninit() = 0;
//----------------------------------------------------------------------------------
/**
\brief Retrieve a list of available devices. If GigE cameras are connected, this can enumerate all GigE camera devices in the same subnet.
\param nTimeout[in] Timeout for the waits in ms.
\param vectorDeviceInfo[int,out] A list of available devices
\return void
*/
//----------------------------------------------------------------------------------
virtual void UpdateDeviceList(uint32_t nTimeout, GxIAPICPP::gxdeviceinfo_vector& vectorDeviceInfo) = 0;
//----------------------------------------------------------------------------------
/**
\brief Retrieve a list of available devices. If GigE cameras are connected, this can enumerate all GigE camera devices in all subnets.
\param nTimeout[in] Timeout for the waits in ms.
\param vectorDeviceInfo[int,out] A list of available devices
\return void
*/
//----------------------------------------------------------------------------------
virtual void UpdateAllDeviceList(uint32_t nTimeout, GxIAPICPP::gxdeviceinfo_vector& vectorDeviceInfo) = 0;
//----------------------------------------------------------------------------------
/**
\brief Open device by IP address, if present
\param strIP[in] IP address
\param emAccessMode[in] The access mode
\return A smart pointer object of IGXDevice
*/
//----------------------------------------------------------------------------------
virtual CGXDevicePointer OpenDeviceByIP(const GxIAPICPP::gxstring& strIP, GX_ACCESS_MODE emAccessMode) = 0;
//----------------------------------------------------------------------------------
/**
\brief Open device by MAC address, if present
\param strIP[in] MAC address
\param emAccessMode[in] The access mode
\return A smart pointer object of IGXDevice
*/
//----------------------------------------------------------------------------------
virtual CGXDevicePointer OpenDeviceByMAC(const GxIAPICPP::gxstring& strMAC, GX_ACCESS_MODE emAccessMode) = 0;
//----------------------------------------------------------------------------------
/**
\brief Open device by serials number
\param strIP[in] Serials number
\param emAccessMode[in] The access mode
\return A smart pointer object of IGXDevice
*/
//----------------------------------------------------------------------------------
virtual CGXDevicePointer OpenDeviceBySN(const GxIAPICPP::gxstring& strSN, GX_ACCESS_MODE emAccessMode) = 0;
//----------------------------------------------------------------------------------
/**
\brief Open device by user defined name, if present
\param strIP[in] The user defined name
\param emAccessMode[in] The access mode
\return A smart pointer object of IGXDevice
*/
//----------------------------------------------------------------------------------
virtual CGXDevicePointer OpenDeviceByUserID(const GxIAPICPP::gxstring& strUserID, GX_ACCESS_MODE emAccessMode) = 0;
// ---------------------------------------------------------------------------
/**
\brief Set Device's Static IP Address
\param[in] strDevcieMacAddress Device's MAC Address
\param[in] emIpConfigMode IP Configure Mode(Static IP/DHCP/LLA)
\param[in] strIPAddress IP Address
\param[in] strSubnetMask Subnet Mask
\param[in] strDefaultGateway Default Gateway
\param[in] strUserID User's Name
\retrun void
*/
// ---------------------------------------------------------------------------
virtual void GigEIpConfiguration(const GxIAPICPP::gxstring& strDeviceMacAddress,
GX_IP_CONFIGURE_MODE emIpConfigMode,
const GxIAPICPP::gxstring& strIpAddress,
const GxIAPICPP::gxstring& strSubnetMask,
const GxIAPICPP::gxstring& strDefaultGateway,
const GxIAPICPP::gxstring& strUserID) = 0;
// ---------------------------------------------------------------------------
/**
\brief ForceIP
\param[in] strDevcieMacAddress Device's MAC Address
\param[in] strIPAddress Ip Address
\param[in] strSubnetMask Subnet Mask
\param[in] strDefaultGateway Default Gateway
\retrun void
*/
// ---------------------------------------------------------------------------
virtual void GigEForceIp(const GxIAPICPP::gxstring& pszDeviceMacAddress,
const GxIAPICPP::gxstring& strIpAddress,
const GxIAPICPP::gxstring& strSubnetMask,
const GxIAPICPP::gxstring& strDefaultGateway) = 0;
// ---------------------------------------------------------------------------
/**
\brief reset/reconnect Device
\param[in] pszDevcieMacAddress Device's MAC Address
\param[in] ui32FeatureInfo reset Mode
\retrun
*/
// ---------------------------------------------------------------------------
virtual void GigEResetDevice(const GxIAPICPP::gxstring& strDeviceMacAddress, GX_RESET_DEVICE_MODE ui32FeatureInfo) = 0;
private:
IGXFactory& operator=(const IGXFactory&);
IGXFactory(const IGXFactory&);
};