-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathIGXFeatureControl.h
196 lines (171 loc) · 7.99 KB
/
IGXFeatureControl.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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
//------------------------------------------------------------------------
/**
\file IGXFeatureControl.h
\brief Definition of IGXFeatureControl class.
\Date 2016-8-09
\Version 1.1.1608.9091
*/
//------------------------------------------------------------------------
#ifndef IGXFEATURE_CONTROL_H
#define IGXFEATURE_CONTROL_H
#include "GXIAPIBase.h"
#include "GXStringCPP.h"
#include "GXStringVector.h"
#include "GXSmartPtr.h"
#include "IBoolFeature.h"
#include "IFloatFeature.h"
#include "IIntFeature.h"
#include "IEnumFeature.h"
#include "IStringFeature.h"
#include "IRegisterFeature.h"
#include "ICommandFeature.h"
#include "IFeatureEventHandler.h"
class GXIAPICPP_API IGXFeatureControl
{
public:
//---------------------------------------------------------
/**
\brief Destructor
*/
//---------------------------------------------------------
virtual ~IGXFeatureControl(){};
//----------------------------------------------------------------------------------
/**
\brief Retrieves all feature names in the feature control
\param vectorFeatureNameList[int,out] A list of feature name
\return void
*/
//----------------------------------------------------------------------------------
virtual void GetFeatureNameList(GxIAPICPP::gxstring_vector& vectorFeatureNameList) = 0;
//----------------------------------------------------------------------------------
/**
\brief Get the feature type of the given feature name
\param strFeatureName[in] The feature name
\return The feature type
*/
//----------------------------------------------------------------------------------
virtual GX_FEATURE_TYPE GetFeatureType(const GxIAPICPP::gxstring& strFeatureName) = 0;
//---------------------------------------------------------
/**
\brief Checks if a feature is implemented
\param strFeatureName[in] The feature name
\return True if the feature was implemented
*/
//---------------------------------------------------------
virtual bool IsImplemented(const GxIAPICPP::gxstring& strFeatureName) = 0;
//---------------------------------------------------------
/**
\brief Checks if a feature is readable
\param strFeatureName[in] The feature name
\return True if the feature was readable
*/
//---------------------------------------------------------
virtual bool IsReadable(const GxIAPICPP::gxstring& strFeatureName) = 0;
//---------------------------------------------------------
/**
\brief Checks if a feature is writable
\param strFeatureName[in] The feature name
\return True if the feature was writable
*/
//---------------------------------------------------------
virtual bool IsWritable(const GxIAPICPP::gxstring& strFeatureName) = 0;
//---------------------------------------------------------
/**
\brief Read specified register value
\param [in]ui64Address Register Address
\param [out]pBuffer return register value,It can not be NULL
\param [in, out]piSize [in]Buffer size of the user application
[out]After reading the value of the register successfully, return the actual size.
\return void
*/
//---------------------------------------------------------
virtual void ReadPort(uint64_t uiAddress, void *pBuffer, size_t *piSize) = 0;
//---------------------------------------------------------
/**
\brief Write specified register value
\param [in]ui64Address Register Address
\param [out]pBuffer Write register value,It can not be NULL
\param [in]piSize [in]Buffer size of the user application
\return void
*/
//---------------------------------------------------------
virtual void WritePort(uint64_t uiAddress, const void *pBuffer, size_t *piSize) = 0;
//----------------------------------------------------------------------------------
/**
\brief Get a int feature control, associated with the given feature name
\param strFeatureName[in] The feature name
\return A int feature control
*/
//----------------------------------------------------------------------------------
virtual CIntFeaturePointer GetIntFeature(const GxIAPICPP::gxstring& strFeatureName) = 0;
//----------------------------------------------------------------------------------
/**
\brief Get a float feature control, associated with the given feature name
\param strFeatureName[in] The feature name
\return A float feature control
*/
//----------------------------------------------------------------------------------
virtual CFloatFeaturePointer GetFloatFeature(const GxIAPICPP::gxstring& strFeatureName) = 0;
//----------------------------------------------------------------------------------
/**
\brief Get a enum feature control, associated with the given feature name
\param strFeatureName[in] The feature name
\return A enum feature control
*/
//----------------------------------------------------------------------------------
virtual CEnumFeaturePointer GetEnumFeature(const GxIAPICPP::gxstring& strFeatureName) = 0;
//----------------------------------------------------------------------------------
/**
\brief Get a bool feature control, associated with the given feature name
\param strFeatureName[in] The feature name
\return A bool feature control
*/
//----------------------------------------------------------------------------------
virtual CBoolFeaturePointer GetBoolFeature(const GxIAPICPP::gxstring& strFeatureName) = 0;
//----------------------------------------------------------------------------------
/**
\brief Get a string feature control, associated with the given feature name
\param strFeatureName[in] The feature name
\return A string feature control
*/
//----------------------------------------------------------------------------------
virtual CStringFeaturePointer GetStringFeature(const GxIAPICPP::gxstring& strFeatureName) = 0;
//----------------------------------------------------------------------------------
/**
\brief Get a command feature control, associated with the given feature name
\param strFeatureName[in] The feature name
\return A command feature control
*/
//----------------------------------------------------------------------------------
virtual CCommandFeaturePointer GetCommandFeature(const GxIAPICPP::gxstring& strFeatureName) = 0;
//----------------------------------------------------------------------------------
/**
\brief Get a register feature control, associated with the given feature name
\param strFeatureName[in] The feature name
\return A register feature control
*/
//----------------------------------------------------------------------------------
virtual CRegisterFeaturePointer GetRegisterFeature(const GxIAPICPP::gxstring& strFeatureName) = 0;
//----------------------------------------------------------------------------------
/**
\brief Register feature event call back
\param strFeatureName[in] The feature name
\param pUserParam[in] The user param
\param callBackFun[in] The call back handler pointer; that must be inherited from IFeatureEventHandler
\return The call back handle
*/
//----------------------------------------------------------------------------------
virtual GX_FEATURE_CALLBACK_HANDLE RegisterFeatureCallback(const GxIAPICPP::gxstring& strFeatureName,
IFeatureEventHandler* pEventHandler, void* pUserParam) = 0;
//----------------------------------------------------------------------------------
/**
\brief Unregister feature event call back
\param hCallback[in] The call back handle
\return void
*/
//----------------------------------------------------------------------------------
virtual void UnregisterFeatureCallback(GX_FEATURE_CALLBACK_HANDLE hCallback) = 0;
};
template class GXIAPICPP_API GXSmartPtr<IGXFeatureControl>;
typedef GXSmartPtr<IGXFeatureControl> CGXFeatureControlPointer;
#endif //IGXFEATURE_CONTROL_H