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