IDSpeakAFL  v1.1.0
peak_afl_dynamic_loader.h
Go to the documentation of this file.
1 
10 #pragma once
11 
12 #include "peak_afl.h"
13 #include <string>
14 #include <cstdint>
15 
16 #ifdef __linux__
17  #include <dlfcn.h>
18 #else
19  #include <vector>
20  #include <windows.h>
21  #include <tchar.h>
22 #endif
23 
24 #include <stdexcept>
25 
26 #undef PEAK_AFL_EXPORT
27 #define PEAK_AFL_EXPORT
28 #undef PEAK_AFL_CALLCONV
29 #define PEAK_AFL_CALLCONV
30 
31 
32 namespace peak
33 {
34 namespace afl
35 {
36 namespace dynamic
37 {
38 
39 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_Init)(void );
40 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_Exit)(void );
41 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_GetLastError)(peak_afl_status * lastErrorCode, char * lastErrorMessage, size_t * lastErrorMessageSize);
42 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_GetVersion)(uint32_t * majorVersion, uint32_t * minorVersion, uint32_t * subminorVersion, uint32_t * patchVersion);
43 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoFeatureManager_Create)(peak_afl_manager_handle * handle, PEAK_NODE_MAP_HANDLE nodeMapHandle);
44 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoFeatureManager_Destroy)(peak_afl_manager_handle handle);
45 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoFeatureManager_AddController)(peak_afl_manager_handle handle, peak_afl_manager_handle controller);
46 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoFeatureManager_RemoveController)(peak_afl_manager_handle handle, peak_afl_manager_handle controller);
47 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoFeatureManager_Process)(peak_afl_manager_handle handle, PEAK_IPL_IMAGE_HANDLE imageHandle);
48 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoFeatureManager_CreateController)(peak_afl_manager_handle handle, peak_afl_controller_handle * controller, peak_afl_controllerType controllerType);
49 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoFeatureManager_DestroyAllController)(peak_afl_manager_handle handle);
50 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoFeatureManager_DestroyController)(peak_afl_manager_handle handle, peak_afl_controller_handle controller);
51 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoFeatureManager_Status)(peak_afl_manager_handle handle, peak_afl_BOOL8 * running);
52 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_Create)(peak_afl_controller_handle * controller, peak_afl_controllerType controllerType);
53 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_Destroy)(peak_afl_controller_handle controller);
54 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_SkipFrames_IsSupported)(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
55 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_SkipFrames_Set)(peak_afl_controller_handle controller, uint32_t count);
56 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_SkipFrames_Get)(peak_afl_controller_handle controller, uint32_t * count);
57 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_SkipFrames_GetRange)(peak_afl_controller_handle controller, uint32_t * min, uint32_t * max, uint32_t * inc);
58 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_ROI_IsSupported)(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
59 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_ROI_Set)(peak_afl_controller_handle controller, peak_afl_rectangle roi);
60 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_ROI_Get)(peak_afl_controller_handle controller, peak_afl_rectangle * roi);
61 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_ROI_Preset_IsSupported)(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
62 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_ROI_Preset_Set)(peak_afl_controller_handle controller, peak_afl_roi_preset roiPreset);
63 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_Mode_IsSupported)(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
64 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_Mode_Set)(peak_afl_controller_handle controller, peak_afl_controller_automode mode);
65 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_Mode_Get)(peak_afl_controller_handle controller, peak_afl_controller_automode * mode);
66 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_Status)(peak_afl_controller_handle controller, peak_afl_controller_status * status);
67 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_GetLastAutoAverage)(peak_afl_controller_handle controller, uint8_t * average);
68 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_GetLastAutoAverages)(peak_afl_controller_handle controller, uint8_t * averageRed, uint8_t * averageGreen, uint8_t * averageBlue);
69 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_AutoTarget_IsSupported)(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
70 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_AutoTarget_Set)(peak_afl_controller_handle controller, uint32_t target);
71 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_AutoTarget_Get)(peak_afl_controller_handle controller, uint32_t * target);
72 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_AutoTarget_GetRange)(peak_afl_controller_handle controller, uint32_t * min, uint32_t * max, uint32_t * inc);
73 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_AutoTolerance_IsSupported)(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
74 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_AutoTolerance_Set)(peak_afl_controller_handle controller, uint32_t tolerance);
75 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_AutoTolerance_Get)(peak_afl_controller_handle controller, uint32_t * tolerance);
76 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_AutoTolerance_GetRange)(peak_afl_controller_handle controller, uint32_t * min, uint32_t * max, uint32_t * inc);
77 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_AutoPercentile_IsSupported)(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
78 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_AutoPercentile_Set)(peak_afl_controller_handle controller, double percentile);
79 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_AutoPercentile_Get)(peak_afl_controller_handle controller, double * percentile);
80 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_AutoPercentile_GetRange)(peak_afl_controller_handle controller, double * min, double * max, double * inc);
81 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_Type_Get)(peak_afl_controller_handle controller, peak_afl_controllerType * type);
82 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_Algorithm_IsSupported)(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
83 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_Algorithm_Set)(peak_afl_controller_handle controller, peak_afl_controller_algorithm algorithm);
84 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_Algorithm_Get)(peak_afl_controller_handle controller, peak_afl_controller_algorithm * algorithm);
85 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_Algorithm_GetList)(peak_afl_controller_handle controller, peak_afl_controller_algorithm * typeList, uint32_t * listSize);
86 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_SharpnessAlgorithm_IsSupported)(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
87 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_SharpnessAlgorithm_Set)(peak_afl_controller_handle controller, peak_afl_controller_sharpness_algorithm algorithm);
88 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_SharpnessAlgorithm_Get)(peak_afl_controller_handle controller, peak_afl_controller_sharpness_algorithm * algorithm);
89 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_SharpnessAlgorithm_GetList)(peak_afl_controller_handle controller, peak_afl_controller_sharpness_algorithm * typeList, uint32_t * listSize);
90 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_Callback_Set)(peak_afl_controller_handle controller, peak_afl_callback_type type, void * funcPtr, void * context);
91 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_Weighted_ROI_IsSupported)(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
92 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_Weighted_ROI_Min_Size)(peak_afl_controller_handle controller, peak_afl_size * size);
93 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_Weighted_ROI_Set)(peak_afl_controller_handle controller, const peak_afl_weighted_rectangle * weightedRoiList, uint32_t listSize);
94 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_Weighted_ROI_Get)(peak_afl_controller_handle controller, peak_afl_weighted_rectangle * weightedRoiList, uint32_t * listSize);
95 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_Limit_IsSupported)(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
96 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_Limit_Default)(peak_afl_controller_handle controller, peak_afl_controller_limit * limit);
97 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_Limit_Set)(peak_afl_controller_handle controller, peak_afl_controller_limit limit);
98 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_Limit_Get)(peak_afl_controller_handle controller, peak_afl_controller_limit * limit);
99 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_Hysteresis_IsSupported)(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
100 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_Hysteresis_Default)(peak_afl_controller_handle controller, uint8_t * hysteresis);
101 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_Hysteresis_Set)(peak_afl_controller_handle controller, uint8_t hysteresis);
102 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_Hysteresis_Get)(peak_afl_controller_handle controller, uint8_t * hysteresis);
103 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_Hysteresis_GetRange)(peak_afl_controller_handle controller, uint8_t * min, uint8_t * max, uint8_t * inc);
104 
105 
106 class DynamicLoader
107 {
108 private:
109  DynamicLoader();
110 
111  static DynamicLoader& instance()
112  {
113  static DynamicLoader dynamicLoader{};
114  return dynamicLoader;
115  }
116  bool loadLib(const char* file);
117  void unload();
118  bool setPointers(bool load);
119 
120 public:
121  ~DynamicLoader();
122 
123  static bool isLoaded();
124 
125  static PEAK_AFL_API_STATUS peak_afl_Init(void );
126  static PEAK_AFL_API_STATUS peak_afl_Exit(void );
127  static PEAK_AFL_API_STATUS peak_afl_GetLastError(peak_afl_status * lastErrorCode, char * lastErrorMessage, size_t * lastErrorMessageSize);
128  static PEAK_AFL_API_STATUS peak_afl_GetVersion(uint32_t * majorVersion, uint32_t * minorVersion, uint32_t * subminorVersion, uint32_t * patchVersion);
129  static PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_Create(peak_afl_manager_handle * handle, PEAK_NODE_MAP_HANDLE nodeMapHandle);
130  static PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_Destroy(peak_afl_manager_handle handle);
133  static PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_Process(peak_afl_manager_handle handle, PEAK_IPL_IMAGE_HANDLE imageHandle);
137  static PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_Status(peak_afl_manager_handle handle, peak_afl_BOOL8 * running);
138  static PEAK_AFL_API_STATUS peak_afl_AutoController_Create(peak_afl_controller_handle * controller, peak_afl_controllerType controllerType);
139  static PEAK_AFL_API_STATUS peak_afl_AutoController_Destroy(peak_afl_controller_handle controller);
140  static PEAK_AFL_API_STATUS peak_afl_AutoController_SkipFrames_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
141  static PEAK_AFL_API_STATUS peak_afl_AutoController_SkipFrames_Set(peak_afl_controller_handle controller, uint32_t count);
142  static PEAK_AFL_API_STATUS peak_afl_AutoController_SkipFrames_Get(peak_afl_controller_handle controller, uint32_t * count);
143  static PEAK_AFL_API_STATUS peak_afl_AutoController_SkipFrames_GetRange(peak_afl_controller_handle controller, uint32_t * min, uint32_t * max, uint32_t * inc);
144  static PEAK_AFL_API_STATUS peak_afl_AutoController_ROI_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
145  static PEAK_AFL_API_STATUS peak_afl_AutoController_ROI_Set(peak_afl_controller_handle controller, peak_afl_rectangle roi);
146  static PEAK_AFL_API_STATUS peak_afl_AutoController_ROI_Get(peak_afl_controller_handle controller, peak_afl_rectangle * roi);
147  static PEAK_AFL_API_STATUS peak_afl_AutoController_ROI_Preset_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
148  static PEAK_AFL_API_STATUS peak_afl_AutoController_ROI_Preset_Set(peak_afl_controller_handle controller, peak_afl_roi_preset roiPreset);
149  static PEAK_AFL_API_STATUS peak_afl_AutoController_Mode_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
152  static PEAK_AFL_API_STATUS peak_afl_AutoController_Status(peak_afl_controller_handle controller, peak_afl_controller_status * status);
153  static PEAK_AFL_API_STATUS peak_afl_AutoController_GetLastAutoAverage(peak_afl_controller_handle controller, uint8_t * average);
154  static PEAK_AFL_API_STATUS peak_afl_AutoController_GetLastAutoAverages(peak_afl_controller_handle controller, uint8_t * averageRed, uint8_t * averageGreen, uint8_t * averageBlue);
155  static PEAK_AFL_API_STATUS peak_afl_AutoController_AutoTarget_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
156  static PEAK_AFL_API_STATUS peak_afl_AutoController_AutoTarget_Set(peak_afl_controller_handle controller, uint32_t target);
157  static PEAK_AFL_API_STATUS peak_afl_AutoController_AutoTarget_Get(peak_afl_controller_handle controller, uint32_t * target);
158  static PEAK_AFL_API_STATUS peak_afl_AutoController_AutoTarget_GetRange(peak_afl_controller_handle controller, uint32_t * min, uint32_t * max, uint32_t * inc);
159  static PEAK_AFL_API_STATUS peak_afl_AutoController_AutoTolerance_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
160  static PEAK_AFL_API_STATUS peak_afl_AutoController_AutoTolerance_Set(peak_afl_controller_handle controller, uint32_t tolerance);
161  static PEAK_AFL_API_STATUS peak_afl_AutoController_AutoTolerance_Get(peak_afl_controller_handle controller, uint32_t * tolerance);
162  static PEAK_AFL_API_STATUS peak_afl_AutoController_AutoTolerance_GetRange(peak_afl_controller_handle controller, uint32_t * min, uint32_t * max, uint32_t * inc);
163  static PEAK_AFL_API_STATUS peak_afl_AutoController_AutoPercentile_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
164  static PEAK_AFL_API_STATUS peak_afl_AutoController_AutoPercentile_Set(peak_afl_controller_handle controller, double percentile);
165  static PEAK_AFL_API_STATUS peak_afl_AutoController_AutoPercentile_Get(peak_afl_controller_handle controller, double * percentile);
166  static PEAK_AFL_API_STATUS peak_afl_AutoController_AutoPercentile_GetRange(peak_afl_controller_handle controller, double * min, double * max, double * inc);
167  static PEAK_AFL_API_STATUS peak_afl_AutoController_Type_Get(peak_afl_controller_handle controller, peak_afl_controllerType * type);
168  static PEAK_AFL_API_STATUS peak_afl_AutoController_Algorithm_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
170  static PEAK_AFL_API_STATUS peak_afl_AutoController_Algorithm_Get(peak_afl_controller_handle controller, peak_afl_controller_algorithm * algorithm);
171  static PEAK_AFL_API_STATUS peak_afl_AutoController_Algorithm_GetList(peak_afl_controller_handle controller, peak_afl_controller_algorithm * typeList, uint32_t * listSize);
175  static PEAK_AFL_API_STATUS peak_afl_AutoController_SharpnessAlgorithm_GetList(peak_afl_controller_handle controller, peak_afl_controller_sharpness_algorithm * typeList, uint32_t * listSize);
176  static PEAK_AFL_API_STATUS peak_afl_AutoController_Callback_Set(peak_afl_controller_handle controller, peak_afl_callback_type type, void * funcPtr, void * context);
177  static PEAK_AFL_API_STATUS peak_afl_AutoController_Weighted_ROI_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
178  static PEAK_AFL_API_STATUS peak_afl_AutoController_Weighted_ROI_Min_Size(peak_afl_controller_handle controller, peak_afl_size * size);
179  static PEAK_AFL_API_STATUS peak_afl_AutoController_Weighted_ROI_Set(peak_afl_controller_handle controller, const peak_afl_weighted_rectangle * weightedRoiList, uint32_t listSize);
180  static PEAK_AFL_API_STATUS peak_afl_AutoController_Weighted_ROI_Get(peak_afl_controller_handle controller, peak_afl_weighted_rectangle * weightedRoiList, uint32_t * listSize);
181  static PEAK_AFL_API_STATUS peak_afl_AutoController_Limit_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
183  static PEAK_AFL_API_STATUS peak_afl_AutoController_Limit_Set(peak_afl_controller_handle controller, peak_afl_controller_limit limit);
184  static PEAK_AFL_API_STATUS peak_afl_AutoController_Limit_Get(peak_afl_controller_handle controller, peak_afl_controller_limit * limit);
185  static PEAK_AFL_API_STATUS peak_afl_AutoController_Hysteresis_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
186  static PEAK_AFL_API_STATUS peak_afl_AutoController_Hysteresis_Default(peak_afl_controller_handle controller, uint8_t * hysteresis);
187  static PEAK_AFL_API_STATUS peak_afl_AutoController_Hysteresis_Set(peak_afl_controller_handle controller, uint8_t hysteresis);
188  static PEAK_AFL_API_STATUS peak_afl_AutoController_Hysteresis_Get(peak_afl_controller_handle controller, uint8_t * hysteresis);
189  static PEAK_AFL_API_STATUS peak_afl_AutoController_Hysteresis_GetRange(peak_afl_controller_handle controller, uint8_t * min, uint8_t * max, uint8_t * inc);
190 
191 private:
192  void* m_handle = nullptr;
193  dyn_peak_afl_Init m_peak_afl_Init{};
194  dyn_peak_afl_Exit m_peak_afl_Exit{};
195  dyn_peak_afl_GetLastError m_peak_afl_GetLastError{};
196  dyn_peak_afl_GetVersion m_peak_afl_GetVersion{};
197  dyn_peak_afl_AutoFeatureManager_Create m_peak_afl_AutoFeatureManager_Create{};
198  dyn_peak_afl_AutoFeatureManager_Destroy m_peak_afl_AutoFeatureManager_Destroy{};
199  dyn_peak_afl_AutoFeatureManager_AddController m_peak_afl_AutoFeatureManager_AddController{};
200  dyn_peak_afl_AutoFeatureManager_RemoveController m_peak_afl_AutoFeatureManager_RemoveController{};
201  dyn_peak_afl_AutoFeatureManager_Process m_peak_afl_AutoFeatureManager_Process{};
202  dyn_peak_afl_AutoFeatureManager_CreateController m_peak_afl_AutoFeatureManager_CreateController{};
203  dyn_peak_afl_AutoFeatureManager_DestroyAllController m_peak_afl_AutoFeatureManager_DestroyAllController{};
204  dyn_peak_afl_AutoFeatureManager_DestroyController m_peak_afl_AutoFeatureManager_DestroyController{};
205  dyn_peak_afl_AutoFeatureManager_Status m_peak_afl_AutoFeatureManager_Status{};
206  dyn_peak_afl_AutoController_Create m_peak_afl_AutoController_Create{};
207  dyn_peak_afl_AutoController_Destroy m_peak_afl_AutoController_Destroy{};
208  dyn_peak_afl_AutoController_SkipFrames_IsSupported m_peak_afl_AutoController_SkipFrames_IsSupported{};
209  dyn_peak_afl_AutoController_SkipFrames_Set m_peak_afl_AutoController_SkipFrames_Set{};
210  dyn_peak_afl_AutoController_SkipFrames_Get m_peak_afl_AutoController_SkipFrames_Get{};
211  dyn_peak_afl_AutoController_SkipFrames_GetRange m_peak_afl_AutoController_SkipFrames_GetRange{};
212  dyn_peak_afl_AutoController_ROI_IsSupported m_peak_afl_AutoController_ROI_IsSupported{};
213  dyn_peak_afl_AutoController_ROI_Set m_peak_afl_AutoController_ROI_Set{};
214  dyn_peak_afl_AutoController_ROI_Get m_peak_afl_AutoController_ROI_Get{};
215  dyn_peak_afl_AutoController_ROI_Preset_IsSupported m_peak_afl_AutoController_ROI_Preset_IsSupported{};
216  dyn_peak_afl_AutoController_ROI_Preset_Set m_peak_afl_AutoController_ROI_Preset_Set{};
217  dyn_peak_afl_AutoController_Mode_IsSupported m_peak_afl_AutoController_Mode_IsSupported{};
218  dyn_peak_afl_AutoController_Mode_Set m_peak_afl_AutoController_Mode_Set{};
219  dyn_peak_afl_AutoController_Mode_Get m_peak_afl_AutoController_Mode_Get{};
220  dyn_peak_afl_AutoController_Status m_peak_afl_AutoController_Status{};
221  dyn_peak_afl_AutoController_GetLastAutoAverage m_peak_afl_AutoController_GetLastAutoAverage{};
222  dyn_peak_afl_AutoController_GetLastAutoAverages m_peak_afl_AutoController_GetLastAutoAverages{};
223  dyn_peak_afl_AutoController_AutoTarget_IsSupported m_peak_afl_AutoController_AutoTarget_IsSupported{};
224  dyn_peak_afl_AutoController_AutoTarget_Set m_peak_afl_AutoController_AutoTarget_Set{};
225  dyn_peak_afl_AutoController_AutoTarget_Get m_peak_afl_AutoController_AutoTarget_Get{};
226  dyn_peak_afl_AutoController_AutoTarget_GetRange m_peak_afl_AutoController_AutoTarget_GetRange{};
227  dyn_peak_afl_AutoController_AutoTolerance_IsSupported m_peak_afl_AutoController_AutoTolerance_IsSupported{};
228  dyn_peak_afl_AutoController_AutoTolerance_Set m_peak_afl_AutoController_AutoTolerance_Set{};
229  dyn_peak_afl_AutoController_AutoTolerance_Get m_peak_afl_AutoController_AutoTolerance_Get{};
230  dyn_peak_afl_AutoController_AutoTolerance_GetRange m_peak_afl_AutoController_AutoTolerance_GetRange{};
231  dyn_peak_afl_AutoController_AutoPercentile_IsSupported m_peak_afl_AutoController_AutoPercentile_IsSupported{};
232  dyn_peak_afl_AutoController_AutoPercentile_Set m_peak_afl_AutoController_AutoPercentile_Set{};
233  dyn_peak_afl_AutoController_AutoPercentile_Get m_peak_afl_AutoController_AutoPercentile_Get{};
234  dyn_peak_afl_AutoController_AutoPercentile_GetRange m_peak_afl_AutoController_AutoPercentile_GetRange{};
235  dyn_peak_afl_AutoController_Type_Get m_peak_afl_AutoController_Type_Get{};
236  dyn_peak_afl_AutoController_Algorithm_IsSupported m_peak_afl_AutoController_Algorithm_IsSupported{};
237  dyn_peak_afl_AutoController_Algorithm_Set m_peak_afl_AutoController_Algorithm_Set{};
238  dyn_peak_afl_AutoController_Algorithm_Get m_peak_afl_AutoController_Algorithm_Get{};
239  dyn_peak_afl_AutoController_Algorithm_GetList m_peak_afl_AutoController_Algorithm_GetList{};
240  dyn_peak_afl_AutoController_SharpnessAlgorithm_IsSupported m_peak_afl_AutoController_SharpnessAlgorithm_IsSupported{};
241  dyn_peak_afl_AutoController_SharpnessAlgorithm_Set m_peak_afl_AutoController_SharpnessAlgorithm_Set{};
242  dyn_peak_afl_AutoController_SharpnessAlgorithm_Get m_peak_afl_AutoController_SharpnessAlgorithm_Get{};
243  dyn_peak_afl_AutoController_SharpnessAlgorithm_GetList m_peak_afl_AutoController_SharpnessAlgorithm_GetList{};
244  dyn_peak_afl_AutoController_Callback_Set m_peak_afl_AutoController_Callback_Set{};
245  dyn_peak_afl_AutoController_Weighted_ROI_IsSupported m_peak_afl_AutoController_Weighted_ROI_IsSupported{};
246  dyn_peak_afl_AutoController_Weighted_ROI_Min_Size m_peak_afl_AutoController_Weighted_ROI_Min_Size{};
247  dyn_peak_afl_AutoController_Weighted_ROI_Set m_peak_afl_AutoController_Weighted_ROI_Set{};
248  dyn_peak_afl_AutoController_Weighted_ROI_Get m_peak_afl_AutoController_Weighted_ROI_Get{};
249  dyn_peak_afl_AutoController_Limit_IsSupported m_peak_afl_AutoController_Limit_IsSupported{};
250  dyn_peak_afl_AutoController_Limit_Default m_peak_afl_AutoController_Limit_Default{};
251  dyn_peak_afl_AutoController_Limit_Set m_peak_afl_AutoController_Limit_Set{};
252  dyn_peak_afl_AutoController_Limit_Get m_peak_afl_AutoController_Limit_Get{};
253  dyn_peak_afl_AutoController_Hysteresis_IsSupported m_peak_afl_AutoController_Hysteresis_IsSupported{};
254  dyn_peak_afl_AutoController_Hysteresis_Default m_peak_afl_AutoController_Hysteresis_Default{};
255  dyn_peak_afl_AutoController_Hysteresis_Set m_peak_afl_AutoController_Hysteresis_Set{};
256  dyn_peak_afl_AutoController_Hysteresis_Get m_peak_afl_AutoController_Hysteresis_Get{};
257  dyn_peak_afl_AutoController_Hysteresis_GetRange m_peak_afl_AutoController_Hysteresis_GetRange{};
258 
259 };
260 
261 inline void* import_function(void *module, const char* proc_name)
262 {
263 #ifdef __linux__
264  return dlsym(module, proc_name);
265 #else
266  return GetProcAddress(static_cast<HMODULE>(module), proc_name);
267 #endif
268 }
269 
270 inline DynamicLoader::DynamicLoader()
271 {
272 #if defined _WIN32 || defined _WIN64
273  size_t sz = 0;
274  if (_wgetenv_s(&sz, NULL, 0, L"aapienvvarrootpath") == 0
275  && sz > 0)
276  {
277  std::vector<wchar_t> env_peak_afl(sz);
278  if (_wgetenv_s(&sz, env_peak_afl.data(), sz, L"aapienvvarrootpath") == 0)
279  {
280  if (_wgetenv_s(&sz, NULL, 0, L"PATH") == 0
281  && sz > 0)
282  {
283  std::vector<wchar_t> env_path(sz);
284  if (_wgetenv_s(&sz, env_path.data(), sz, L"PATH") == 0)
285  {
286  std::wstring peak_afl_path(env_peak_afl.data());
287 #ifdef _WIN64
288  peak_afl_path.append(L"\\aapi\\lib\\x86_64");
289 #else
290  peak_afl_path.append(L"\\aapi\\lib\\x86_32");
291 #endif
292  std::wstring path_var(env_path.data());
293  path_var.append(L";").append(peak_afl_path);
294  _wputenv_s(L"PATH", path_var.c_str());
295  }
296  }
297  }
298  }
299 
300  loadLib("peak_afl.dll");
301 #else
302  loadLib("libpeak_afl.so");
303 #endif
304 }
305 
306 inline DynamicLoader::~DynamicLoader()
307 {
308  if(m_handle != nullptr)
309  {
310  unload();
311  }
312 }
313 
314 inline bool DynamicLoader::isLoaded()
315 {
316  auto&& inst = instance();
317  return inst.m_handle != nullptr;
318 }
319 
320 inline void DynamicLoader::unload()
321 {
322  setPointers(false);
323 
324  if (m_handle != nullptr)
325  {
326 #ifdef __linux__
327  dlclose(m_handle);
328 #else
329  FreeLibrary(static_cast<HMODULE>(m_handle));
330 #endif
331  }
332  m_handle = nullptr;
333 }
334 
335 
336 inline bool DynamicLoader::loadLib(const char* file)
337 {
338  bool ret = false;
339 
340  if (file)
341  {
342 #ifdef __linux__
343  m_handle = dlopen(file, RTLD_NOW);
344 #else
345  m_handle = LoadLibraryA(file);
346 #endif
347  if (m_handle != nullptr)
348  {
349  try {
350  setPointers(true);
351  ret = true;
352  } catch (const std::exception&) {
353  unload();
354  throw;
355  }
356  }
357  else
358  {
359  throw std::runtime_error(std::string("Lib load failed: ") + file);
360  }
361  }
362  else
363  {
364  throw std::runtime_error("Filename empty");
365  }
366 
367  return ret;
368 }
369 
370 inline bool DynamicLoader::setPointers(bool load)
371 {
372 
373  m_peak_afl_Init = (dyn_peak_afl_Init) (load ? import_function(m_handle, "peak_afl_Init") : nullptr);
374  if(m_peak_afl_Init == nullptr && load)
375  {
376  throw std::runtime_error("Failed to load peak_afl_Init");
377  }
378 
379  m_peak_afl_Exit = (dyn_peak_afl_Exit) (load ? import_function(m_handle, "peak_afl_Exit") : nullptr);
380  if(m_peak_afl_Exit == nullptr && load)
381  {
382  throw std::runtime_error("Failed to load peak_afl_Exit");
383  }
384 
385  m_peak_afl_GetLastError = (dyn_peak_afl_GetLastError) (load ? import_function(m_handle, "peak_afl_GetLastError") : nullptr);
386  if(m_peak_afl_GetLastError == nullptr && load)
387  {
388  throw std::runtime_error("Failed to load peak_afl_GetLastError");
389  }
390 
391  m_peak_afl_GetVersion = (dyn_peak_afl_GetVersion) (load ? import_function(m_handle, "peak_afl_GetVersion") : nullptr);
392  if(m_peak_afl_GetVersion == nullptr && load)
393  {
394  throw std::runtime_error("Failed to load peak_afl_GetVersion");
395  }
396 
397  m_peak_afl_AutoFeatureManager_Create = (dyn_peak_afl_AutoFeatureManager_Create) (load ? import_function(m_handle, "peak_afl_AutoFeatureManager_Create") : nullptr);
398  if(m_peak_afl_AutoFeatureManager_Create == nullptr && load)
399  {
400  throw std::runtime_error("Failed to load peak_afl_AutoFeatureManager_Create");
401  }
402 
403  m_peak_afl_AutoFeatureManager_Destroy = (dyn_peak_afl_AutoFeatureManager_Destroy) (load ? import_function(m_handle, "peak_afl_AutoFeatureManager_Destroy") : nullptr);
404  if(m_peak_afl_AutoFeatureManager_Destroy == nullptr && load)
405  {
406  throw std::runtime_error("Failed to load peak_afl_AutoFeatureManager_Destroy");
407  }
408 
409  m_peak_afl_AutoFeatureManager_AddController = (dyn_peak_afl_AutoFeatureManager_AddController) (load ? import_function(m_handle, "peak_afl_AutoFeatureManager_AddController") : nullptr);
410  if(m_peak_afl_AutoFeatureManager_AddController == nullptr && load)
411  {
412  throw std::runtime_error("Failed to load peak_afl_AutoFeatureManager_AddController");
413  }
414 
415  m_peak_afl_AutoFeatureManager_RemoveController = (dyn_peak_afl_AutoFeatureManager_RemoveController) (load ? import_function(m_handle, "peak_afl_AutoFeatureManager_RemoveController") : nullptr);
416  if(m_peak_afl_AutoFeatureManager_RemoveController == nullptr && load)
417  {
418  throw std::runtime_error("Failed to load peak_afl_AutoFeatureManager_RemoveController");
419  }
420 
421  m_peak_afl_AutoFeatureManager_Process = (dyn_peak_afl_AutoFeatureManager_Process) (load ? import_function(m_handle, "peak_afl_AutoFeatureManager_Process") : nullptr);
422  if(m_peak_afl_AutoFeatureManager_Process == nullptr && load)
423  {
424  throw std::runtime_error("Failed to load peak_afl_AutoFeatureManager_Process");
425  }
426 
427  m_peak_afl_AutoFeatureManager_CreateController = (dyn_peak_afl_AutoFeatureManager_CreateController) (load ? import_function(m_handle, "peak_afl_AutoFeatureManager_CreateController") : nullptr);
428  if(m_peak_afl_AutoFeatureManager_CreateController == nullptr && load)
429  {
430  throw std::runtime_error("Failed to load peak_afl_AutoFeatureManager_CreateController");
431  }
432 
433  m_peak_afl_AutoFeatureManager_DestroyAllController = (dyn_peak_afl_AutoFeatureManager_DestroyAllController) (load ? import_function(m_handle, "peak_afl_AutoFeatureManager_DestroyAllController") : nullptr);
434  if(m_peak_afl_AutoFeatureManager_DestroyAllController == nullptr && load)
435  {
436  throw std::runtime_error("Failed to load peak_afl_AutoFeatureManager_DestroyAllController");
437  }
438 
439  m_peak_afl_AutoFeatureManager_DestroyController = (dyn_peak_afl_AutoFeatureManager_DestroyController) (load ? import_function(m_handle, "peak_afl_AutoFeatureManager_DestroyController") : nullptr);
440  if(m_peak_afl_AutoFeatureManager_DestroyController == nullptr && load)
441  {
442  throw std::runtime_error("Failed to load peak_afl_AutoFeatureManager_DestroyController");
443  }
444 
445  m_peak_afl_AutoFeatureManager_Status = (dyn_peak_afl_AutoFeatureManager_Status) (load ? import_function(m_handle, "peak_afl_AutoFeatureManager_Status") : nullptr);
446  if(m_peak_afl_AutoFeatureManager_Status == nullptr && load)
447  {
448  throw std::runtime_error("Failed to load peak_afl_AutoFeatureManager_Status");
449  }
450 
451  m_peak_afl_AutoController_Create = (dyn_peak_afl_AutoController_Create) (load ? import_function(m_handle, "peak_afl_AutoController_Create") : nullptr);
452  if(m_peak_afl_AutoController_Create == nullptr && load)
453  {
454  throw std::runtime_error("Failed to load peak_afl_AutoController_Create");
455  }
456 
457  m_peak_afl_AutoController_Destroy = (dyn_peak_afl_AutoController_Destroy) (load ? import_function(m_handle, "peak_afl_AutoController_Destroy") : nullptr);
458  if(m_peak_afl_AutoController_Destroy == nullptr && load)
459  {
460  throw std::runtime_error("Failed to load peak_afl_AutoController_Destroy");
461  }
462 
463  m_peak_afl_AutoController_SkipFrames_IsSupported = (dyn_peak_afl_AutoController_SkipFrames_IsSupported) (load ? import_function(m_handle, "peak_afl_AutoController_SkipFrames_IsSupported") : nullptr);
464  if(m_peak_afl_AutoController_SkipFrames_IsSupported == nullptr && load)
465  {
466  throw std::runtime_error("Failed to load peak_afl_AutoController_SkipFrames_IsSupported");
467  }
468 
469  m_peak_afl_AutoController_SkipFrames_Set = (dyn_peak_afl_AutoController_SkipFrames_Set) (load ? import_function(m_handle, "peak_afl_AutoController_SkipFrames_Set") : nullptr);
470  if(m_peak_afl_AutoController_SkipFrames_Set == nullptr && load)
471  {
472  throw std::runtime_error("Failed to load peak_afl_AutoController_SkipFrames_Set");
473  }
474 
475  m_peak_afl_AutoController_SkipFrames_Get = (dyn_peak_afl_AutoController_SkipFrames_Get) (load ? import_function(m_handle, "peak_afl_AutoController_SkipFrames_Get") : nullptr);
476  if(m_peak_afl_AutoController_SkipFrames_Get == nullptr && load)
477  {
478  throw std::runtime_error("Failed to load peak_afl_AutoController_SkipFrames_Get");
479  }
480 
481  m_peak_afl_AutoController_SkipFrames_GetRange = (dyn_peak_afl_AutoController_SkipFrames_GetRange) (load ? import_function(m_handle, "peak_afl_AutoController_SkipFrames_GetRange") : nullptr);
482  if(m_peak_afl_AutoController_SkipFrames_GetRange == nullptr && load)
483  {
484  throw std::runtime_error("Failed to load peak_afl_AutoController_SkipFrames_GetRange");
485  }
486 
487  m_peak_afl_AutoController_ROI_IsSupported = (dyn_peak_afl_AutoController_ROI_IsSupported) (load ? import_function(m_handle, "peak_afl_AutoController_ROI_IsSupported") : nullptr);
488  if(m_peak_afl_AutoController_ROI_IsSupported == nullptr && load)
489  {
490  throw std::runtime_error("Failed to load peak_afl_AutoController_ROI_IsSupported");
491  }
492 
493  m_peak_afl_AutoController_ROI_Set = (dyn_peak_afl_AutoController_ROI_Set) (load ? import_function(m_handle, "peak_afl_AutoController_ROI_Set") : nullptr);
494  if(m_peak_afl_AutoController_ROI_Set == nullptr && load)
495  {
496  throw std::runtime_error("Failed to load peak_afl_AutoController_ROI_Set");
497  }
498 
499  m_peak_afl_AutoController_ROI_Get = (dyn_peak_afl_AutoController_ROI_Get) (load ? import_function(m_handle, "peak_afl_AutoController_ROI_Get") : nullptr);
500  if(m_peak_afl_AutoController_ROI_Get == nullptr && load)
501  {
502  throw std::runtime_error("Failed to load peak_afl_AutoController_ROI_Get");
503  }
504 
505  m_peak_afl_AutoController_ROI_Preset_IsSupported = (dyn_peak_afl_AutoController_ROI_Preset_IsSupported) (load ? import_function(m_handle, "peak_afl_AutoController_ROI_Preset_IsSupported") : nullptr);
506  if(m_peak_afl_AutoController_ROI_Preset_IsSupported == nullptr && load)
507  {
508  throw std::runtime_error("Failed to load peak_afl_AutoController_ROI_Preset_IsSupported");
509  }
510 
511  m_peak_afl_AutoController_ROI_Preset_Set = (dyn_peak_afl_AutoController_ROI_Preset_Set) (load ? import_function(m_handle, "peak_afl_AutoController_ROI_Preset_Set") : nullptr);
512  if(m_peak_afl_AutoController_ROI_Preset_Set == nullptr && load)
513  {
514  throw std::runtime_error("Failed to load peak_afl_AutoController_ROI_Preset_Set");
515  }
516 
517  m_peak_afl_AutoController_Mode_IsSupported = (dyn_peak_afl_AutoController_Mode_IsSupported) (load ? import_function(m_handle, "peak_afl_AutoController_Mode_IsSupported") : nullptr);
518  if(m_peak_afl_AutoController_Mode_IsSupported == nullptr && load)
519  {
520  throw std::runtime_error("Failed to load peak_afl_AutoController_Mode_IsSupported");
521  }
522 
523  m_peak_afl_AutoController_Mode_Set = (dyn_peak_afl_AutoController_Mode_Set) (load ? import_function(m_handle, "peak_afl_AutoController_Mode_Set") : nullptr);
524  if(m_peak_afl_AutoController_Mode_Set == nullptr && load)
525  {
526  throw std::runtime_error("Failed to load peak_afl_AutoController_Mode_Set");
527  }
528 
529  m_peak_afl_AutoController_Mode_Get = (dyn_peak_afl_AutoController_Mode_Get) (load ? import_function(m_handle, "peak_afl_AutoController_Mode_Get") : nullptr);
530  if(m_peak_afl_AutoController_Mode_Get == nullptr && load)
531  {
532  throw std::runtime_error("Failed to load peak_afl_AutoController_Mode_Get");
533  }
534 
535  m_peak_afl_AutoController_Status = (dyn_peak_afl_AutoController_Status) (load ? import_function(m_handle, "peak_afl_AutoController_Status") : nullptr);
536  if(m_peak_afl_AutoController_Status == nullptr && load)
537  {
538  throw std::runtime_error("Failed to load peak_afl_AutoController_Status");
539  }
540 
541  m_peak_afl_AutoController_GetLastAutoAverage = (dyn_peak_afl_AutoController_GetLastAutoAverage) (load ? import_function(m_handle, "peak_afl_AutoController_GetLastAutoAverage") : nullptr);
542  if(m_peak_afl_AutoController_GetLastAutoAverage == nullptr && load)
543  {
544  throw std::runtime_error("Failed to load peak_afl_AutoController_GetLastAutoAverage");
545  }
546 
547  m_peak_afl_AutoController_GetLastAutoAverages = (dyn_peak_afl_AutoController_GetLastAutoAverages) (load ? import_function(m_handle, "peak_afl_AutoController_GetLastAutoAverages") : nullptr);
548  if(m_peak_afl_AutoController_GetLastAutoAverages == nullptr && load)
549  {
550  throw std::runtime_error("Failed to load peak_afl_AutoController_GetLastAutoAverages");
551  }
552 
553  m_peak_afl_AutoController_AutoTarget_IsSupported = (dyn_peak_afl_AutoController_AutoTarget_IsSupported) (load ? import_function(m_handle, "peak_afl_AutoController_AutoTarget_IsSupported") : nullptr);
554  if(m_peak_afl_AutoController_AutoTarget_IsSupported == nullptr && load)
555  {
556  throw std::runtime_error("Failed to load peak_afl_AutoController_AutoTarget_IsSupported");
557  }
558 
559  m_peak_afl_AutoController_AutoTarget_Set = (dyn_peak_afl_AutoController_AutoTarget_Set) (load ? import_function(m_handle, "peak_afl_AutoController_AutoTarget_Set") : nullptr);
560  if(m_peak_afl_AutoController_AutoTarget_Set == nullptr && load)
561  {
562  throw std::runtime_error("Failed to load peak_afl_AutoController_AutoTarget_Set");
563  }
564 
565  m_peak_afl_AutoController_AutoTarget_Get = (dyn_peak_afl_AutoController_AutoTarget_Get) (load ? import_function(m_handle, "peak_afl_AutoController_AutoTarget_Get") : nullptr);
566  if(m_peak_afl_AutoController_AutoTarget_Get == nullptr && load)
567  {
568  throw std::runtime_error("Failed to load peak_afl_AutoController_AutoTarget_Get");
569  }
570 
571  m_peak_afl_AutoController_AutoTarget_GetRange = (dyn_peak_afl_AutoController_AutoTarget_GetRange) (load ? import_function(m_handle, "peak_afl_AutoController_AutoTarget_GetRange") : nullptr);
572  if(m_peak_afl_AutoController_AutoTarget_GetRange == nullptr && load)
573  {
574  throw std::runtime_error("Failed to load peak_afl_AutoController_AutoTarget_GetRange");
575  }
576 
577  m_peak_afl_AutoController_AutoTolerance_IsSupported = (dyn_peak_afl_AutoController_AutoTolerance_IsSupported) (load ? import_function(m_handle, "peak_afl_AutoController_AutoTolerance_IsSupported") : nullptr);
578  if(m_peak_afl_AutoController_AutoTolerance_IsSupported == nullptr && load)
579  {
580  throw std::runtime_error("Failed to load peak_afl_AutoController_AutoTolerance_IsSupported");
581  }
582 
583  m_peak_afl_AutoController_AutoTolerance_Set = (dyn_peak_afl_AutoController_AutoTolerance_Set) (load ? import_function(m_handle, "peak_afl_AutoController_AutoTolerance_Set") : nullptr);
584  if(m_peak_afl_AutoController_AutoTolerance_Set == nullptr && load)
585  {
586  throw std::runtime_error("Failed to load peak_afl_AutoController_AutoTolerance_Set");
587  }
588 
589  m_peak_afl_AutoController_AutoTolerance_Get = (dyn_peak_afl_AutoController_AutoTolerance_Get) (load ? import_function(m_handle, "peak_afl_AutoController_AutoTolerance_Get") : nullptr);
590  if(m_peak_afl_AutoController_AutoTolerance_Get == nullptr && load)
591  {
592  throw std::runtime_error("Failed to load peak_afl_AutoController_AutoTolerance_Get");
593  }
594 
595  m_peak_afl_AutoController_AutoTolerance_GetRange = (dyn_peak_afl_AutoController_AutoTolerance_GetRange) (load ? import_function(m_handle, "peak_afl_AutoController_AutoTolerance_GetRange") : nullptr);
596  if(m_peak_afl_AutoController_AutoTolerance_GetRange == nullptr && load)
597  {
598  throw std::runtime_error("Failed to load peak_afl_AutoController_AutoTolerance_GetRange");
599  }
600 
601  m_peak_afl_AutoController_AutoPercentile_IsSupported = (dyn_peak_afl_AutoController_AutoPercentile_IsSupported) (load ? import_function(m_handle, "peak_afl_AutoController_AutoPercentile_IsSupported") : nullptr);
602  if(m_peak_afl_AutoController_AutoPercentile_IsSupported == nullptr && load)
603  {
604  throw std::runtime_error("Failed to load peak_afl_AutoController_AutoPercentile_IsSupported");
605  }
606 
607  m_peak_afl_AutoController_AutoPercentile_Set = (dyn_peak_afl_AutoController_AutoPercentile_Set) (load ? import_function(m_handle, "peak_afl_AutoController_AutoPercentile_Set") : nullptr);
608  if(m_peak_afl_AutoController_AutoPercentile_Set == nullptr && load)
609  {
610  throw std::runtime_error("Failed to load peak_afl_AutoController_AutoPercentile_Set");
611  }
612 
613  m_peak_afl_AutoController_AutoPercentile_Get = (dyn_peak_afl_AutoController_AutoPercentile_Get) (load ? import_function(m_handle, "peak_afl_AutoController_AutoPercentile_Get") : nullptr);
614  if(m_peak_afl_AutoController_AutoPercentile_Get == nullptr && load)
615  {
616  throw std::runtime_error("Failed to load peak_afl_AutoController_AutoPercentile_Get");
617  }
618 
619  m_peak_afl_AutoController_AutoPercentile_GetRange = (dyn_peak_afl_AutoController_AutoPercentile_GetRange) (load ? import_function(m_handle, "peak_afl_AutoController_AutoPercentile_GetRange") : nullptr);
620  if(m_peak_afl_AutoController_AutoPercentile_GetRange == nullptr && load)
621  {
622  throw std::runtime_error("Failed to load peak_afl_AutoController_AutoPercentile_GetRange");
623  }
624 
625  m_peak_afl_AutoController_Type_Get = (dyn_peak_afl_AutoController_Type_Get) (load ? import_function(m_handle, "peak_afl_AutoController_Type_Get") : nullptr);
626  if(m_peak_afl_AutoController_Type_Get == nullptr && load)
627  {
628  throw std::runtime_error("Failed to load peak_afl_AutoController_Type_Get");
629  }
630 
631  m_peak_afl_AutoController_Algorithm_IsSupported = (dyn_peak_afl_AutoController_Algorithm_IsSupported) (load ? import_function(m_handle, "peak_afl_AutoController_Algorithm_IsSupported") : nullptr);
632  if(m_peak_afl_AutoController_Algorithm_IsSupported == nullptr && load)
633  {
634  throw std::runtime_error("Failed to load peak_afl_AutoController_Algorithm_IsSupported");
635  }
636 
637  m_peak_afl_AutoController_Algorithm_Set = (dyn_peak_afl_AutoController_Algorithm_Set) (load ? import_function(m_handle, "peak_afl_AutoController_Algorithm_Set") : nullptr);
638  if(m_peak_afl_AutoController_Algorithm_Set == nullptr && load)
639  {
640  throw std::runtime_error("Failed to load peak_afl_AutoController_Algorithm_Set");
641  }
642 
643  m_peak_afl_AutoController_Algorithm_Get = (dyn_peak_afl_AutoController_Algorithm_Get) (load ? import_function(m_handle, "peak_afl_AutoController_Algorithm_Get") : nullptr);
644  if(m_peak_afl_AutoController_Algorithm_Get == nullptr && load)
645  {
646  throw std::runtime_error("Failed to load peak_afl_AutoController_Algorithm_Get");
647  }
648 
649  m_peak_afl_AutoController_Algorithm_GetList = (dyn_peak_afl_AutoController_Algorithm_GetList) (load ? import_function(m_handle, "peak_afl_AutoController_Algorithm_GetList") : nullptr);
650  if(m_peak_afl_AutoController_Algorithm_GetList == nullptr && load)
651  {
652  throw std::runtime_error("Failed to load peak_afl_AutoController_Algorithm_GetList");
653  }
654 
655  m_peak_afl_AutoController_SharpnessAlgorithm_IsSupported = (dyn_peak_afl_AutoController_SharpnessAlgorithm_IsSupported) (load ? import_function(m_handle, "peak_afl_AutoController_SharpnessAlgorithm_IsSupported") : nullptr);
656  if(m_peak_afl_AutoController_SharpnessAlgorithm_IsSupported == nullptr && load)
657  {
658  throw std::runtime_error("Failed to load peak_afl_AutoController_SharpnessAlgorithm_IsSupported");
659  }
660 
661  m_peak_afl_AutoController_SharpnessAlgorithm_Set = (dyn_peak_afl_AutoController_SharpnessAlgorithm_Set) (load ? import_function(m_handle, "peak_afl_AutoController_SharpnessAlgorithm_Set") : nullptr);
662  if(m_peak_afl_AutoController_SharpnessAlgorithm_Set == nullptr && load)
663  {
664  throw std::runtime_error("Failed to load peak_afl_AutoController_SharpnessAlgorithm_Set");
665  }
666 
667  m_peak_afl_AutoController_SharpnessAlgorithm_Get = (dyn_peak_afl_AutoController_SharpnessAlgorithm_Get) (load ? import_function(m_handle, "peak_afl_AutoController_SharpnessAlgorithm_Get") : nullptr);
668  if(m_peak_afl_AutoController_SharpnessAlgorithm_Get == nullptr && load)
669  {
670  throw std::runtime_error("Failed to load peak_afl_AutoController_SharpnessAlgorithm_Get");
671  }
672 
673  m_peak_afl_AutoController_SharpnessAlgorithm_GetList = (dyn_peak_afl_AutoController_SharpnessAlgorithm_GetList) (load ? import_function(m_handle, "peak_afl_AutoController_SharpnessAlgorithm_GetList") : nullptr);
674  if(m_peak_afl_AutoController_SharpnessAlgorithm_GetList == nullptr && load)
675  {
676  throw std::runtime_error("Failed to load peak_afl_AutoController_SharpnessAlgorithm_GetList");
677  }
678 
679  m_peak_afl_AutoController_Callback_Set = (dyn_peak_afl_AutoController_Callback_Set) (load ? import_function(m_handle, "peak_afl_AutoController_Callback_Set") : nullptr);
680  if(m_peak_afl_AutoController_Callback_Set == nullptr && load)
681  {
682  throw std::runtime_error("Failed to load peak_afl_AutoController_Callback_Set");
683  }
684 
685  m_peak_afl_AutoController_Weighted_ROI_IsSupported = (dyn_peak_afl_AutoController_Weighted_ROI_IsSupported) (load ? import_function(m_handle, "peak_afl_AutoController_Weighted_ROI_IsSupported") : nullptr);
686  if(m_peak_afl_AutoController_Weighted_ROI_IsSupported == nullptr && load)
687  {
688  throw std::runtime_error("Failed to load peak_afl_AutoController_Weighted_ROI_IsSupported");
689  }
690 
691  m_peak_afl_AutoController_Weighted_ROI_Min_Size = (dyn_peak_afl_AutoController_Weighted_ROI_Min_Size) (load ? import_function(m_handle, "peak_afl_AutoController_Weighted_ROI_Min_Size") : nullptr);
692  if(m_peak_afl_AutoController_Weighted_ROI_Min_Size == nullptr && load)
693  {
694  throw std::runtime_error("Failed to load peak_afl_AutoController_Weighted_ROI_Min_Size");
695  }
696 
697  m_peak_afl_AutoController_Weighted_ROI_Set = (dyn_peak_afl_AutoController_Weighted_ROI_Set) (load ? import_function(m_handle, "peak_afl_AutoController_Weighted_ROI_Set") : nullptr);
698  if(m_peak_afl_AutoController_Weighted_ROI_Set == nullptr && load)
699  {
700  throw std::runtime_error("Failed to load peak_afl_AutoController_Weighted_ROI_Set");
701  }
702 
703  m_peak_afl_AutoController_Weighted_ROI_Get = (dyn_peak_afl_AutoController_Weighted_ROI_Get) (load ? import_function(m_handle, "peak_afl_AutoController_Weighted_ROI_Get") : nullptr);
704  if(m_peak_afl_AutoController_Weighted_ROI_Get == nullptr && load)
705  {
706  throw std::runtime_error("Failed to load peak_afl_AutoController_Weighted_ROI_Get");
707  }
708 
709  m_peak_afl_AutoController_Limit_IsSupported = (dyn_peak_afl_AutoController_Limit_IsSupported) (load ? import_function(m_handle, "peak_afl_AutoController_Limit_IsSupported") : nullptr);
710  if(m_peak_afl_AutoController_Limit_IsSupported == nullptr && load)
711  {
712  throw std::runtime_error("Failed to load peak_afl_AutoController_Limit_IsSupported");
713  }
714 
715  m_peak_afl_AutoController_Limit_Default = (dyn_peak_afl_AutoController_Limit_Default) (load ? import_function(m_handle, "peak_afl_AutoController_Limit_Default") : nullptr);
716  if(m_peak_afl_AutoController_Limit_Default == nullptr && load)
717  {
718  throw std::runtime_error("Failed to load peak_afl_AutoController_Limit_Default");
719  }
720 
721  m_peak_afl_AutoController_Limit_Set = (dyn_peak_afl_AutoController_Limit_Set) (load ? import_function(m_handle, "peak_afl_AutoController_Limit_Set") : nullptr);
722  if(m_peak_afl_AutoController_Limit_Set == nullptr && load)
723  {
724  throw std::runtime_error("Failed to load peak_afl_AutoController_Limit_Set");
725  }
726 
727  m_peak_afl_AutoController_Limit_Get = (dyn_peak_afl_AutoController_Limit_Get) (load ? import_function(m_handle, "peak_afl_AutoController_Limit_Get") : nullptr);
728  if(m_peak_afl_AutoController_Limit_Get == nullptr && load)
729  {
730  throw std::runtime_error("Failed to load peak_afl_AutoController_Limit_Get");
731  }
732 
733  m_peak_afl_AutoController_Hysteresis_IsSupported = (dyn_peak_afl_AutoController_Hysteresis_IsSupported) (load ? import_function(m_handle, "peak_afl_AutoController_Hysteresis_IsSupported") : nullptr);
734  if(m_peak_afl_AutoController_Hysteresis_IsSupported == nullptr && load)
735  {
736  throw std::runtime_error("Failed to load peak_afl_AutoController_Hysteresis_IsSupported");
737  }
738 
739  m_peak_afl_AutoController_Hysteresis_Default = (dyn_peak_afl_AutoController_Hysteresis_Default) (load ? import_function(m_handle, "peak_afl_AutoController_Hysteresis_Default") : nullptr);
740  if(m_peak_afl_AutoController_Hysteresis_Default == nullptr && load)
741  {
742  throw std::runtime_error("Failed to load peak_afl_AutoController_Hysteresis_Default");
743  }
744 
745  m_peak_afl_AutoController_Hysteresis_Set = (dyn_peak_afl_AutoController_Hysteresis_Set) (load ? import_function(m_handle, "peak_afl_AutoController_Hysteresis_Set") : nullptr);
746  if(m_peak_afl_AutoController_Hysteresis_Set == nullptr && load)
747  {
748  throw std::runtime_error("Failed to load peak_afl_AutoController_Hysteresis_Set");
749  }
750 
751  m_peak_afl_AutoController_Hysteresis_Get = (dyn_peak_afl_AutoController_Hysteresis_Get) (load ? import_function(m_handle, "peak_afl_AutoController_Hysteresis_Get") : nullptr);
752  if(m_peak_afl_AutoController_Hysteresis_Get == nullptr && load)
753  {
754  throw std::runtime_error("Failed to load peak_afl_AutoController_Hysteresis_Get");
755  }
756 
757  m_peak_afl_AutoController_Hysteresis_GetRange = (dyn_peak_afl_AutoController_Hysteresis_GetRange) (load ? import_function(m_handle, "peak_afl_AutoController_Hysteresis_GetRange") : nullptr);
758  if(m_peak_afl_AutoController_Hysteresis_GetRange == nullptr && load)
759  {
760  throw std::runtime_error("Failed to load peak_afl_AutoController_Hysteresis_GetRange");
761  }
762 
763 
764  return true;
765 }
766 
767 inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_Init(void )
768 {
769  auto& inst = instance();
770  if(inst.m_peak_afl_Init)
771  {
772  return inst.m_peak_afl_Init();
773  }
774  else
775  {
776  throw std::runtime_error("Library not loaded!");
777  }
778 }
779 
780 inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_Exit(void )
781 {
782  auto& inst = instance();
783  if(inst.m_peak_afl_Exit)
784  {
785  return inst.m_peak_afl_Exit();
786  }
787  else
788  {
789  throw std::runtime_error("Library not loaded!");
790  }
791 }
792 
793 inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_GetLastError(peak_afl_status * lastErrorCode, char * lastErrorMessage, size_t * lastErrorMessageSize)
794 {
795  auto& inst = instance();
796  if(inst.m_peak_afl_GetLastError)
797  {
798  return inst.m_peak_afl_GetLastError(lastErrorCode, lastErrorMessage, lastErrorMessageSize);
799  }
800  else
801  {
802  throw std::runtime_error("Library not loaded!");
803  }
804 }
805 
806 inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_GetVersion(uint32_t * majorVersion, uint32_t * minorVersion, uint32_t * subminorVersion, uint32_t * patchVersion)
807 {
808  auto& inst = instance();
809  if(inst.m_peak_afl_GetVersion)
810  {
811  return inst.m_peak_afl_GetVersion(majorVersion, minorVersion, subminorVersion, patchVersion);
812  }
813  else
814  {
815  throw std::runtime_error("Library not loaded!");
816  }
817 }
818 
819 inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoFeatureManager_Create(peak_afl_manager_handle * handle, PEAK_NODE_MAP_HANDLE nodeMapHandle)
820 {
821  auto& inst = instance();
822  if(inst.m_peak_afl_AutoFeatureManager_Create)
823  {
824  return inst.m_peak_afl_AutoFeatureManager_Create(handle, nodeMapHandle);
825  }
826  else
827  {
828  throw std::runtime_error("Library not loaded!");
829  }
830 }
831 
833 {
834  auto& inst = instance();
835  if(inst.m_peak_afl_AutoFeatureManager_Destroy)
836  {
837  return inst.m_peak_afl_AutoFeatureManager_Destroy(handle);
838  }
839  else
840  {
841  throw std::runtime_error("Library not loaded!");
842  }
843 }
844 
846 {
847  auto& inst = instance();
848  if(inst.m_peak_afl_AutoFeatureManager_AddController)
849  {
850  return inst.m_peak_afl_AutoFeatureManager_AddController(handle, controller);
851  }
852  else
853  {
854  throw std::runtime_error("Library not loaded!");
855  }
856 }
857 
859 {
860  auto& inst = instance();
861  if(inst.m_peak_afl_AutoFeatureManager_RemoveController)
862  {
863  return inst.m_peak_afl_AutoFeatureManager_RemoveController(handle, controller);
864  }
865  else
866  {
867  throw std::runtime_error("Library not loaded!");
868  }
869 }
870 
871 inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoFeatureManager_Process(peak_afl_manager_handle handle, PEAK_IPL_IMAGE_HANDLE imageHandle)
872 {
873  auto& inst = instance();
874  if(inst.m_peak_afl_AutoFeatureManager_Process)
875  {
876  return inst.m_peak_afl_AutoFeatureManager_Process(handle, imageHandle);
877  }
878  else
879  {
880  throw std::runtime_error("Library not loaded!");
881  }
882 }
883 
885 {
886  auto& inst = instance();
887  if(inst.m_peak_afl_AutoFeatureManager_CreateController)
888  {
889  return inst.m_peak_afl_AutoFeatureManager_CreateController(handle, controller, controllerType);
890  }
891  else
892  {
893  throw std::runtime_error("Library not loaded!");
894  }
895 }
896 
898 {
899  auto& inst = instance();
900  if(inst.m_peak_afl_AutoFeatureManager_DestroyAllController)
901  {
902  return inst.m_peak_afl_AutoFeatureManager_DestroyAllController(handle);
903  }
904  else
905  {
906  throw std::runtime_error("Library not loaded!");
907  }
908 }
909 
911 {
912  auto& inst = instance();
913  if(inst.m_peak_afl_AutoFeatureManager_DestroyController)
914  {
915  return inst.m_peak_afl_AutoFeatureManager_DestroyController(handle, controller);
916  }
917  else
918  {
919  throw std::runtime_error("Library not loaded!");
920  }
921 }
922 
924 {
925  auto& inst = instance();
926  if(inst.m_peak_afl_AutoFeatureManager_Status)
927  {
928  return inst.m_peak_afl_AutoFeatureManager_Status(handle, running);
929  }
930  else
931  {
932  throw std::runtime_error("Library not loaded!");
933  }
934 }
935 
936 inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_Create(peak_afl_controller_handle * controller, peak_afl_controllerType controllerType)
937 {
938  auto& inst = instance();
939  if(inst.m_peak_afl_AutoController_Create)
940  {
941  return inst.m_peak_afl_AutoController_Create(controller, controllerType);
942  }
943  else
944  {
945  throw std::runtime_error("Library not loaded!");
946  }
947 }
948 
950 {
951  auto& inst = instance();
952  if(inst.m_peak_afl_AutoController_Destroy)
953  {
954  return inst.m_peak_afl_AutoController_Destroy(controller);
955  }
956  else
957  {
958  throw std::runtime_error("Library not loaded!");
959  }
960 }
961 
963 {
964  auto& inst = instance();
965  if(inst.m_peak_afl_AutoController_SkipFrames_IsSupported)
966  {
967  return inst.m_peak_afl_AutoController_SkipFrames_IsSupported(controller, supported);
968  }
969  else
970  {
971  throw std::runtime_error("Library not loaded!");
972  }
973 }
974 
975 inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_SkipFrames_Set(peak_afl_controller_handle controller, uint32_t count)
976 {
977  auto& inst = instance();
978  if(inst.m_peak_afl_AutoController_SkipFrames_Set)
979  {
980  return inst.m_peak_afl_AutoController_SkipFrames_Set(controller, count);
981  }
982  else
983  {
984  throw std::runtime_error("Library not loaded!");
985  }
986 }
987 
988 inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_SkipFrames_Get(peak_afl_controller_handle controller, uint32_t * count)
989 {
990  auto& inst = instance();
991  if(inst.m_peak_afl_AutoController_SkipFrames_Get)
992  {
993  return inst.m_peak_afl_AutoController_SkipFrames_Get(controller, count);
994  }
995  else
996  {
997  throw std::runtime_error("Library not loaded!");
998  }
999 }
1000 
1001 inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_SkipFrames_GetRange(peak_afl_controller_handle controller, uint32_t * min, uint32_t * max, uint32_t * inc)
1002 {
1003  auto& inst = instance();
1004  if(inst.m_peak_afl_AutoController_SkipFrames_GetRange)
1005  {
1006  return inst.m_peak_afl_AutoController_SkipFrames_GetRange(controller, min, max, inc);
1007  }
1008  else
1009  {
1010  throw std::runtime_error("Library not loaded!");
1011  }
1012 }
1013 
1015 {
1016  auto& inst = instance();
1017  if(inst.m_peak_afl_AutoController_ROI_IsSupported)
1018  {
1019  return inst.m_peak_afl_AutoController_ROI_IsSupported(controller, supported);
1020  }
1021  else
1022  {
1023  throw std::runtime_error("Library not loaded!");
1024  }
1025 }
1026 
1028 {
1029  auto& inst = instance();
1030  if(inst.m_peak_afl_AutoController_ROI_Set)
1031  {
1032  return inst.m_peak_afl_AutoController_ROI_Set(controller, roi);
1033  }
1034  else
1035  {
1036  throw std::runtime_error("Library not loaded!");
1037  }
1038 }
1039 
1041 {
1042  auto& inst = instance();
1043  if(inst.m_peak_afl_AutoController_ROI_Get)
1044  {
1045  return inst.m_peak_afl_AutoController_ROI_Get(controller, roi);
1046  }
1047  else
1048  {
1049  throw std::runtime_error("Library not loaded!");
1050  }
1051 }
1052 
1054 {
1055  auto& inst = instance();
1056  if(inst.m_peak_afl_AutoController_ROI_Preset_IsSupported)
1057  {
1058  return inst.m_peak_afl_AutoController_ROI_Preset_IsSupported(controller, supported);
1059  }
1060  else
1061  {
1062  throw std::runtime_error("Library not loaded!");
1063  }
1064 }
1065 
1067 {
1068  auto& inst = instance();
1069  if(inst.m_peak_afl_AutoController_ROI_Preset_Set)
1070  {
1071  return inst.m_peak_afl_AutoController_ROI_Preset_Set(controller, roiPreset);
1072  }
1073  else
1074  {
1075  throw std::runtime_error("Library not loaded!");
1076  }
1077 }
1078 
1080 {
1081  auto& inst = instance();
1082  if(inst.m_peak_afl_AutoController_Mode_IsSupported)
1083  {
1084  return inst.m_peak_afl_AutoController_Mode_IsSupported(controller, supported);
1085  }
1086  else
1087  {
1088  throw std::runtime_error("Library not loaded!");
1089  }
1090 }
1091 
1093 {
1094  auto& inst = instance();
1095  if(inst.m_peak_afl_AutoController_Mode_Set)
1096  {
1097  return inst.m_peak_afl_AutoController_Mode_Set(controller, mode);
1098  }
1099  else
1100  {
1101  throw std::runtime_error("Library not loaded!");
1102  }
1103 }
1104 
1106 {
1107  auto& inst = instance();
1108  if(inst.m_peak_afl_AutoController_Mode_Get)
1109  {
1110  return inst.m_peak_afl_AutoController_Mode_Get(controller, mode);
1111  }
1112  else
1113  {
1114  throw std::runtime_error("Library not loaded!");
1115  }
1116 }
1117 
1119 {
1120  auto& inst = instance();
1121  if(inst.m_peak_afl_AutoController_Status)
1122  {
1123  return inst.m_peak_afl_AutoController_Status(controller, status);
1124  }
1125  else
1126  {
1127  throw std::runtime_error("Library not loaded!");
1128  }
1129 }
1130 
1131 inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_GetLastAutoAverage(peak_afl_controller_handle controller, uint8_t * average)
1132 {
1133  auto& inst = instance();
1134  if(inst.m_peak_afl_AutoController_GetLastAutoAverage)
1135  {
1136  return inst.m_peak_afl_AutoController_GetLastAutoAverage(controller, average);
1137  }
1138  else
1139  {
1140  throw std::runtime_error("Library not loaded!");
1141  }
1142 }
1143 
1144 inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_GetLastAutoAverages(peak_afl_controller_handle controller, uint8_t * averageRed, uint8_t * averageGreen, uint8_t * averageBlue)
1145 {
1146  auto& inst = instance();
1147  if(inst.m_peak_afl_AutoController_GetLastAutoAverages)
1148  {
1149  return inst.m_peak_afl_AutoController_GetLastAutoAverages(controller, averageRed, averageGreen, averageBlue);
1150  }
1151  else
1152  {
1153  throw std::runtime_error("Library not loaded!");
1154  }
1155 }
1156 
1158 {
1159  auto& inst = instance();
1160  if(inst.m_peak_afl_AutoController_AutoTarget_IsSupported)
1161  {
1162  return inst.m_peak_afl_AutoController_AutoTarget_IsSupported(controller, supported);
1163  }
1164  else
1165  {
1166  throw std::runtime_error("Library not loaded!");
1167  }
1168 }
1169 
1170 inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_AutoTarget_Set(peak_afl_controller_handle controller, uint32_t target)
1171 {
1172  auto& inst = instance();
1173  if(inst.m_peak_afl_AutoController_AutoTarget_Set)
1174  {
1175  return inst.m_peak_afl_AutoController_AutoTarget_Set(controller, target);
1176  }
1177  else
1178  {
1179  throw std::runtime_error("Library not loaded!");
1180  }
1181 }
1182 
1183 inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_AutoTarget_Get(peak_afl_controller_handle controller, uint32_t * target)
1184 {
1185  auto& inst = instance();
1186  if(inst.m_peak_afl_AutoController_AutoTarget_Get)
1187  {
1188  return inst.m_peak_afl_AutoController_AutoTarget_Get(controller, target);
1189  }
1190  else
1191  {
1192  throw std::runtime_error("Library not loaded!");
1193  }
1194 }
1195 
1196 inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_AutoTarget_GetRange(peak_afl_controller_handle controller, uint32_t * min, uint32_t * max, uint32_t * inc)
1197 {
1198  auto& inst = instance();
1199  if(inst.m_peak_afl_AutoController_AutoTarget_GetRange)
1200  {
1201  return inst.m_peak_afl_AutoController_AutoTarget_GetRange(controller, min, max, inc);
1202  }
1203  else
1204  {
1205  throw std::runtime_error("Library not loaded!");
1206  }
1207 }
1208 
1210 {
1211  auto& inst = instance();
1212  if(inst.m_peak_afl_AutoController_AutoTolerance_IsSupported)
1213  {
1214  return inst.m_peak_afl_AutoController_AutoTolerance_IsSupported(controller, supported);
1215  }
1216  else
1217  {
1218  throw std::runtime_error("Library not loaded!");
1219  }
1220 }
1221 
1222 inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_AutoTolerance_Set(peak_afl_controller_handle controller, uint32_t tolerance)
1223 {
1224  auto& inst = instance();
1225  if(inst.m_peak_afl_AutoController_AutoTolerance_Set)
1226  {
1227  return inst.m_peak_afl_AutoController_AutoTolerance_Set(controller, tolerance);
1228  }
1229  else
1230  {
1231  throw std::runtime_error("Library not loaded!");
1232  }
1233 }
1234 
1235 inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_AutoTolerance_Get(peak_afl_controller_handle controller, uint32_t * tolerance)
1236 {
1237  auto& inst = instance();
1238  if(inst.m_peak_afl_AutoController_AutoTolerance_Get)
1239  {
1240  return inst.m_peak_afl_AutoController_AutoTolerance_Get(controller, tolerance);
1241  }
1242  else
1243  {
1244  throw std::runtime_error("Library not loaded!");
1245  }
1246 }
1247 
1248 inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_AutoTolerance_GetRange(peak_afl_controller_handle controller, uint32_t * min, uint32_t * max, uint32_t * inc)
1249 {
1250  auto& inst = instance();
1251  if(inst.m_peak_afl_AutoController_AutoTolerance_GetRange)
1252  {
1253  return inst.m_peak_afl_AutoController_AutoTolerance_GetRange(controller, min, max, inc);
1254  }
1255  else
1256  {
1257  throw std::runtime_error("Library not loaded!");
1258  }
1259 }
1260 
1262 {
1263  auto& inst = instance();
1264  if(inst.m_peak_afl_AutoController_AutoPercentile_IsSupported)
1265  {
1266  return inst.m_peak_afl_AutoController_AutoPercentile_IsSupported(controller, supported);
1267  }
1268  else
1269  {
1270  throw std::runtime_error("Library not loaded!");
1271  }
1272 }
1273 
1274 inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_AutoPercentile_Set(peak_afl_controller_handle controller, double percentile)
1275 {
1276  auto& inst = instance();
1277  if(inst.m_peak_afl_AutoController_AutoPercentile_Set)
1278  {
1279  return inst.m_peak_afl_AutoController_AutoPercentile_Set(controller, percentile);
1280  }
1281  else
1282  {
1283  throw std::runtime_error("Library not loaded!");
1284  }
1285 }
1286 
1287 inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_AutoPercentile_Get(peak_afl_controller_handle controller, double * percentile)
1288 {
1289  auto& inst = instance();
1290  if(inst.m_peak_afl_AutoController_AutoPercentile_Get)
1291  {
1292  return inst.m_peak_afl_AutoController_AutoPercentile_Get(controller, percentile);
1293  }
1294  else
1295  {
1296  throw std::runtime_error("Library not loaded!");
1297  }
1298 }
1299 
1300 inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_AutoPercentile_GetRange(peak_afl_controller_handle controller, double * min, double * max, double * inc)
1301 {
1302  auto& inst = instance();
1303  if(inst.m_peak_afl_AutoController_AutoPercentile_GetRange)
1304  {
1305  return inst.m_peak_afl_AutoController_AutoPercentile_GetRange(controller, min, max, inc);
1306  }
1307  else
1308  {
1309  throw std::runtime_error("Library not loaded!");
1310  }
1311 }
1312 
1314 {
1315  auto& inst = instance();
1316  if(inst.m_peak_afl_AutoController_Type_Get)
1317  {
1318  return inst.m_peak_afl_AutoController_Type_Get(controller, type);
1319  }
1320  else
1321  {
1322  throw std::runtime_error("Library not loaded!");
1323  }
1324 }
1325 
1327 {
1328  auto& inst = instance();
1329  if(inst.m_peak_afl_AutoController_Algorithm_IsSupported)
1330  {
1331  return inst.m_peak_afl_AutoController_Algorithm_IsSupported(controller, supported);
1332  }
1333  else
1334  {
1335  throw std::runtime_error("Library not loaded!");
1336  }
1337 }
1338 
1340 {
1341  auto& inst = instance();
1342  if(inst.m_peak_afl_AutoController_Algorithm_Set)
1343  {
1344  return inst.m_peak_afl_AutoController_Algorithm_Set(controller, algorithm);
1345  }
1346  else
1347  {
1348  throw std::runtime_error("Library not loaded!");
1349  }
1350 }
1351 
1353 {
1354  auto& inst = instance();
1355  if(inst.m_peak_afl_AutoController_Algorithm_Get)
1356  {
1357  return inst.m_peak_afl_AutoController_Algorithm_Get(controller, algorithm);
1358  }
1359  else
1360  {
1361  throw std::runtime_error("Library not loaded!");
1362  }
1363 }
1364 
1365 inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_Algorithm_GetList(peak_afl_controller_handle controller, peak_afl_controller_algorithm * typeList, uint32_t * listSize)
1366 {
1367  auto& inst = instance();
1368  if(inst.m_peak_afl_AutoController_Algorithm_GetList)
1369  {
1370  return inst.m_peak_afl_AutoController_Algorithm_GetList(controller, typeList, listSize);
1371  }
1372  else
1373  {
1374  throw std::runtime_error("Library not loaded!");
1375  }
1376 }
1377 
1379 {
1380  auto& inst = instance();
1381  if(inst.m_peak_afl_AutoController_SharpnessAlgorithm_IsSupported)
1382  {
1383  return inst.m_peak_afl_AutoController_SharpnessAlgorithm_IsSupported(controller, supported);
1384  }
1385  else
1386  {
1387  throw std::runtime_error("Library not loaded!");
1388  }
1389 }
1390 
1392 {
1393  auto& inst = instance();
1394  if(inst.m_peak_afl_AutoController_SharpnessAlgorithm_Set)
1395  {
1396  return inst.m_peak_afl_AutoController_SharpnessAlgorithm_Set(controller, algorithm);
1397  }
1398  else
1399  {
1400  throw std::runtime_error("Library not loaded!");
1401  }
1402 }
1403 
1405 {
1406  auto& inst = instance();
1407  if(inst.m_peak_afl_AutoController_SharpnessAlgorithm_Get)
1408  {
1409  return inst.m_peak_afl_AutoController_SharpnessAlgorithm_Get(controller, algorithm);
1410  }
1411  else
1412  {
1413  throw std::runtime_error("Library not loaded!");
1414  }
1415 }
1416 
1418 {
1419  auto& inst = instance();
1420  if(inst.m_peak_afl_AutoController_SharpnessAlgorithm_GetList)
1421  {
1422  return inst.m_peak_afl_AutoController_SharpnessAlgorithm_GetList(controller, typeList, listSize);
1423  }
1424  else
1425  {
1426  throw std::runtime_error("Library not loaded!");
1427  }
1428 }
1429 
1430 inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_Callback_Set(peak_afl_controller_handle controller, peak_afl_callback_type type, void * funcPtr, void * context)
1431 {
1432  auto& inst = instance();
1433  if(inst.m_peak_afl_AutoController_Callback_Set)
1434  {
1435  return inst.m_peak_afl_AutoController_Callback_Set(controller, type, funcPtr, context);
1436  }
1437  else
1438  {
1439  throw std::runtime_error("Library not loaded!");
1440  }
1441 }
1442 
1444 {
1445  auto& inst = instance();
1446  if(inst.m_peak_afl_AutoController_Weighted_ROI_IsSupported)
1447  {
1448  return inst.m_peak_afl_AutoController_Weighted_ROI_IsSupported(controller, supported);
1449  }
1450  else
1451  {
1452  throw std::runtime_error("Library not loaded!");
1453  }
1454 }
1455 
1457 {
1458  auto& inst = instance();
1459  if(inst.m_peak_afl_AutoController_Weighted_ROI_Min_Size)
1460  {
1461  return inst.m_peak_afl_AutoController_Weighted_ROI_Min_Size(controller, size);
1462  }
1463  else
1464  {
1465  throw std::runtime_error("Library not loaded!");
1466  }
1467 }
1468 
1469 inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_Weighted_ROI_Set(peak_afl_controller_handle controller, const peak_afl_weighted_rectangle * weightedRoiList, uint32_t listSize)
1470 {
1471  auto& inst = instance();
1472  if(inst.m_peak_afl_AutoController_Weighted_ROI_Set)
1473  {
1474  return inst.m_peak_afl_AutoController_Weighted_ROI_Set(controller, weightedRoiList, listSize);
1475  }
1476  else
1477  {
1478  throw std::runtime_error("Library not loaded!");
1479  }
1480 }
1481 
1482 inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_Weighted_ROI_Get(peak_afl_controller_handle controller, peak_afl_weighted_rectangle * weightedRoiList, uint32_t * listSize)
1483 {
1484  auto& inst = instance();
1485  if(inst.m_peak_afl_AutoController_Weighted_ROI_Get)
1486  {
1487  return inst.m_peak_afl_AutoController_Weighted_ROI_Get(controller, weightedRoiList, listSize);
1488  }
1489  else
1490  {
1491  throw std::runtime_error("Library not loaded!");
1492  }
1493 }
1494 
1496 {
1497  auto& inst = instance();
1498  if(inst.m_peak_afl_AutoController_Limit_IsSupported)
1499  {
1500  return inst.m_peak_afl_AutoController_Limit_IsSupported(controller, supported);
1501  }
1502  else
1503  {
1504  throw std::runtime_error("Library not loaded!");
1505  }
1506 }
1507 
1509 {
1510  auto& inst = instance();
1511  if(inst.m_peak_afl_AutoController_Limit_Default)
1512  {
1513  return inst.m_peak_afl_AutoController_Limit_Default(controller, limit);
1514  }
1515  else
1516  {
1517  throw std::runtime_error("Library not loaded!");
1518  }
1519 }
1520 
1522 {
1523  auto& inst = instance();
1524  if(inst.m_peak_afl_AutoController_Limit_Set)
1525  {
1526  return inst.m_peak_afl_AutoController_Limit_Set(controller, limit);
1527  }
1528  else
1529  {
1530  throw std::runtime_error("Library not loaded!");
1531  }
1532 }
1533 
1535 {
1536  auto& inst = instance();
1537  if(inst.m_peak_afl_AutoController_Limit_Get)
1538  {
1539  return inst.m_peak_afl_AutoController_Limit_Get(controller, limit);
1540  }
1541  else
1542  {
1543  throw std::runtime_error("Library not loaded!");
1544  }
1545 }
1546 
1548 {
1549  auto& inst = instance();
1550  if(inst.m_peak_afl_AutoController_Hysteresis_IsSupported)
1551  {
1552  return inst.m_peak_afl_AutoController_Hysteresis_IsSupported(controller, supported);
1553  }
1554  else
1555  {
1556  throw std::runtime_error("Library not loaded!");
1557  }
1558 }
1559 
1560 inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_Hysteresis_Default(peak_afl_controller_handle controller, uint8_t * hysteresis)
1561 {
1562  auto& inst = instance();
1563  if(inst.m_peak_afl_AutoController_Hysteresis_Default)
1564  {
1565  return inst.m_peak_afl_AutoController_Hysteresis_Default(controller, hysteresis);
1566  }
1567  else
1568  {
1569  throw std::runtime_error("Library not loaded!");
1570  }
1571 }
1572 
1573 inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_Hysteresis_Set(peak_afl_controller_handle controller, uint8_t hysteresis)
1574 {
1575  auto& inst = instance();
1576  if(inst.m_peak_afl_AutoController_Hysteresis_Set)
1577  {
1578  return inst.m_peak_afl_AutoController_Hysteresis_Set(controller, hysteresis);
1579  }
1580  else
1581  {
1582  throw std::runtime_error("Library not loaded!");
1583  }
1584 }
1585 
1586 inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_Hysteresis_Get(peak_afl_controller_handle controller, uint8_t * hysteresis)
1587 {
1588  auto& inst = instance();
1589  if(inst.m_peak_afl_AutoController_Hysteresis_Get)
1590  {
1591  return inst.m_peak_afl_AutoController_Hysteresis_Get(controller, hysteresis);
1592  }
1593  else
1594  {
1595  throw std::runtime_error("Library not loaded!");
1596  }
1597 }
1598 
1599 inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_Hysteresis_GetRange(peak_afl_controller_handle controller, uint8_t * min, uint8_t * max, uint8_t * inc)
1600 {
1601  auto& inst = instance();
1602  if(inst.m_peak_afl_AutoController_Hysteresis_GetRange)
1603  {
1604  return inst.m_peak_afl_AutoController_Hysteresis_GetRange(controller, min, max, inc);
1605  }
1606  else
1607  {
1608  throw std::runtime_error("Library not loaded!");
1609  }
1610 }
1611 
1612 } /* namespace dynamic */
1613 } /* namespace afl */
1614 } /* namespace peak */
1615 
peak_afl_status peak_afl_GetVersion(uint32_t *majorVersion, uint32_t *minorVersion, uint32_t *subminorVersion, uint32_t *patchVersion)
Query the library version.
peak_afl_status peak_afl_AutoController_SharpnessAlgorithm_Get(peak_afl_controller_handle controller, peak_afl_controller_sharpness_algorithm *algorithm)
Get the used sharpness algorithm for a controller.
peak_afl_status peak_afl_AutoFeatureManager_AddController(peak_afl_manager_handle handle, peak_afl_manager_handle controller)
Add a controller to an automanager instance.
peak_afl_status peak_afl_AutoController_SkipFrames_Get(peak_afl_controller_handle controller, uint32_t *count)
Get number of frames skipped for a controller.
peak_afl_status peak_afl_AutoController_SkipFrames_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
Check if skip frames is supported for a controller.
peak_afl_controller_sharpness_algorithm
controller sharpness algorithm (focus)
Definition: peak_afl.h:199
peak_afl_status peak_afl_AutoController_AutoPercentile_GetRange(peak_afl_controller_handle controller, double *min, double *max, double *inc)
Get the auto percentile range for a controller.
peak_afl_status peak_afl_AutoController_SkipFrames_Set(peak_afl_controller_handle controller, uint32_t count)
Set number of frames skipped for a controller.
peak_afl_status peak_afl_AutoController_Limit_Default(peak_afl_controller_handle controller, peak_afl_controller_limit *limit)
Get the autofeature default limit.
peak_afl_status peak_afl_AutoController_Algorithm_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
check if setting an algorithm is supported for a controller.
peak_afl_status peak_afl_AutoController_ROI_Get(peak_afl_controller_handle controller, peak_afl_rectangle *roi)
Get the autofeature region of interest for a controller.
peak_afl_status peak_afl_AutoController_Algorithm_Get(peak_afl_controller_handle controller, peak_afl_controller_algorithm *algorithm)
Get the used algorithm for a controller.
peak_afl_status peak_afl_AutoController_Weighted_ROI_Get(peak_afl_controller_handle controller, peak_afl_weighted_rectangle *weightedRoiList, uint32_t *listSize)
Get the autofeature weighted region of interest for a controller.
peak_afl_status peak_afl_AutoFeatureManager_Status(peak_afl_manager_handle handle, peak_afl_BOOL8 *running)
Get the status of a manager.
peak_afl_status
peak_afl Status codes
Definition: peak_afl.h:86
Definition: peak_afl.hpp:55
peak_afl Size (2D)
Definition: peak_afl.h:270
peak_afl_status peak_afl_AutoController_Mode_Get(peak_afl_controller_handle controller, peak_afl_controller_automode *mode)
Get the current autofeature mode for a controller.
peak_afl_status peak_afl_AutoController_ROI_Set(peak_afl_controller_handle controller, peak_afl_rectangle roi)
Set the autofeature region of interest for a controller.
peak_afl_status peak_afl_AutoController_Weighted_ROI_Set(peak_afl_controller_handle controller, const peak_afl_weighted_rectangle *weightedRoiList, uint32_t listSize)
Set the autofeature weighted region of interest for a controller.
peak_afl_status peak_afl_AutoController_Limit_Get(peak_afl_controller_handle controller, peak_afl_controller_limit *limit)
Get the autofeature limit for a controller.
peak_afl Rectangle (2D)
Definition: peak_afl.h:304
peak_afl_status peak_afl_AutoController_Callback_Set(peak_afl_controller_handle controller, peak_afl_callback_type type, void *funcPtr, void *context)
Set a callback for a controller.
peak_afl_status peak_afl_AutoController_GetLastAutoAverages(peak_afl_controller_handle controller, uint8_t *averageRed, uint8_t *averageGreen, uint8_t *averageBlue)
Get the last auto average for a controller.
peak_afl_status peak_afl_AutoController_Mode_Set(peak_afl_controller_handle controller, peak_afl_controller_automode mode)
Set the autofeature mode for a controller.
peak_afl_status peak_afl_AutoController_SharpnessAlgorithm_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
check setting a sharpness algorithm is supported by a controller.
peak_afl_status peak_afl_AutoController_Type_Get(peak_afl_controller_handle controller, peak_afl_controllerType *type)
Get the controller type.
peak_afl_status peak_afl_AutoController_AutoPercentile_Get(peak_afl_controller_handle controller, double *percentile)
Get the auto percentile for a controller.
peak_afl_status peak_afl_AutoController_ROI_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
Check if setting a region of interest is supported for a controller.
peak_afl Focus Limit
Definition: peak_afl.h:342
peak_afl_status peak_afl_AutoController_Weighted_ROI_Min_Size(peak_afl_controller_handle controller, peak_afl_size *size)
Get the autofeature minimum size of weighted region of interest for a controller. ...
peak_afl_status peak_afl_AutoFeatureManager_Destroy(peak_afl_manager_handle handle)
Destroy an automanager instance.
peak_afl_status peak_afl_AutoFeatureManager_RemoveController(peak_afl_manager_handle handle, peak_afl_manager_handle controller)
Remove a controller to an automanager instance.
peak_afl_status peak_afl_AutoController_AutoTarget_GetRange(peak_afl_controller_handle controller, uint32_t *min, uint32_t *max, uint32_t *inc)
Get the auto target range for a controller.
peak_afl_roi_preset
controller roi preset
Definition: peak_afl.h:256
peak_afl_status peak_afl_AutoController_Limit_Set(peak_afl_controller_handle controller, peak_afl_controller_limit limit)
Set the autofeature limit for a controller.
peak_afl_controller_automode
controller automode
Definition: peak_afl.h:133
peak_afl_status peak_afl_AutoController_SkipFrames_GetRange(peak_afl_controller_handle controller, uint32_t *min, uint32_t *max, uint32_t *inc)
Get range for frames skipped for a controller.
uint8_t peak_afl_BOOL8
custom boolean type
Definition: peak_afl.h:352
peak_afl_status peak_afl_AutoFeatureManager_CreateController(peak_afl_manager_handle handle, peak_afl_controller_handle *controller, peak_afl_controllerType controllerType)
Create a controller and append it to Manager.
void * peak_afl_manager_handle
opaque manager handle type
Definition: peak_afl.h:50
peak_afl_status peak_afl_AutoController_Hysteresis_GetRange(peak_afl_controller_handle controller, uint8_t *min, uint8_t *max, uint8_t *inc)
Get autofeature hysteresis range for a controller.
peak_afl_status peak_afl_AutoFeatureManager_DestroyAllController(peak_afl_manager_handle handle)
Destroy all controllers for a manager.
peak_afl_status peak_afl_AutoController_AutoTarget_Set(peak_afl_controller_handle controller, uint32_t target)
Set the auto target for a controller.
peak_afl_status peak_afl_Init(void)
Init the peak_afl auto feature library.
peak_afl_status peak_afl_AutoController_SharpnessAlgorithm_Set(peak_afl_controller_handle controller, peak_afl_controller_sharpness_algorithm algorithm)
Set the used sharpness algorithm for a controller.
peak_afl_status peak_afl_AutoController_GetLastAutoAverage(peak_afl_controller_handle controller, uint8_t *average)
Get the last auto average for a controller.
peak_afl_controller_algorithm
controller algorithm
Definition: peak_afl.h:177
peak_afl_status peak_afl_Exit(void)
Exit the peak_afl auto feature library.
peak_afl_status peak_afl_AutoController_AutoTolerance_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
check if auto tolerance is supported for a controller.
peak_afl_status peak_afl_AutoController_ROI_Preset_Set(peak_afl_controller_handle controller, peak_afl_roi_preset roiPreset)
Set the autofeature region of interest preset for a controller.
peak_afl_status peak_afl_AutoController_ROI_Preset_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
Check if ROI preset is supported for a controller.
peak_afl_status peak_afl_AutoController_AutoTarget_Get(peak_afl_controller_handle controller, uint32_t *target)
Get the currently set auto target for a controller.
peak_afl_status peak_afl_AutoController_Destroy(peak_afl_controller_handle controller)
Destroy a controller. Will fail if it is queued inside a manager.
peak_afl_status peak_afl_AutoFeatureManager_Create(peak_afl_manager_handle *handle, PEAK_NODE_MAP_HANDLE nodeMapHandle)
Create an automanager instance.
peak_afl_status peak_afl_AutoController_AutoTarget_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
check if auto target is supported for a controller.
peak_afl_status peak_afl_AutoController_Algorithm_Set(peak_afl_controller_handle controller, peak_afl_controller_algorithm algorithm)
Set the used algorithm for a controller.
peak_afl_status peak_afl_AutoController_AutoPercentile_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
check if auto percentile is supported for a controller.
peak_afl_status peak_afl_AutoController_Limit_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
Check if limit is supported for a controller.
peak_afl_status peak_afl_AutoController_Status(peak_afl_controller_handle controller, peak_afl_controller_status *status)
Get the status for a controller.
peak_afl_status peak_afl_AutoController_Hysteresis_Default(peak_afl_controller_handle controller, uint8_t *hysteresis)
Get the autofeature hysteresis default.
peak_afl_status peak_afl_AutoController_AutoTolerance_Set(peak_afl_controller_handle controller, uint32_t tolerance)
Set the auto tolerance for a controller.
peak_afl Focus Rectangle
Definition: peak_afl.h:326
peak_afl_status peak_afl_AutoController_SharpnessAlgorithm_GetList(peak_afl_controller_handle controller, peak_afl_controller_sharpness_algorithm *typeList, uint32_t *listSize)
Get the list of supported sharpness algorithms for a controller.
peak_afl_status peak_afl_AutoController_AutoTolerance_Get(peak_afl_controller_handle controller, uint32_t *tolerance)
Get the current auto tolerance for a controller.
peak_afl_status peak_afl_AutoController_Weighted_ROI_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
Check if weighted region of interest is supported for a controller.
peak_afl_status peak_afl_AutoController_Create(peak_afl_controller_handle *controller, peak_afl_controllerType controllerType)
Create a new controller.
peak_afl_controller_status
controller status
Definition: peak_afl.h:149
peak_afl_status peak_afl_AutoFeatureManager_Process(peak_afl_manager_handle handle, PEAK_IPL_IMAGE_HANDLE imageHandle)
Process an image.
peak_afl_status peak_afl_AutoController_Hysteresis_Get(peak_afl_controller_handle controller, uint8_t *hysteresis)
Get the autofeature hysteresis for a controller.
peak_afl_status peak_afl_AutoController_AutoTolerance_GetRange(peak_afl_controller_handle controller, uint32_t *min, uint32_t *max, uint32_t *inc)
Get the auto tolerance range for a controller.
void * peak_afl_controller_handle
opaque controller handle type
Definition: peak_afl.h:48
peak_afl_status peak_afl_GetLastError(peak_afl_status *lastErrorCode, char *lastErrorMessage, size_t *lastErrorMessageSize)
Get the last error message.
peak_afl_status peak_afl_AutoController_Algorithm_GetList(peak_afl_controller_handle controller, peak_afl_controller_algorithm *typeList, uint32_t *listSize)
Get the list of supported algorithms for a controller.
peak_afl_status peak_afl_AutoController_Hysteresis_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
Check if hysteresis is supported for a controller.
peak_afl_controllerType
controller types
Definition: peak_afl.h:120
peak_afl_status peak_afl_AutoController_Mode_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
Check if auto mode is supported for a controller.
peak_afl_status peak_afl_AutoController_AutoPercentile_Set(peak_afl_controller_handle controller, double percentile)
Set the auto percentile for a controller.
peak_afl_status peak_afl_AutoController_Hysteresis_Set(peak_afl_controller_handle controller, uint8_t hysteresis)
Set the autofeature hysteresis for a controller.
peak_afl_callback_type
controller callback type
Definition: peak_afl.h:237
peak_afl_status peak_afl_AutoFeatureManager_DestroyController(peak_afl_manager_handle handle, peak_afl_controller_handle controller)
Destroy a controller.