IDS peak AFL v1.8.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
14#include <string>
15#include <cstdint>
16
17#ifdef __linux__
18 #include <dlfcn.h>
19#else
20 #include <vector>
21 #include <windows.h>
22 #include <tchar.h>
23#endif
24
25#include <stdexcept>
26
27#undef PEAK_AFL_EXPORT
28#define PEAK_AFL_EXPORT
29#undef PEAK_AFL_CALLCONV
30#define PEAK_AFL_CALLCONV
31
32namespace peak
33{
34namespace afl
35{
36namespace dynamic
37{
38
39typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_Init)(void );
40typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_Exit)(void );
41typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_GetLastError)(peak_afl_status * lastErrorCode, char * lastErrorMessage, size_t * lastErrorMessageSize);
42typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_GetVersion)(uint32_t * majorVersion, uint32_t * minorVersion, uint32_t * subminorVersion, uint32_t * patchVersion);
43typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoFeatureManager_Create)(peak_afl_manager_handle * handle, PEAK_NODE_MAP_HANDLE nodeMapHandle);
44typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoFeatureManager_Destroy)(peak_afl_manager_handle handle);
45typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoFeatureManager_AddController)(peak_afl_manager_handle handle, peak_afl_controller_handle controller);
46typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoFeatureManager_RemoveController)(peak_afl_manager_handle handle, peak_afl_controller_handle controller);
47typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoFeatureManager_Process)(peak_afl_manager_handle handle, PEAK_IPL_IMAGE_HANDLE imageHandle);
48typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoFeatureManager_CreateController)(peak_afl_manager_handle handle, peak_afl_controller_handle * controller, peak_afl_controllerType controllerType);
49typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoFeatureManager_DestroyAllController)(peak_afl_manager_handle handle);
50typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoFeatureManager_DestroyController)(peak_afl_manager_handle handle, peak_afl_controller_handle controller);
51typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoFeatureManager_SetGainIPL)(peak_afl_manager_handle handle, PEAK_IPL_GAIN_HANDLE gainHandle);
52typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoFeatureManager_SetCCM)(peak_afl_manager_handle handle, float * ccm, size_t ccm_size);
53typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoFeatureManager_Status)(peak_afl_manager_handle handle, peak_afl_BOOL8 * running);
54typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoFeatureManager_Controller_IsSupported)(peak_afl_manager_handle handle, peak_afl_controllerType controllerType, peak_afl_BOOL8 * supported);
55typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_Create)(peak_afl_controller_handle * controller, peak_afl_controllerType controllerType);
56typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_Destroy)(peak_afl_controller_handle controller);
57typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_SkipFrames_IsSupported)(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
58typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_SkipFrames_Set)(peak_afl_controller_handle controller, uint32_t count);
59typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_SkipFrames_Get)(peak_afl_controller_handle controller, uint32_t * count);
60typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_SkipFrames_GetRange)(peak_afl_controller_handle controller, uint32_t * min, uint32_t * max, uint32_t * inc);
61typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_ROI_IsSupported)(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
62typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_ROI_Set)(peak_afl_controller_handle controller, peak_afl_rectangle roi);
63typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_ROI_Get)(peak_afl_controller_handle controller, peak_afl_rectangle * roi);
64typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_ROI_Preset_IsSupported)(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
65typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_ROI_Preset_Set)(peak_afl_controller_handle controller, peak_afl_roi_preset roiPreset);
66typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_Mode_IsSupported)(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
67typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_Mode_Set)(peak_afl_controller_handle controller, peak_afl_controller_automode mode);
68typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_Mode_Get)(peak_afl_controller_handle controller, peak_afl_controller_automode * mode);
69typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_BrightnessAlgorithm_Set)(peak_afl_controller_handle controller, peak_afl_controller_brightness_algorithm algorithm);
70typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_BrightnessAlgorithm_Get)(peak_afl_controller_handle controller, peak_afl_controller_brightness_algorithm * algorithm);
71typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_BrightnessAlgorithm_IsSupported)(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
72typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_BrightnessComponent_Mode_IsSupported)(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
73typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_BrightnessComponent_Unit_IsSupported)(peak_afl_controller_handle controller, peak_afl_controller_brightness_component unit, peak_afl_BOOL8 * supported);
74typedef 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);
75typedef 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);
76typedef 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);
77typedef 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);
78typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_ExposureLimit_IsSupported)(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
79typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_ExposureLimit_Set)(peak_afl_controller_handle controller, peak_afl_double_limit limit);
80typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_ExposureLimit_Get)(peak_afl_controller_handle controller, peak_afl_double_limit * limit);
81typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_Status)(peak_afl_controller_handle controller, peak_afl_controller_status * status);
82typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_GetLastAutoAverage)(peak_afl_controller_handle controller, uint8_t * average);
83typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_GetLastAutoAverages)(peak_afl_controller_handle controller, uint8_t * averageRed, uint8_t * averageGreen, uint8_t * averageBlue);
84typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_AutoTarget_IsSupported)(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
85typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_AutoTarget_Set)(peak_afl_controller_handle controller, uint32_t target);
86typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_AutoTarget_Get)(peak_afl_controller_handle controller, uint32_t * target);
87typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_AutoTarget_GetRange)(peak_afl_controller_handle controller, uint32_t * min, uint32_t * max, uint32_t * inc);
88typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_AutoTolerance_IsSupported)(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
89typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_AutoTolerance_Set)(peak_afl_controller_handle controller, uint32_t tolerance);
90typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_AutoTolerance_Get)(peak_afl_controller_handle controller, uint32_t * tolerance);
91typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_AutoTolerance_GetRange)(peak_afl_controller_handle controller, uint32_t * min, uint32_t * max, uint32_t * inc);
92typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_AutoPercentile_IsSupported)(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
93typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_AutoPercentile_Set)(peak_afl_controller_handle controller, double percentile);
94typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_AutoPercentile_Get)(peak_afl_controller_handle controller, double * percentile);
95typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_AutoPercentile_GetRange)(peak_afl_controller_handle controller, double * min, double * max, double * inc);
96typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_Type_Get)(peak_afl_controller_handle controller, peak_afl_controllerType * type);
97typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_Algorithm_IsSupported)(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
98typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_Algorithm_Set)(peak_afl_controller_handle controller, peak_afl_controller_algorithm algorithm);
99typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_Algorithm_Get)(peak_afl_controller_handle controller, peak_afl_controller_algorithm * algorithm);
100typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_Algorithm_GetList)(peak_afl_controller_handle controller, peak_afl_controller_algorithm * typeList, uint32_t * listSize);
101typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_SharpnessAlgorithm_IsSupported)(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
102typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_SharpnessAlgorithm_Set)(peak_afl_controller_handle controller, peak_afl_controller_sharpness_algorithm algorithm);
103typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_SharpnessAlgorithm_Get)(peak_afl_controller_handle controller, peak_afl_controller_sharpness_algorithm * algorithm);
104typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_SharpnessAlgorithm_GetList)(peak_afl_controller_handle controller, peak_afl_controller_sharpness_algorithm * typeList, uint32_t * listSize);
105typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_Callback_Set)(peak_afl_controller_handle controller, peak_afl_callback_type type, void * funcPtr, void * context);
106typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_Weighted_ROI_IsSupported)(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
107typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_Weighted_ROI_Min_Size)(peak_afl_controller_handle controller, peak_afl_size * size);
108typedef 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);
109typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_Weighted_ROI_Get)(peak_afl_controller_handle controller, peak_afl_weighted_rectangle * weightedRoiList, uint32_t * listSize);
110typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_Limit_IsSupported)(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
111typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_Limit_Default)(peak_afl_controller_handle controller, peak_afl_controller_limit * limit);
112typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_Limit_Set)(peak_afl_controller_handle controller, peak_afl_controller_limit limit);
113typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_Limit_Get)(peak_afl_controller_handle controller, peak_afl_controller_limit * limit);
114typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_Hysteresis_IsSupported)(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
115typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_Hysteresis_Default)(peak_afl_controller_handle controller, uint8_t * hysteresis);
116typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_Hysteresis_Set)(peak_afl_controller_handle controller, uint8_t hysteresis);
117typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_Hysteresis_Get)(peak_afl_controller_handle controller, uint8_t * hysteresis);
118typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_Hysteresis_GetRange)(peak_afl_controller_handle controller, uint8_t * min, uint8_t * max, uint8_t * inc);
119typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_GainLimit_IsSupported)(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
120typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_GainLimit_Set)(peak_afl_controller_handle controller, peak_afl_double_limit limit);
121typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_GainLimit_Get)(peak_afl_controller_handle controller, peak_afl_double_limit * limit);
122typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_GainLimit_GetRange)(peak_afl_controller_handle controller, peak_afl_double_limit * limit);
123typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_GainAnalogLimit_Set)(peak_afl_controller_handle controller, peak_afl_double_limit limit);
124typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_GainAnalogLimit_Get)(peak_afl_controller_handle controller, peak_afl_double_limit * limit);
125typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_GainAnalogLimit_GetRange)(peak_afl_controller_handle controller, peak_afl_double_limit * limit);
126typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_GainDigitalLimit_Set)(peak_afl_controller_handle controller, peak_afl_double_limit limit);
127typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_GainDigitalLimit_Get)(peak_afl_controller_handle controller, peak_afl_double_limit * limit);
128typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_GainDigitalLimit_GetRange)(peak_afl_controller_handle controller, peak_afl_double_limit * limit);
129typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_GainCombinedLimit_Set)(peak_afl_controller_handle controller, peak_afl_double_limit limit);
130typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_GainCombinedLimit_Get)(peak_afl_controller_handle controller, peak_afl_double_limit * limit);
131typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_GainCombinedLimit_GetRange)(peak_afl_controller_handle controller, peak_afl_double_limit * limit);
132typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_GainHostLimit_Set)(peak_afl_controller_handle controller, peak_afl_double_limit limit);
133typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_GainHostLimit_Get)(peak_afl_controller_handle controller, peak_afl_double_limit * limit);
134typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_GainHostLimit_GetRange)(peak_afl_controller_handle controller, peak_afl_double_limit * limit);
135
136
137class LoadLibraryException : public std::runtime_error {
138 using std::runtime_error::runtime_error;
139};
140
141class DynamicLoader
142{
143private:
144 DynamicLoader();
145
146 static DynamicLoader& instance()
147 {
148 static DynamicLoader dynamicLoader{};
149 return dynamicLoader;
150 }
151 bool loadLib(const char* file);
152 void unload();
153 bool setPointers(bool load);
154
155public:
156 ~DynamicLoader();
157
158 static bool isLoaded();
159
160 static PEAK_AFL_API_STATUS peak_afl_Init(void );
161 static PEAK_AFL_API_STATUS peak_afl_Exit(void );
162 static PEAK_AFL_API_STATUS peak_afl_GetLastError(peak_afl_status * lastErrorCode, char * lastErrorMessage, size_t * lastErrorMessageSize);
163 static PEAK_AFL_API_STATUS peak_afl_GetVersion(uint32_t * majorVersion, uint32_t * minorVersion, uint32_t * subminorVersion, uint32_t * patchVersion);
164 static PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_Create(peak_afl_manager_handle * handle, PEAK_NODE_MAP_HANDLE nodeMapHandle);
165 static PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_Destroy(peak_afl_manager_handle handle);
166 static PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_AddController(peak_afl_manager_handle handle, peak_afl_controller_handle controller);
167 static PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_RemoveController(peak_afl_manager_handle handle, peak_afl_controller_handle controller);
168 static PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_Process(peak_afl_manager_handle handle, PEAK_IPL_IMAGE_HANDLE imageHandle);
169 static PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_CreateController(peak_afl_manager_handle handle, peak_afl_controller_handle * controller, peak_afl_controllerType controllerType);
170 static PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_DestroyAllController(peak_afl_manager_handle handle);
171 static PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_DestroyController(peak_afl_manager_handle handle, peak_afl_controller_handle controller);
172 static PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_SetGainIPL(peak_afl_manager_handle handle, PEAK_IPL_GAIN_HANDLE gainHandle);
173 static PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_SetCCM(peak_afl_manager_handle handle, float * ccm, size_t ccm_size);
174 static PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_Status(peak_afl_manager_handle handle, peak_afl_BOOL8 * running);
175 static PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_Controller_IsSupported(peak_afl_manager_handle handle, peak_afl_controllerType controllerType, peak_afl_BOOL8 * supported);
176 static PEAK_AFL_API_STATUS peak_afl_AutoController_Create(peak_afl_controller_handle * controller, peak_afl_controllerType controllerType);
177 static PEAK_AFL_API_STATUS peak_afl_AutoController_Destroy(peak_afl_controller_handle controller);
178 static PEAK_AFL_API_STATUS peak_afl_AutoController_SkipFrames_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
179 static PEAK_AFL_API_STATUS peak_afl_AutoController_SkipFrames_Set(peak_afl_controller_handle controller, uint32_t count);
180 static PEAK_AFL_API_STATUS peak_afl_AutoController_SkipFrames_Get(peak_afl_controller_handle controller, uint32_t * count);
181 static PEAK_AFL_API_STATUS peak_afl_AutoController_SkipFrames_GetRange(peak_afl_controller_handle controller, uint32_t * min, uint32_t * max, uint32_t * inc);
182 static PEAK_AFL_API_STATUS peak_afl_AutoController_ROI_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
183 static PEAK_AFL_API_STATUS peak_afl_AutoController_ROI_Set(peak_afl_controller_handle controller, peak_afl_rectangle roi);
184 static PEAK_AFL_API_STATUS peak_afl_AutoController_ROI_Get(peak_afl_controller_handle controller, peak_afl_rectangle * roi);
185 static PEAK_AFL_API_STATUS peak_afl_AutoController_ROI_Preset_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
186 static PEAK_AFL_API_STATUS peak_afl_AutoController_ROI_Preset_Set(peak_afl_controller_handle controller, peak_afl_roi_preset roiPreset);
187 static PEAK_AFL_API_STATUS peak_afl_AutoController_Mode_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
188 static PEAK_AFL_API_STATUS peak_afl_AutoController_Mode_Set(peak_afl_controller_handle controller, peak_afl_controller_automode mode);
189 static PEAK_AFL_API_STATUS peak_afl_AutoController_Mode_Get(peak_afl_controller_handle controller, peak_afl_controller_automode * mode);
190 static PEAK_AFL_API_STATUS peak_afl_AutoController_BrightnessAlgorithm_Set(peak_afl_controller_handle controller, peak_afl_controller_brightness_algorithm algorithm);
191 static PEAK_AFL_API_STATUS peak_afl_AutoController_BrightnessAlgorithm_Get(peak_afl_controller_handle controller, peak_afl_controller_brightness_algorithm * algorithm);
192 static PEAK_AFL_API_STATUS peak_afl_AutoController_BrightnessAlgorithm_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
193 static PEAK_AFL_API_STATUS peak_afl_AutoController_BrightnessComponent_Mode_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
194 static PEAK_AFL_API_STATUS peak_afl_AutoController_BrightnessComponent_Unit_IsSupported(peak_afl_controller_handle controller, peak_afl_controller_brightness_component unit, peak_afl_BOOL8 * supported);
195 static 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);
196 static 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);
197 static 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);
198 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);
199 static PEAK_AFL_API_STATUS peak_afl_AutoController_ExposureLimit_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
200 static PEAK_AFL_API_STATUS peak_afl_AutoController_ExposureLimit_Set(peak_afl_controller_handle controller, peak_afl_double_limit limit);
201 static PEAK_AFL_API_STATUS peak_afl_AutoController_ExposureLimit_Get(peak_afl_controller_handle controller, peak_afl_double_limit * limit);
202 static PEAK_AFL_API_STATUS peak_afl_AutoController_Status(peak_afl_controller_handle controller, peak_afl_controller_status * status);
203 static PEAK_AFL_API_STATUS peak_afl_AutoController_GetLastAutoAverage(peak_afl_controller_handle controller, uint8_t * average);
204 static PEAK_AFL_API_STATUS peak_afl_AutoController_GetLastAutoAverages(peak_afl_controller_handle controller, uint8_t * averageRed, uint8_t * averageGreen, uint8_t * averageBlue);
205 static PEAK_AFL_API_STATUS peak_afl_AutoController_AutoTarget_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
206 static PEAK_AFL_API_STATUS peak_afl_AutoController_AutoTarget_Set(peak_afl_controller_handle controller, uint32_t target);
207 static PEAK_AFL_API_STATUS peak_afl_AutoController_AutoTarget_Get(peak_afl_controller_handle controller, uint32_t * target);
208 static PEAK_AFL_API_STATUS peak_afl_AutoController_AutoTarget_GetRange(peak_afl_controller_handle controller, uint32_t * min, uint32_t * max, uint32_t * inc);
209 static PEAK_AFL_API_STATUS peak_afl_AutoController_AutoTolerance_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
210 static PEAK_AFL_API_STATUS peak_afl_AutoController_AutoTolerance_Set(peak_afl_controller_handle controller, uint32_t tolerance);
211 static PEAK_AFL_API_STATUS peak_afl_AutoController_AutoTolerance_Get(peak_afl_controller_handle controller, uint32_t * tolerance);
212 static PEAK_AFL_API_STATUS peak_afl_AutoController_AutoTolerance_GetRange(peak_afl_controller_handle controller, uint32_t * min, uint32_t * max, uint32_t * inc);
213 static PEAK_AFL_API_STATUS peak_afl_AutoController_AutoPercentile_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
214 static PEAK_AFL_API_STATUS peak_afl_AutoController_AutoPercentile_Set(peak_afl_controller_handle controller, double percentile);
215 static PEAK_AFL_API_STATUS peak_afl_AutoController_AutoPercentile_Get(peak_afl_controller_handle controller, double * percentile);
216 static PEAK_AFL_API_STATUS peak_afl_AutoController_AutoPercentile_GetRange(peak_afl_controller_handle controller, double * min, double * max, double * inc);
217 static PEAK_AFL_API_STATUS peak_afl_AutoController_Type_Get(peak_afl_controller_handle controller, peak_afl_controllerType * type);
218 static PEAK_AFL_API_STATUS peak_afl_AutoController_Algorithm_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
219 static PEAK_AFL_API_STATUS peak_afl_AutoController_Algorithm_Set(peak_afl_controller_handle controller, peak_afl_controller_algorithm algorithm);
220 static PEAK_AFL_API_STATUS peak_afl_AutoController_Algorithm_Get(peak_afl_controller_handle controller, peak_afl_controller_algorithm * algorithm);
221 static PEAK_AFL_API_STATUS peak_afl_AutoController_Algorithm_GetList(peak_afl_controller_handle controller, peak_afl_controller_algorithm * typeList, uint32_t * listSize);
222 static PEAK_AFL_API_STATUS peak_afl_AutoController_SharpnessAlgorithm_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
223 static PEAK_AFL_API_STATUS peak_afl_AutoController_SharpnessAlgorithm_Set(peak_afl_controller_handle controller, peak_afl_controller_sharpness_algorithm algorithm);
224 static PEAK_AFL_API_STATUS peak_afl_AutoController_SharpnessAlgorithm_Get(peak_afl_controller_handle controller, peak_afl_controller_sharpness_algorithm * algorithm);
225 static PEAK_AFL_API_STATUS peak_afl_AutoController_SharpnessAlgorithm_GetList(peak_afl_controller_handle controller, peak_afl_controller_sharpness_algorithm * typeList, uint32_t * listSize);
226 static PEAK_AFL_API_STATUS peak_afl_AutoController_Callback_Set(peak_afl_controller_handle controller, peak_afl_callback_type type, void * funcPtr, void * context);
227 static PEAK_AFL_API_STATUS peak_afl_AutoController_Weighted_ROI_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
228 static PEAK_AFL_API_STATUS peak_afl_AutoController_Weighted_ROI_Min_Size(peak_afl_controller_handle controller, peak_afl_size * size);
229 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);
230 static PEAK_AFL_API_STATUS peak_afl_AutoController_Weighted_ROI_Get(peak_afl_controller_handle controller, peak_afl_weighted_rectangle * weightedRoiList, uint32_t * listSize);
231 static PEAK_AFL_API_STATUS peak_afl_AutoController_Limit_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
232 static PEAK_AFL_API_STATUS peak_afl_AutoController_Limit_Default(peak_afl_controller_handle controller, peak_afl_controller_limit * limit);
233 static PEAK_AFL_API_STATUS peak_afl_AutoController_Limit_Set(peak_afl_controller_handle controller, peak_afl_controller_limit limit);
234 static PEAK_AFL_API_STATUS peak_afl_AutoController_Limit_Get(peak_afl_controller_handle controller, peak_afl_controller_limit * limit);
235 static PEAK_AFL_API_STATUS peak_afl_AutoController_Hysteresis_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
236 static PEAK_AFL_API_STATUS peak_afl_AutoController_Hysteresis_Default(peak_afl_controller_handle controller, uint8_t * hysteresis);
237 static PEAK_AFL_API_STATUS peak_afl_AutoController_Hysteresis_Set(peak_afl_controller_handle controller, uint8_t hysteresis);
238 static PEAK_AFL_API_STATUS peak_afl_AutoController_Hysteresis_Get(peak_afl_controller_handle controller, uint8_t * hysteresis);
239 static PEAK_AFL_API_STATUS peak_afl_AutoController_Hysteresis_GetRange(peak_afl_controller_handle controller, uint8_t * min, uint8_t * max, uint8_t * inc);
240 static PEAK_AFL_API_STATUS peak_afl_AutoController_GainLimit_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported);
241 static PEAK_AFL_API_STATUS peak_afl_AutoController_GainLimit_Set(peak_afl_controller_handle controller, peak_afl_double_limit limit);
242 static PEAK_AFL_API_STATUS peak_afl_AutoController_GainLimit_Get(peak_afl_controller_handle controller, peak_afl_double_limit * limit);
243 static PEAK_AFL_API_STATUS peak_afl_AutoController_GainLimit_GetRange(peak_afl_controller_handle controller, peak_afl_double_limit * limit);
244 static PEAK_AFL_API_STATUS peak_afl_AutoController_GainAnalogLimit_Set(peak_afl_controller_handle controller, peak_afl_double_limit limit);
245 static PEAK_AFL_API_STATUS peak_afl_AutoController_GainAnalogLimit_Get(peak_afl_controller_handle controller, peak_afl_double_limit * limit);
246 static PEAK_AFL_API_STATUS peak_afl_AutoController_GainAnalogLimit_GetRange(peak_afl_controller_handle controller, peak_afl_double_limit * limit);
247 static PEAK_AFL_API_STATUS peak_afl_AutoController_GainDigitalLimit_Set(peak_afl_controller_handle controller, peak_afl_double_limit limit);
248 static PEAK_AFL_API_STATUS peak_afl_AutoController_GainDigitalLimit_Get(peak_afl_controller_handle controller, peak_afl_double_limit * limit);
249 static PEAK_AFL_API_STATUS peak_afl_AutoController_GainDigitalLimit_GetRange(peak_afl_controller_handle controller, peak_afl_double_limit * limit);
250 static PEAK_AFL_API_STATUS peak_afl_AutoController_GainCombinedLimit_Set(peak_afl_controller_handle controller, peak_afl_double_limit limit);
251 static PEAK_AFL_API_STATUS peak_afl_AutoController_GainCombinedLimit_Get(peak_afl_controller_handle controller, peak_afl_double_limit * limit);
252 static PEAK_AFL_API_STATUS peak_afl_AutoController_GainCombinedLimit_GetRange(peak_afl_controller_handle controller, peak_afl_double_limit * limit);
253 static PEAK_AFL_API_STATUS peak_afl_AutoController_GainHostLimit_Set(peak_afl_controller_handle controller, peak_afl_double_limit limit);
254 static PEAK_AFL_API_STATUS peak_afl_AutoController_GainHostLimit_Get(peak_afl_controller_handle controller, peak_afl_double_limit * limit);
255 static PEAK_AFL_API_STATUS peak_afl_AutoController_GainHostLimit_GetRange(peak_afl_controller_handle controller, peak_afl_double_limit * limit);
256
257private:
258 void* m_handle = nullptr;
259 dyn_peak_afl_Init m_peak_afl_Init{};
260 dyn_peak_afl_Exit m_peak_afl_Exit{};
261 dyn_peak_afl_GetLastError m_peak_afl_GetLastError{};
262 dyn_peak_afl_GetVersion m_peak_afl_GetVersion{};
263 dyn_peak_afl_AutoFeatureManager_Create m_peak_afl_AutoFeatureManager_Create{};
264 dyn_peak_afl_AutoFeatureManager_Destroy m_peak_afl_AutoFeatureManager_Destroy{};
265 dyn_peak_afl_AutoFeatureManager_AddController m_peak_afl_AutoFeatureManager_AddController{};
266 dyn_peak_afl_AutoFeatureManager_RemoveController m_peak_afl_AutoFeatureManager_RemoveController{};
267 dyn_peak_afl_AutoFeatureManager_Process m_peak_afl_AutoFeatureManager_Process{};
268 dyn_peak_afl_AutoFeatureManager_CreateController m_peak_afl_AutoFeatureManager_CreateController{};
269 dyn_peak_afl_AutoFeatureManager_DestroyAllController m_peak_afl_AutoFeatureManager_DestroyAllController{};
270 dyn_peak_afl_AutoFeatureManager_DestroyController m_peak_afl_AutoFeatureManager_DestroyController{};
271 dyn_peak_afl_AutoFeatureManager_SetGainIPL m_peak_afl_AutoFeatureManager_SetGainIPL{};
272 dyn_peak_afl_AutoFeatureManager_SetCCM m_peak_afl_AutoFeatureManager_SetCCM{};
273 dyn_peak_afl_AutoFeatureManager_Status m_peak_afl_AutoFeatureManager_Status{};
274 dyn_peak_afl_AutoFeatureManager_Controller_IsSupported m_peak_afl_AutoFeatureManager_Controller_IsSupported{};
275 dyn_peak_afl_AutoController_Create m_peak_afl_AutoController_Create{};
276 dyn_peak_afl_AutoController_Destroy m_peak_afl_AutoController_Destroy{};
277 dyn_peak_afl_AutoController_SkipFrames_IsSupported m_peak_afl_AutoController_SkipFrames_IsSupported{};
278 dyn_peak_afl_AutoController_SkipFrames_Set m_peak_afl_AutoController_SkipFrames_Set{};
279 dyn_peak_afl_AutoController_SkipFrames_Get m_peak_afl_AutoController_SkipFrames_Get{};
280 dyn_peak_afl_AutoController_SkipFrames_GetRange m_peak_afl_AutoController_SkipFrames_GetRange{};
281 dyn_peak_afl_AutoController_ROI_IsSupported m_peak_afl_AutoController_ROI_IsSupported{};
282 dyn_peak_afl_AutoController_ROI_Set m_peak_afl_AutoController_ROI_Set{};
283 dyn_peak_afl_AutoController_ROI_Get m_peak_afl_AutoController_ROI_Get{};
284 dyn_peak_afl_AutoController_ROI_Preset_IsSupported m_peak_afl_AutoController_ROI_Preset_IsSupported{};
285 dyn_peak_afl_AutoController_ROI_Preset_Set m_peak_afl_AutoController_ROI_Preset_Set{};
286 dyn_peak_afl_AutoController_Mode_IsSupported m_peak_afl_AutoController_Mode_IsSupported{};
287 dyn_peak_afl_AutoController_Mode_Set m_peak_afl_AutoController_Mode_Set{};
288 dyn_peak_afl_AutoController_Mode_Get m_peak_afl_AutoController_Mode_Get{};
289 dyn_peak_afl_AutoController_BrightnessAlgorithm_Set m_peak_afl_AutoController_BrightnessAlgorithm_Set{};
290 dyn_peak_afl_AutoController_BrightnessAlgorithm_Get m_peak_afl_AutoController_BrightnessAlgorithm_Get{};
291 dyn_peak_afl_AutoController_BrightnessAlgorithm_IsSupported m_peak_afl_AutoController_BrightnessAlgorithm_IsSupported{};
292 dyn_peak_afl_AutoController_BrightnessComponent_Mode_IsSupported m_peak_afl_AutoController_BrightnessComponent_Mode_IsSupported{};
293 dyn_peak_afl_AutoController_BrightnessComponent_Unit_IsSupported m_peak_afl_AutoController_BrightnessComponent_Unit_IsSupported{};
294 dyn_peak_afl_AutoController_BrightnessComponent_Mode_Set m_peak_afl_AutoController_BrightnessComponent_Mode_Set{};
295 dyn_peak_afl_AutoController_BrightnessComponent_Mode_Get m_peak_afl_AutoController_BrightnessComponent_Mode_Get{};
296 dyn_peak_afl_AutoController_BrightnessComponent_Status m_peak_afl_AutoController_BrightnessComponent_Status{};
297 dyn_peak_afl_AutoController_BrightnessComponent_Callback_Set m_peak_afl_AutoController_BrightnessComponent_Callback_Set{};
298 dyn_peak_afl_AutoController_ExposureLimit_IsSupported m_peak_afl_AutoController_ExposureLimit_IsSupported{};
299 dyn_peak_afl_AutoController_ExposureLimit_Set m_peak_afl_AutoController_ExposureLimit_Set{};
300 dyn_peak_afl_AutoController_ExposureLimit_Get m_peak_afl_AutoController_ExposureLimit_Get{};
301 dyn_peak_afl_AutoController_Status m_peak_afl_AutoController_Status{};
302 dyn_peak_afl_AutoController_GetLastAutoAverage m_peak_afl_AutoController_GetLastAutoAverage{};
303 dyn_peak_afl_AutoController_GetLastAutoAverages m_peak_afl_AutoController_GetLastAutoAverages{};
304 dyn_peak_afl_AutoController_AutoTarget_IsSupported m_peak_afl_AutoController_AutoTarget_IsSupported{};
305 dyn_peak_afl_AutoController_AutoTarget_Set m_peak_afl_AutoController_AutoTarget_Set{};
306 dyn_peak_afl_AutoController_AutoTarget_Get m_peak_afl_AutoController_AutoTarget_Get{};
307 dyn_peak_afl_AutoController_AutoTarget_GetRange m_peak_afl_AutoController_AutoTarget_GetRange{};
308 dyn_peak_afl_AutoController_AutoTolerance_IsSupported m_peak_afl_AutoController_AutoTolerance_IsSupported{};
309 dyn_peak_afl_AutoController_AutoTolerance_Set m_peak_afl_AutoController_AutoTolerance_Set{};
310 dyn_peak_afl_AutoController_AutoTolerance_Get m_peak_afl_AutoController_AutoTolerance_Get{};
311 dyn_peak_afl_AutoController_AutoTolerance_GetRange m_peak_afl_AutoController_AutoTolerance_GetRange{};
312 dyn_peak_afl_AutoController_AutoPercentile_IsSupported m_peak_afl_AutoController_AutoPercentile_IsSupported{};
313 dyn_peak_afl_AutoController_AutoPercentile_Set m_peak_afl_AutoController_AutoPercentile_Set{};
314 dyn_peak_afl_AutoController_AutoPercentile_Get m_peak_afl_AutoController_AutoPercentile_Get{};
315 dyn_peak_afl_AutoController_AutoPercentile_GetRange m_peak_afl_AutoController_AutoPercentile_GetRange{};
316 dyn_peak_afl_AutoController_Type_Get m_peak_afl_AutoController_Type_Get{};
317 dyn_peak_afl_AutoController_Algorithm_IsSupported m_peak_afl_AutoController_Algorithm_IsSupported{};
318 dyn_peak_afl_AutoController_Algorithm_Set m_peak_afl_AutoController_Algorithm_Set{};
319 dyn_peak_afl_AutoController_Algorithm_Get m_peak_afl_AutoController_Algorithm_Get{};
320 dyn_peak_afl_AutoController_Algorithm_GetList m_peak_afl_AutoController_Algorithm_GetList{};
321 dyn_peak_afl_AutoController_SharpnessAlgorithm_IsSupported m_peak_afl_AutoController_SharpnessAlgorithm_IsSupported{};
322 dyn_peak_afl_AutoController_SharpnessAlgorithm_Set m_peak_afl_AutoController_SharpnessAlgorithm_Set{};
323 dyn_peak_afl_AutoController_SharpnessAlgorithm_Get m_peak_afl_AutoController_SharpnessAlgorithm_Get{};
324 dyn_peak_afl_AutoController_SharpnessAlgorithm_GetList m_peak_afl_AutoController_SharpnessAlgorithm_GetList{};
325 dyn_peak_afl_AutoController_Callback_Set m_peak_afl_AutoController_Callback_Set{};
326 dyn_peak_afl_AutoController_Weighted_ROI_IsSupported m_peak_afl_AutoController_Weighted_ROI_IsSupported{};
327 dyn_peak_afl_AutoController_Weighted_ROI_Min_Size m_peak_afl_AutoController_Weighted_ROI_Min_Size{};
328 dyn_peak_afl_AutoController_Weighted_ROI_Set m_peak_afl_AutoController_Weighted_ROI_Set{};
329 dyn_peak_afl_AutoController_Weighted_ROI_Get m_peak_afl_AutoController_Weighted_ROI_Get{};
330 dyn_peak_afl_AutoController_Limit_IsSupported m_peak_afl_AutoController_Limit_IsSupported{};
331 dyn_peak_afl_AutoController_Limit_Default m_peak_afl_AutoController_Limit_Default{};
332 dyn_peak_afl_AutoController_Limit_Set m_peak_afl_AutoController_Limit_Set{};
333 dyn_peak_afl_AutoController_Limit_Get m_peak_afl_AutoController_Limit_Get{};
334 dyn_peak_afl_AutoController_Hysteresis_IsSupported m_peak_afl_AutoController_Hysteresis_IsSupported{};
335 dyn_peak_afl_AutoController_Hysteresis_Default m_peak_afl_AutoController_Hysteresis_Default{};
336 dyn_peak_afl_AutoController_Hysteresis_Set m_peak_afl_AutoController_Hysteresis_Set{};
337 dyn_peak_afl_AutoController_Hysteresis_Get m_peak_afl_AutoController_Hysteresis_Get{};
338 dyn_peak_afl_AutoController_Hysteresis_GetRange m_peak_afl_AutoController_Hysteresis_GetRange{};
339 dyn_peak_afl_AutoController_GainLimit_IsSupported m_peak_afl_AutoController_GainLimit_IsSupported{};
340 dyn_peak_afl_AutoController_GainLimit_Set m_peak_afl_AutoController_GainLimit_Set{};
341 dyn_peak_afl_AutoController_GainLimit_Get m_peak_afl_AutoController_GainLimit_Get{};
342 dyn_peak_afl_AutoController_GainLimit_GetRange m_peak_afl_AutoController_GainLimit_GetRange{};
343 dyn_peak_afl_AutoController_GainAnalogLimit_Set m_peak_afl_AutoController_GainAnalogLimit_Set{};
344 dyn_peak_afl_AutoController_GainAnalogLimit_Get m_peak_afl_AutoController_GainAnalogLimit_Get{};
345 dyn_peak_afl_AutoController_GainAnalogLimit_GetRange m_peak_afl_AutoController_GainAnalogLimit_GetRange{};
346 dyn_peak_afl_AutoController_GainDigitalLimit_Set m_peak_afl_AutoController_GainDigitalLimit_Set{};
347 dyn_peak_afl_AutoController_GainDigitalLimit_Get m_peak_afl_AutoController_GainDigitalLimit_Get{};
348 dyn_peak_afl_AutoController_GainDigitalLimit_GetRange m_peak_afl_AutoController_GainDigitalLimit_GetRange{};
349 dyn_peak_afl_AutoController_GainCombinedLimit_Set m_peak_afl_AutoController_GainCombinedLimit_Set{};
350 dyn_peak_afl_AutoController_GainCombinedLimit_Get m_peak_afl_AutoController_GainCombinedLimit_Get{};
351 dyn_peak_afl_AutoController_GainCombinedLimit_GetRange m_peak_afl_AutoController_GainCombinedLimit_GetRange{};
352 dyn_peak_afl_AutoController_GainHostLimit_Set m_peak_afl_AutoController_GainHostLimit_Set{};
353 dyn_peak_afl_AutoController_GainHostLimit_Get m_peak_afl_AutoController_GainHostLimit_Get{};
354 dyn_peak_afl_AutoController_GainHostLimit_GetRange m_peak_afl_AutoController_GainHostLimit_GetRange{};
355
356};
357
358inline void* import_function(void *module, const char* proc_name)
359{
360#ifdef __linux__
361 return dlsym(module, proc_name);
362#else
363 return reinterpret_cast<void*>(GetProcAddress(static_cast<HMODULE>(module), proc_name));
364#endif
365}
366
367inline DynamicLoader::DynamicLoader()
368{
369#if defined _WIN32 || defined _WIN64
370 size_t sz = 0;
371 if (_wgetenv_s(&sz, NULL, 0, L"IDS_PEAK_GENERIC_SDK_PATH") == 0
372 && sz > 0)
373 {
374 std::vector<wchar_t> env_ids_peak_afl(sz);
375 if (_wgetenv_s(&sz, env_ids_peak_afl.data(), sz, L"IDS_PEAK_GENERIC_SDK_PATH") == 0)
376 {
377 if (_wgetenv_s(&sz, NULL, 0, L"PATH") == 0
378 && sz > 0)
379 {
380 std::vector<wchar_t> env_path(sz);
381 if (_wgetenv_s(&sz, env_path.data(), sz, L"PATH") == 0)
382 {
383 std::wstring ids_peak_afl_path(env_ids_peak_afl.data());
384#ifdef _WIN64
385 ids_peak_afl_path.append(L"\\afl\\lib\\x86_64");
386#else
387 ids_peak_afl_path.append(L"\\afl\\lib\\x86_32");
388#endif
389 AddDllDirectory(ids_peak_afl_path.c_str());
390 }
391 }
392 }
393 }
394
395 loadLib("ids_peak_afl.dll");
396#else
397 loadLib("libids_peak_afl.so");
398#endif
399}
400
401inline DynamicLoader::~DynamicLoader()
402{
403 if(m_handle != nullptr)
404 {
405 unload();
406 }
407}
408
409inline bool DynamicLoader::isLoaded()
410{
411 auto&& inst = instance();
412 return inst.m_handle != nullptr;
413}
414
415inline void DynamicLoader::unload()
416{
417 setPointers(false);
418
419 if (m_handle != nullptr)
420 {
421#ifdef __linux__
422 dlclose(m_handle);
423#else
424 FreeLibrary(static_cast<HMODULE>(m_handle));
425#endif
426 }
427 m_handle = nullptr;
428}
429
430
431inline bool DynamicLoader::loadLib(const char* file)
432{
433 bool ret = false;
434
435 if (file)
436 {
437#ifdef __linux__
438 m_handle = dlopen(file, RTLD_NOW);
439#else
440 m_handle = LoadLibraryExA(file, nullptr, LOAD_LIBRARY_SEARCH_DEFAULT_DIRS);
441#endif
442 if (m_handle != nullptr)
443 {
444 try {
445 setPointers(true);
446 ret = true;
447 } catch (const std::exception&) {
448 unload();
449 throw;
450 }
451 }
452 else
453 {
454 throw LoadLibraryException(std::string("Lib load failed: ") + file);
455 }
456 }
457 else
458 {
459 throw LoadLibraryException("Filename empty");
460 }
461
462 return ret;
463}
464
465inline bool DynamicLoader::setPointers(bool load)
466{
467
468 m_peak_afl_Init = (dyn_peak_afl_Init) (load ? import_function(m_handle, "peak_afl_Init") : nullptr);
469 if(m_peak_afl_Init == nullptr && load)
470 {
471 throw std::runtime_error("Failed to load peak_afl_Init");
472 }
473
474 m_peak_afl_Exit = (dyn_peak_afl_Exit) (load ? import_function(m_handle, "peak_afl_Exit") : nullptr);
475 if(m_peak_afl_Exit == nullptr && load)
476 {
477 throw std::runtime_error("Failed to load peak_afl_Exit");
478 }
479
480 m_peak_afl_GetLastError = (dyn_peak_afl_GetLastError) (load ? import_function(m_handle, "peak_afl_GetLastError") : nullptr);
481 if(m_peak_afl_GetLastError == nullptr && load)
482 {
483 throw std::runtime_error("Failed to load peak_afl_GetLastError");
484 }
485
486 m_peak_afl_GetVersion = (dyn_peak_afl_GetVersion) (load ? import_function(m_handle, "peak_afl_GetVersion") : nullptr);
487 if(m_peak_afl_GetVersion == nullptr && load)
488 {
489 throw std::runtime_error("Failed to load peak_afl_GetVersion");
490 }
491
492 m_peak_afl_AutoFeatureManager_Create = (dyn_peak_afl_AutoFeatureManager_Create) (load ? import_function(m_handle, "peak_afl_AutoFeatureManager_Create") : nullptr);
493 if(m_peak_afl_AutoFeatureManager_Create == nullptr && load)
494 {
495 throw std::runtime_error("Failed to load peak_afl_AutoFeatureManager_Create");
496 }
497
498 m_peak_afl_AutoFeatureManager_Destroy = (dyn_peak_afl_AutoFeatureManager_Destroy) (load ? import_function(m_handle, "peak_afl_AutoFeatureManager_Destroy") : nullptr);
499 if(m_peak_afl_AutoFeatureManager_Destroy == nullptr && load)
500 {
501 throw std::runtime_error("Failed to load peak_afl_AutoFeatureManager_Destroy");
502 }
503
504 m_peak_afl_AutoFeatureManager_AddController = (dyn_peak_afl_AutoFeatureManager_AddController) (load ? import_function(m_handle, "peak_afl_AutoFeatureManager_AddController") : nullptr);
505 if(m_peak_afl_AutoFeatureManager_AddController == nullptr && load)
506 {
507 throw std::runtime_error("Failed to load peak_afl_AutoFeatureManager_AddController");
508 }
509
510 m_peak_afl_AutoFeatureManager_RemoveController = (dyn_peak_afl_AutoFeatureManager_RemoveController) (load ? import_function(m_handle, "peak_afl_AutoFeatureManager_RemoveController") : nullptr);
511 if(m_peak_afl_AutoFeatureManager_RemoveController == nullptr && load)
512 {
513 throw std::runtime_error("Failed to load peak_afl_AutoFeatureManager_RemoveController");
514 }
515
516 m_peak_afl_AutoFeatureManager_Process = (dyn_peak_afl_AutoFeatureManager_Process) (load ? import_function(m_handle, "peak_afl_AutoFeatureManager_Process") : nullptr);
517 if(m_peak_afl_AutoFeatureManager_Process == nullptr && load)
518 {
519 throw std::runtime_error("Failed to load peak_afl_AutoFeatureManager_Process");
520 }
521
522 m_peak_afl_AutoFeatureManager_CreateController = (dyn_peak_afl_AutoFeatureManager_CreateController) (load ? import_function(m_handle, "peak_afl_AutoFeatureManager_CreateController") : nullptr);
523 if(m_peak_afl_AutoFeatureManager_CreateController == nullptr && load)
524 {
525 throw std::runtime_error("Failed to load peak_afl_AutoFeatureManager_CreateController");
526 }
527
528 m_peak_afl_AutoFeatureManager_DestroyAllController = (dyn_peak_afl_AutoFeatureManager_DestroyAllController) (load ? import_function(m_handle, "peak_afl_AutoFeatureManager_DestroyAllController") : nullptr);
529 if(m_peak_afl_AutoFeatureManager_DestroyAllController == nullptr && load)
530 {
531 throw std::runtime_error("Failed to load peak_afl_AutoFeatureManager_DestroyAllController");
532 }
533
534 m_peak_afl_AutoFeatureManager_DestroyController = (dyn_peak_afl_AutoFeatureManager_DestroyController) (load ? import_function(m_handle, "peak_afl_AutoFeatureManager_DestroyController") : nullptr);
535 if(m_peak_afl_AutoFeatureManager_DestroyController == nullptr && load)
536 {
537 throw std::runtime_error("Failed to load peak_afl_AutoFeatureManager_DestroyController");
538 }
539
540 m_peak_afl_AutoFeatureManager_SetGainIPL = (dyn_peak_afl_AutoFeatureManager_SetGainIPL) (load ? import_function(m_handle, "peak_afl_AutoFeatureManager_SetGainIPL") : nullptr);
541 if(m_peak_afl_AutoFeatureManager_SetGainIPL == nullptr && load)
542 {
543 throw std::runtime_error("Failed to load peak_afl_AutoFeatureManager_SetGainIPL");
544 }
545
546 m_peak_afl_AutoFeatureManager_SetCCM = (dyn_peak_afl_AutoFeatureManager_SetCCM) (load ? import_function(m_handle, "peak_afl_AutoFeatureManager_SetCCM") : nullptr);
547 if(m_peak_afl_AutoFeatureManager_SetCCM == nullptr && load)
548 {
549 throw std::runtime_error("Failed to load peak_afl_AutoFeatureManager_SetCCM");
550 }
551
552 m_peak_afl_AutoFeatureManager_Status = (dyn_peak_afl_AutoFeatureManager_Status) (load ? import_function(m_handle, "peak_afl_AutoFeatureManager_Status") : nullptr);
553 if(m_peak_afl_AutoFeatureManager_Status == nullptr && load)
554 {
555 throw std::runtime_error("Failed to load peak_afl_AutoFeatureManager_Status");
556 }
557
558 m_peak_afl_AutoFeatureManager_Controller_IsSupported = (dyn_peak_afl_AutoFeatureManager_Controller_IsSupported) (load ? import_function(m_handle, "peak_afl_AutoFeatureManager_Controller_IsSupported") : nullptr);
559 if(m_peak_afl_AutoFeatureManager_Controller_IsSupported == nullptr && load)
560 {
561 throw std::runtime_error("Failed to load peak_afl_AutoFeatureManager_Controller_IsSupported");
562 }
563
564 m_peak_afl_AutoController_Create = (dyn_peak_afl_AutoController_Create) (load ? import_function(m_handle, "peak_afl_AutoController_Create") : nullptr);
565 if(m_peak_afl_AutoController_Create == nullptr && load)
566 {
567 throw std::runtime_error("Failed to load peak_afl_AutoController_Create");
568 }
569
570 m_peak_afl_AutoController_Destroy = (dyn_peak_afl_AutoController_Destroy) (load ? import_function(m_handle, "peak_afl_AutoController_Destroy") : nullptr);
571 if(m_peak_afl_AutoController_Destroy == nullptr && load)
572 {
573 throw std::runtime_error("Failed to load peak_afl_AutoController_Destroy");
574 }
575
576 m_peak_afl_AutoController_SkipFrames_IsSupported = (dyn_peak_afl_AutoController_SkipFrames_IsSupported) (load ? import_function(m_handle, "peak_afl_AutoController_SkipFrames_IsSupported") : nullptr);
577 if(m_peak_afl_AutoController_SkipFrames_IsSupported == nullptr && load)
578 {
579 throw std::runtime_error("Failed to load peak_afl_AutoController_SkipFrames_IsSupported");
580 }
581
582 m_peak_afl_AutoController_SkipFrames_Set = (dyn_peak_afl_AutoController_SkipFrames_Set) (load ? import_function(m_handle, "peak_afl_AutoController_SkipFrames_Set") : nullptr);
583 if(m_peak_afl_AutoController_SkipFrames_Set == nullptr && load)
584 {
585 throw std::runtime_error("Failed to load peak_afl_AutoController_SkipFrames_Set");
586 }
587
588 m_peak_afl_AutoController_SkipFrames_Get = (dyn_peak_afl_AutoController_SkipFrames_Get) (load ? import_function(m_handle, "peak_afl_AutoController_SkipFrames_Get") : nullptr);
589 if(m_peak_afl_AutoController_SkipFrames_Get == nullptr && load)
590 {
591 throw std::runtime_error("Failed to load peak_afl_AutoController_SkipFrames_Get");
592 }
593
594 m_peak_afl_AutoController_SkipFrames_GetRange = (dyn_peak_afl_AutoController_SkipFrames_GetRange) (load ? import_function(m_handle, "peak_afl_AutoController_SkipFrames_GetRange") : nullptr);
595 if(m_peak_afl_AutoController_SkipFrames_GetRange == nullptr && load)
596 {
597 throw std::runtime_error("Failed to load peak_afl_AutoController_SkipFrames_GetRange");
598 }
599
600 m_peak_afl_AutoController_ROI_IsSupported = (dyn_peak_afl_AutoController_ROI_IsSupported) (load ? import_function(m_handle, "peak_afl_AutoController_ROI_IsSupported") : nullptr);
601 if(m_peak_afl_AutoController_ROI_IsSupported == nullptr && load)
602 {
603 throw std::runtime_error("Failed to load peak_afl_AutoController_ROI_IsSupported");
604 }
605
606 m_peak_afl_AutoController_ROI_Set = (dyn_peak_afl_AutoController_ROI_Set) (load ? import_function(m_handle, "peak_afl_AutoController_ROI_Set") : nullptr);
607 if(m_peak_afl_AutoController_ROI_Set == nullptr && load)
608 {
609 throw std::runtime_error("Failed to load peak_afl_AutoController_ROI_Set");
610 }
611
612 m_peak_afl_AutoController_ROI_Get = (dyn_peak_afl_AutoController_ROI_Get) (load ? import_function(m_handle, "peak_afl_AutoController_ROI_Get") : nullptr);
613 if(m_peak_afl_AutoController_ROI_Get == nullptr && load)
614 {
615 throw std::runtime_error("Failed to load peak_afl_AutoController_ROI_Get");
616 }
617
618 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);
619 if(m_peak_afl_AutoController_ROI_Preset_IsSupported == nullptr && load)
620 {
621 throw std::runtime_error("Failed to load peak_afl_AutoController_ROI_Preset_IsSupported");
622 }
623
624 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);
625 if(m_peak_afl_AutoController_ROI_Preset_Set == nullptr && load)
626 {
627 throw std::runtime_error("Failed to load peak_afl_AutoController_ROI_Preset_Set");
628 }
629
630 m_peak_afl_AutoController_Mode_IsSupported = (dyn_peak_afl_AutoController_Mode_IsSupported) (load ? import_function(m_handle, "peak_afl_AutoController_Mode_IsSupported") : nullptr);
631 if(m_peak_afl_AutoController_Mode_IsSupported == nullptr && load)
632 {
633 throw std::runtime_error("Failed to load peak_afl_AutoController_Mode_IsSupported");
634 }
635
636 m_peak_afl_AutoController_Mode_Set = (dyn_peak_afl_AutoController_Mode_Set) (load ? import_function(m_handle, "peak_afl_AutoController_Mode_Set") : nullptr);
637 if(m_peak_afl_AutoController_Mode_Set == nullptr && load)
638 {
639 throw std::runtime_error("Failed to load peak_afl_AutoController_Mode_Set");
640 }
641
642 m_peak_afl_AutoController_Mode_Get = (dyn_peak_afl_AutoController_Mode_Get) (load ? import_function(m_handle, "peak_afl_AutoController_Mode_Get") : nullptr);
643 if(m_peak_afl_AutoController_Mode_Get == nullptr && load)
644 {
645 throw std::runtime_error("Failed to load peak_afl_AutoController_Mode_Get");
646 }
647
648 m_peak_afl_AutoController_BrightnessAlgorithm_Set = (dyn_peak_afl_AutoController_BrightnessAlgorithm_Set) (load ? import_function(m_handle, "peak_afl_AutoController_BrightnessAlgorithm_Set") : nullptr);
649 if(m_peak_afl_AutoController_BrightnessAlgorithm_Set == nullptr && load)
650 {
651 throw std::runtime_error("Failed to load peak_afl_AutoController_BrightnessAlgorithm_Set");
652 }
653
654 m_peak_afl_AutoController_BrightnessAlgorithm_Get = (dyn_peak_afl_AutoController_BrightnessAlgorithm_Get) (load ? import_function(m_handle, "peak_afl_AutoController_BrightnessAlgorithm_Get") : nullptr);
655 if(m_peak_afl_AutoController_BrightnessAlgorithm_Get == nullptr && load)
656 {
657 throw std::runtime_error("Failed to load peak_afl_AutoController_BrightnessAlgorithm_Get");
658 }
659
660 m_peak_afl_AutoController_BrightnessAlgorithm_IsSupported = (dyn_peak_afl_AutoController_BrightnessAlgorithm_IsSupported) (load ? import_function(m_handle, "peak_afl_AutoController_BrightnessAlgorithm_IsSupported") : nullptr);
661 if(m_peak_afl_AutoController_BrightnessAlgorithm_IsSupported == nullptr && load)
662 {
663 throw std::runtime_error("Failed to load peak_afl_AutoController_BrightnessAlgorithm_IsSupported");
664 }
665
666 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);
667 if(m_peak_afl_AutoController_BrightnessComponent_Mode_IsSupported == nullptr && load)
668 {
669 throw std::runtime_error("Failed to load peak_afl_AutoController_BrightnessComponent_Mode_IsSupported");
670 }
671
672 m_peak_afl_AutoController_BrightnessComponent_Unit_IsSupported = (dyn_peak_afl_AutoController_BrightnessComponent_Unit_IsSupported) (load ? import_function(m_handle, "peak_afl_AutoController_BrightnessComponent_Unit_IsSupported") : nullptr);
673 if(m_peak_afl_AutoController_BrightnessComponent_Unit_IsSupported == nullptr && load)
674 {
675 throw std::runtime_error("Failed to load peak_afl_AutoController_BrightnessComponent_Unit_IsSupported");
676 }
677
678 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);
679 if(m_peak_afl_AutoController_BrightnessComponent_Mode_Set == nullptr && load)
680 {
681 throw std::runtime_error("Failed to load peak_afl_AutoController_BrightnessComponent_Mode_Set");
682 }
683
684 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);
685 if(m_peak_afl_AutoController_BrightnessComponent_Mode_Get == nullptr && load)
686 {
687 throw std::runtime_error("Failed to load peak_afl_AutoController_BrightnessComponent_Mode_Get");
688 }
689
690 m_peak_afl_AutoController_BrightnessComponent_Status = (dyn_peak_afl_AutoController_BrightnessComponent_Status) (load ? import_function(m_handle, "peak_afl_AutoController_BrightnessComponent_Status") : nullptr);
691 if(m_peak_afl_AutoController_BrightnessComponent_Status == nullptr && load)
692 {
693 throw std::runtime_error("Failed to load peak_afl_AutoController_BrightnessComponent_Status");
694 }
695
696 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);
697 if(m_peak_afl_AutoController_BrightnessComponent_Callback_Set == nullptr && load)
698 {
699 throw std::runtime_error("Failed to load peak_afl_AutoController_BrightnessComponent_Callback_Set");
700 }
701
702 m_peak_afl_AutoController_ExposureLimit_IsSupported = (dyn_peak_afl_AutoController_ExposureLimit_IsSupported) (load ? import_function(m_handle, "peak_afl_AutoController_ExposureLimit_IsSupported") : nullptr);
703 if(m_peak_afl_AutoController_ExposureLimit_IsSupported == nullptr && load)
704 {
705 throw std::runtime_error("Failed to load peak_afl_AutoController_ExposureLimit_IsSupported");
706 }
707
708 m_peak_afl_AutoController_ExposureLimit_Set = (dyn_peak_afl_AutoController_ExposureLimit_Set) (load ? import_function(m_handle, "peak_afl_AutoController_ExposureLimit_Set") : nullptr);
709 if(m_peak_afl_AutoController_ExposureLimit_Set == nullptr && load)
710 {
711 throw std::runtime_error("Failed to load peak_afl_AutoController_ExposureLimit_Set");
712 }
713
714 m_peak_afl_AutoController_ExposureLimit_Get = (dyn_peak_afl_AutoController_ExposureLimit_Get) (load ? import_function(m_handle, "peak_afl_AutoController_ExposureLimit_Get") : nullptr);
715 if(m_peak_afl_AutoController_ExposureLimit_Get == nullptr && load)
716 {
717 throw std::runtime_error("Failed to load peak_afl_AutoController_ExposureLimit_Get");
718 }
719
720 m_peak_afl_AutoController_Status = (dyn_peak_afl_AutoController_Status) (load ? import_function(m_handle, "peak_afl_AutoController_Status") : nullptr);
721 if(m_peak_afl_AutoController_Status == nullptr && load)
722 {
723 throw std::runtime_error("Failed to load peak_afl_AutoController_Status");
724 }
725
726 m_peak_afl_AutoController_GetLastAutoAverage = (dyn_peak_afl_AutoController_GetLastAutoAverage) (load ? import_function(m_handle, "peak_afl_AutoController_GetLastAutoAverage") : nullptr);
727 if(m_peak_afl_AutoController_GetLastAutoAverage == nullptr && load)
728 {
729 throw std::runtime_error("Failed to load peak_afl_AutoController_GetLastAutoAverage");
730 }
731
732 m_peak_afl_AutoController_GetLastAutoAverages = (dyn_peak_afl_AutoController_GetLastAutoAverages) (load ? import_function(m_handle, "peak_afl_AutoController_GetLastAutoAverages") : nullptr);
733 if(m_peak_afl_AutoController_GetLastAutoAverages == nullptr && load)
734 {
735 throw std::runtime_error("Failed to load peak_afl_AutoController_GetLastAutoAverages");
736 }
737
738 m_peak_afl_AutoController_AutoTarget_IsSupported = (dyn_peak_afl_AutoController_AutoTarget_IsSupported) (load ? import_function(m_handle, "peak_afl_AutoController_AutoTarget_IsSupported") : nullptr);
739 if(m_peak_afl_AutoController_AutoTarget_IsSupported == nullptr && load)
740 {
741 throw std::runtime_error("Failed to load peak_afl_AutoController_AutoTarget_IsSupported");
742 }
743
744 m_peak_afl_AutoController_AutoTarget_Set = (dyn_peak_afl_AutoController_AutoTarget_Set) (load ? import_function(m_handle, "peak_afl_AutoController_AutoTarget_Set") : nullptr);
745 if(m_peak_afl_AutoController_AutoTarget_Set == nullptr && load)
746 {
747 throw std::runtime_error("Failed to load peak_afl_AutoController_AutoTarget_Set");
748 }
749
750 m_peak_afl_AutoController_AutoTarget_Get = (dyn_peak_afl_AutoController_AutoTarget_Get) (load ? import_function(m_handle, "peak_afl_AutoController_AutoTarget_Get") : nullptr);
751 if(m_peak_afl_AutoController_AutoTarget_Get == nullptr && load)
752 {
753 throw std::runtime_error("Failed to load peak_afl_AutoController_AutoTarget_Get");
754 }
755
756 m_peak_afl_AutoController_AutoTarget_GetRange = (dyn_peak_afl_AutoController_AutoTarget_GetRange) (load ? import_function(m_handle, "peak_afl_AutoController_AutoTarget_GetRange") : nullptr);
757 if(m_peak_afl_AutoController_AutoTarget_GetRange == nullptr && load)
758 {
759 throw std::runtime_error("Failed to load peak_afl_AutoController_AutoTarget_GetRange");
760 }
761
762 m_peak_afl_AutoController_AutoTolerance_IsSupported = (dyn_peak_afl_AutoController_AutoTolerance_IsSupported) (load ? import_function(m_handle, "peak_afl_AutoController_AutoTolerance_IsSupported") : nullptr);
763 if(m_peak_afl_AutoController_AutoTolerance_IsSupported == nullptr && load)
764 {
765 throw std::runtime_error("Failed to load peak_afl_AutoController_AutoTolerance_IsSupported");
766 }
767
768 m_peak_afl_AutoController_AutoTolerance_Set = (dyn_peak_afl_AutoController_AutoTolerance_Set) (load ? import_function(m_handle, "peak_afl_AutoController_AutoTolerance_Set") : nullptr);
769 if(m_peak_afl_AutoController_AutoTolerance_Set == nullptr && load)
770 {
771 throw std::runtime_error("Failed to load peak_afl_AutoController_AutoTolerance_Set");
772 }
773
774 m_peak_afl_AutoController_AutoTolerance_Get = (dyn_peak_afl_AutoController_AutoTolerance_Get) (load ? import_function(m_handle, "peak_afl_AutoController_AutoTolerance_Get") : nullptr);
775 if(m_peak_afl_AutoController_AutoTolerance_Get == nullptr && load)
776 {
777 throw std::runtime_error("Failed to load peak_afl_AutoController_AutoTolerance_Get");
778 }
779
780 m_peak_afl_AutoController_AutoTolerance_GetRange = (dyn_peak_afl_AutoController_AutoTolerance_GetRange) (load ? import_function(m_handle, "peak_afl_AutoController_AutoTolerance_GetRange") : nullptr);
781 if(m_peak_afl_AutoController_AutoTolerance_GetRange == nullptr && load)
782 {
783 throw std::runtime_error("Failed to load peak_afl_AutoController_AutoTolerance_GetRange");
784 }
785
786 m_peak_afl_AutoController_AutoPercentile_IsSupported = (dyn_peak_afl_AutoController_AutoPercentile_IsSupported) (load ? import_function(m_handle, "peak_afl_AutoController_AutoPercentile_IsSupported") : nullptr);
787 if(m_peak_afl_AutoController_AutoPercentile_IsSupported == nullptr && load)
788 {
789 throw std::runtime_error("Failed to load peak_afl_AutoController_AutoPercentile_IsSupported");
790 }
791
792 m_peak_afl_AutoController_AutoPercentile_Set = (dyn_peak_afl_AutoController_AutoPercentile_Set) (load ? import_function(m_handle, "peak_afl_AutoController_AutoPercentile_Set") : nullptr);
793 if(m_peak_afl_AutoController_AutoPercentile_Set == nullptr && load)
794 {
795 throw std::runtime_error("Failed to load peak_afl_AutoController_AutoPercentile_Set");
796 }
797
798 m_peak_afl_AutoController_AutoPercentile_Get = (dyn_peak_afl_AutoController_AutoPercentile_Get) (load ? import_function(m_handle, "peak_afl_AutoController_AutoPercentile_Get") : nullptr);
799 if(m_peak_afl_AutoController_AutoPercentile_Get == nullptr && load)
800 {
801 throw std::runtime_error("Failed to load peak_afl_AutoController_AutoPercentile_Get");
802 }
803
804 m_peak_afl_AutoController_AutoPercentile_GetRange = (dyn_peak_afl_AutoController_AutoPercentile_GetRange) (load ? import_function(m_handle, "peak_afl_AutoController_AutoPercentile_GetRange") : nullptr);
805 if(m_peak_afl_AutoController_AutoPercentile_GetRange == nullptr && load)
806 {
807 throw std::runtime_error("Failed to load peak_afl_AutoController_AutoPercentile_GetRange");
808 }
809
810 m_peak_afl_AutoController_Type_Get = (dyn_peak_afl_AutoController_Type_Get) (load ? import_function(m_handle, "peak_afl_AutoController_Type_Get") : nullptr);
811 if(m_peak_afl_AutoController_Type_Get == nullptr && load)
812 {
813 throw std::runtime_error("Failed to load peak_afl_AutoController_Type_Get");
814 }
815
816 m_peak_afl_AutoController_Algorithm_IsSupported = (dyn_peak_afl_AutoController_Algorithm_IsSupported) (load ? import_function(m_handle, "peak_afl_AutoController_Algorithm_IsSupported") : nullptr);
817 if(m_peak_afl_AutoController_Algorithm_IsSupported == nullptr && load)
818 {
819 throw std::runtime_error("Failed to load peak_afl_AutoController_Algorithm_IsSupported");
820 }
821
822 m_peak_afl_AutoController_Algorithm_Set = (dyn_peak_afl_AutoController_Algorithm_Set) (load ? import_function(m_handle, "peak_afl_AutoController_Algorithm_Set") : nullptr);
823 if(m_peak_afl_AutoController_Algorithm_Set == nullptr && load)
824 {
825 throw std::runtime_error("Failed to load peak_afl_AutoController_Algorithm_Set");
826 }
827
828 m_peak_afl_AutoController_Algorithm_Get = (dyn_peak_afl_AutoController_Algorithm_Get) (load ? import_function(m_handle, "peak_afl_AutoController_Algorithm_Get") : nullptr);
829 if(m_peak_afl_AutoController_Algorithm_Get == nullptr && load)
830 {
831 throw std::runtime_error("Failed to load peak_afl_AutoController_Algorithm_Get");
832 }
833
834 m_peak_afl_AutoController_Algorithm_GetList = (dyn_peak_afl_AutoController_Algorithm_GetList) (load ? import_function(m_handle, "peak_afl_AutoController_Algorithm_GetList") : nullptr);
835 if(m_peak_afl_AutoController_Algorithm_GetList == nullptr && load)
836 {
837 throw std::runtime_error("Failed to load peak_afl_AutoController_Algorithm_GetList");
838 }
839
840 m_peak_afl_AutoController_SharpnessAlgorithm_IsSupported = (dyn_peak_afl_AutoController_SharpnessAlgorithm_IsSupported) (load ? import_function(m_handle, "peak_afl_AutoController_SharpnessAlgorithm_IsSupported") : nullptr);
841 if(m_peak_afl_AutoController_SharpnessAlgorithm_IsSupported == nullptr && load)
842 {
843 throw std::runtime_error("Failed to load peak_afl_AutoController_SharpnessAlgorithm_IsSupported");
844 }
845
846 m_peak_afl_AutoController_SharpnessAlgorithm_Set = (dyn_peak_afl_AutoController_SharpnessAlgorithm_Set) (load ? import_function(m_handle, "peak_afl_AutoController_SharpnessAlgorithm_Set") : nullptr);
847 if(m_peak_afl_AutoController_SharpnessAlgorithm_Set == nullptr && load)
848 {
849 throw std::runtime_error("Failed to load peak_afl_AutoController_SharpnessAlgorithm_Set");
850 }
851
852 m_peak_afl_AutoController_SharpnessAlgorithm_Get = (dyn_peak_afl_AutoController_SharpnessAlgorithm_Get) (load ? import_function(m_handle, "peak_afl_AutoController_SharpnessAlgorithm_Get") : nullptr);
853 if(m_peak_afl_AutoController_SharpnessAlgorithm_Get == nullptr && load)
854 {
855 throw std::runtime_error("Failed to load peak_afl_AutoController_SharpnessAlgorithm_Get");
856 }
857
858 m_peak_afl_AutoController_SharpnessAlgorithm_GetList = (dyn_peak_afl_AutoController_SharpnessAlgorithm_GetList) (load ? import_function(m_handle, "peak_afl_AutoController_SharpnessAlgorithm_GetList") : nullptr);
859 if(m_peak_afl_AutoController_SharpnessAlgorithm_GetList == nullptr && load)
860 {
861 throw std::runtime_error("Failed to load peak_afl_AutoController_SharpnessAlgorithm_GetList");
862 }
863
864 m_peak_afl_AutoController_Callback_Set = (dyn_peak_afl_AutoController_Callback_Set) (load ? import_function(m_handle, "peak_afl_AutoController_Callback_Set") : nullptr);
865 if(m_peak_afl_AutoController_Callback_Set == nullptr && load)
866 {
867 throw std::runtime_error("Failed to load peak_afl_AutoController_Callback_Set");
868 }
869
870 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);
871 if(m_peak_afl_AutoController_Weighted_ROI_IsSupported == nullptr && load)
872 {
873 throw std::runtime_error("Failed to load peak_afl_AutoController_Weighted_ROI_IsSupported");
874 }
875
876 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);
877 if(m_peak_afl_AutoController_Weighted_ROI_Min_Size == nullptr && load)
878 {
879 throw std::runtime_error("Failed to load peak_afl_AutoController_Weighted_ROI_Min_Size");
880 }
881
882 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);
883 if(m_peak_afl_AutoController_Weighted_ROI_Set == nullptr && load)
884 {
885 throw std::runtime_error("Failed to load peak_afl_AutoController_Weighted_ROI_Set");
886 }
887
888 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);
889 if(m_peak_afl_AutoController_Weighted_ROI_Get == nullptr && load)
890 {
891 throw std::runtime_error("Failed to load peak_afl_AutoController_Weighted_ROI_Get");
892 }
893
894 m_peak_afl_AutoController_Limit_IsSupported = (dyn_peak_afl_AutoController_Limit_IsSupported) (load ? import_function(m_handle, "peak_afl_AutoController_Limit_IsSupported") : nullptr);
895 if(m_peak_afl_AutoController_Limit_IsSupported == nullptr && load)
896 {
897 throw std::runtime_error("Failed to load peak_afl_AutoController_Limit_IsSupported");
898 }
899
900 m_peak_afl_AutoController_Limit_Default = (dyn_peak_afl_AutoController_Limit_Default) (load ? import_function(m_handle, "peak_afl_AutoController_Limit_Default") : nullptr);
901 if(m_peak_afl_AutoController_Limit_Default == nullptr && load)
902 {
903 throw std::runtime_error("Failed to load peak_afl_AutoController_Limit_Default");
904 }
905
906 m_peak_afl_AutoController_Limit_Set = (dyn_peak_afl_AutoController_Limit_Set) (load ? import_function(m_handle, "peak_afl_AutoController_Limit_Set") : nullptr);
907 if(m_peak_afl_AutoController_Limit_Set == nullptr && load)
908 {
909 throw std::runtime_error("Failed to load peak_afl_AutoController_Limit_Set");
910 }
911
912 m_peak_afl_AutoController_Limit_Get = (dyn_peak_afl_AutoController_Limit_Get) (load ? import_function(m_handle, "peak_afl_AutoController_Limit_Get") : nullptr);
913 if(m_peak_afl_AutoController_Limit_Get == nullptr && load)
914 {
915 throw std::runtime_error("Failed to load peak_afl_AutoController_Limit_Get");
916 }
917
918 m_peak_afl_AutoController_Hysteresis_IsSupported = (dyn_peak_afl_AutoController_Hysteresis_IsSupported) (load ? import_function(m_handle, "peak_afl_AutoController_Hysteresis_IsSupported") : nullptr);
919 if(m_peak_afl_AutoController_Hysteresis_IsSupported == nullptr && load)
920 {
921 throw std::runtime_error("Failed to load peak_afl_AutoController_Hysteresis_IsSupported");
922 }
923
924 m_peak_afl_AutoController_Hysteresis_Default = (dyn_peak_afl_AutoController_Hysteresis_Default) (load ? import_function(m_handle, "peak_afl_AutoController_Hysteresis_Default") : nullptr);
925 if(m_peak_afl_AutoController_Hysteresis_Default == nullptr && load)
926 {
927 throw std::runtime_error("Failed to load peak_afl_AutoController_Hysteresis_Default");
928 }
929
930 m_peak_afl_AutoController_Hysteresis_Set = (dyn_peak_afl_AutoController_Hysteresis_Set) (load ? import_function(m_handle, "peak_afl_AutoController_Hysteresis_Set") : nullptr);
931 if(m_peak_afl_AutoController_Hysteresis_Set == nullptr && load)
932 {
933 throw std::runtime_error("Failed to load peak_afl_AutoController_Hysteresis_Set");
934 }
935
936 m_peak_afl_AutoController_Hysteresis_Get = (dyn_peak_afl_AutoController_Hysteresis_Get) (load ? import_function(m_handle, "peak_afl_AutoController_Hysteresis_Get") : nullptr);
937 if(m_peak_afl_AutoController_Hysteresis_Get == nullptr && load)
938 {
939 throw std::runtime_error("Failed to load peak_afl_AutoController_Hysteresis_Get");
940 }
941
942 m_peak_afl_AutoController_Hysteresis_GetRange = (dyn_peak_afl_AutoController_Hysteresis_GetRange) (load ? import_function(m_handle, "peak_afl_AutoController_Hysteresis_GetRange") : nullptr);
943 if(m_peak_afl_AutoController_Hysteresis_GetRange == nullptr && load)
944 {
945 throw std::runtime_error("Failed to load peak_afl_AutoController_Hysteresis_GetRange");
946 }
947
948 m_peak_afl_AutoController_GainLimit_IsSupported = (dyn_peak_afl_AutoController_GainLimit_IsSupported) (load ? import_function(m_handle, "peak_afl_AutoController_GainLimit_IsSupported") : nullptr);
949 if(m_peak_afl_AutoController_GainLimit_IsSupported == nullptr && load)
950 {
951 throw std::runtime_error("Failed to load peak_afl_AutoController_GainLimit_IsSupported");
952 }
953
954 m_peak_afl_AutoController_GainLimit_Set = (dyn_peak_afl_AutoController_GainLimit_Set) (load ? import_function(m_handle, "peak_afl_AutoController_GainLimit_Set") : nullptr);
955 if(m_peak_afl_AutoController_GainLimit_Set == nullptr && load)
956 {
957 throw std::runtime_error("Failed to load peak_afl_AutoController_GainLimit_Set");
958 }
959
960 m_peak_afl_AutoController_GainLimit_Get = (dyn_peak_afl_AutoController_GainLimit_Get) (load ? import_function(m_handle, "peak_afl_AutoController_GainLimit_Get") : nullptr);
961 if(m_peak_afl_AutoController_GainLimit_Get == nullptr && load)
962 {
963 throw std::runtime_error("Failed to load peak_afl_AutoController_GainLimit_Get");
964 }
965
966 m_peak_afl_AutoController_GainLimit_GetRange = (dyn_peak_afl_AutoController_GainLimit_GetRange) (load ? import_function(m_handle, "peak_afl_AutoController_GainLimit_GetRange") : nullptr);
967 if(m_peak_afl_AutoController_GainLimit_GetRange == nullptr && load)
968 {
969 throw std::runtime_error("Failed to load peak_afl_AutoController_GainLimit_GetRange");
970 }
971
972 m_peak_afl_AutoController_GainAnalogLimit_Set = (dyn_peak_afl_AutoController_GainAnalogLimit_Set) (load ? import_function(m_handle, "peak_afl_AutoController_GainAnalogLimit_Set") : nullptr);
973 if(m_peak_afl_AutoController_GainAnalogLimit_Set == nullptr && load)
974 {
975 throw std::runtime_error("Failed to load peak_afl_AutoController_GainAnalogLimit_Set");
976 }
977
978 m_peak_afl_AutoController_GainAnalogLimit_Get = (dyn_peak_afl_AutoController_GainAnalogLimit_Get) (load ? import_function(m_handle, "peak_afl_AutoController_GainAnalogLimit_Get") : nullptr);
979 if(m_peak_afl_AutoController_GainAnalogLimit_Get == nullptr && load)
980 {
981 throw std::runtime_error("Failed to load peak_afl_AutoController_GainAnalogLimit_Get");
982 }
983
984 m_peak_afl_AutoController_GainAnalogLimit_GetRange = (dyn_peak_afl_AutoController_GainAnalogLimit_GetRange) (load ? import_function(m_handle, "peak_afl_AutoController_GainAnalogLimit_GetRange") : nullptr);
985 if(m_peak_afl_AutoController_GainAnalogLimit_GetRange == nullptr && load)
986 {
987 throw std::runtime_error("Failed to load peak_afl_AutoController_GainAnalogLimit_GetRange");
988 }
989
990 m_peak_afl_AutoController_GainDigitalLimit_Set = (dyn_peak_afl_AutoController_GainDigitalLimit_Set) (load ? import_function(m_handle, "peak_afl_AutoController_GainDigitalLimit_Set") : nullptr);
991 if(m_peak_afl_AutoController_GainDigitalLimit_Set == nullptr && load)
992 {
993 throw std::runtime_error("Failed to load peak_afl_AutoController_GainDigitalLimit_Set");
994 }
995
996 m_peak_afl_AutoController_GainDigitalLimit_Get = (dyn_peak_afl_AutoController_GainDigitalLimit_Get) (load ? import_function(m_handle, "peak_afl_AutoController_GainDigitalLimit_Get") : nullptr);
997 if(m_peak_afl_AutoController_GainDigitalLimit_Get == nullptr && load)
998 {
999 throw std::runtime_error("Failed to load peak_afl_AutoController_GainDigitalLimit_Get");
1000 }
1001
1002 m_peak_afl_AutoController_GainDigitalLimit_GetRange = (dyn_peak_afl_AutoController_GainDigitalLimit_GetRange) (load ? import_function(m_handle, "peak_afl_AutoController_GainDigitalLimit_GetRange") : nullptr);
1003 if(m_peak_afl_AutoController_GainDigitalLimit_GetRange == nullptr && load)
1004 {
1005 throw std::runtime_error("Failed to load peak_afl_AutoController_GainDigitalLimit_GetRange");
1006 }
1007
1008 m_peak_afl_AutoController_GainCombinedLimit_Set = (dyn_peak_afl_AutoController_GainCombinedLimit_Set) (load ? import_function(m_handle, "peak_afl_AutoController_GainCombinedLimit_Set") : nullptr);
1009 if(m_peak_afl_AutoController_GainCombinedLimit_Set == nullptr && load)
1010 {
1011 throw std::runtime_error("Failed to load peak_afl_AutoController_GainCombinedLimit_Set");
1012 }
1013
1014 m_peak_afl_AutoController_GainCombinedLimit_Get = (dyn_peak_afl_AutoController_GainCombinedLimit_Get) (load ? import_function(m_handle, "peak_afl_AutoController_GainCombinedLimit_Get") : nullptr);
1015 if(m_peak_afl_AutoController_GainCombinedLimit_Get == nullptr && load)
1016 {
1017 throw std::runtime_error("Failed to load peak_afl_AutoController_GainCombinedLimit_Get");
1018 }
1019
1020 m_peak_afl_AutoController_GainCombinedLimit_GetRange = (dyn_peak_afl_AutoController_GainCombinedLimit_GetRange) (load ? import_function(m_handle, "peak_afl_AutoController_GainCombinedLimit_GetRange") : nullptr);
1021 if(m_peak_afl_AutoController_GainCombinedLimit_GetRange == nullptr && load)
1022 {
1023 throw std::runtime_error("Failed to load peak_afl_AutoController_GainCombinedLimit_GetRange");
1024 }
1025
1026 m_peak_afl_AutoController_GainHostLimit_Set = (dyn_peak_afl_AutoController_GainHostLimit_Set) (load ? import_function(m_handle, "peak_afl_AutoController_GainHostLimit_Set") : nullptr);
1027 if(m_peak_afl_AutoController_GainHostLimit_Set == nullptr && load)
1028 {
1029 throw std::runtime_error("Failed to load peak_afl_AutoController_GainHostLimit_Set");
1030 }
1031
1032 m_peak_afl_AutoController_GainHostLimit_Get = (dyn_peak_afl_AutoController_GainHostLimit_Get) (load ? import_function(m_handle, "peak_afl_AutoController_GainHostLimit_Get") : nullptr);
1033 if(m_peak_afl_AutoController_GainHostLimit_Get == nullptr && load)
1034 {
1035 throw std::runtime_error("Failed to load peak_afl_AutoController_GainHostLimit_Get");
1036 }
1037
1038 m_peak_afl_AutoController_GainHostLimit_GetRange = (dyn_peak_afl_AutoController_GainHostLimit_GetRange) (load ? import_function(m_handle, "peak_afl_AutoController_GainHostLimit_GetRange") : nullptr);
1039 if(m_peak_afl_AutoController_GainHostLimit_GetRange == nullptr && load)
1040 {
1041 throw std::runtime_error("Failed to load peak_afl_AutoController_GainHostLimit_GetRange");
1042 }
1043
1044
1045 return true;
1046}
1047
1048inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_Init(void )
1049{
1050 auto& inst = instance();
1051 if(inst.m_peak_afl_Init)
1052 {
1053 return inst.m_peak_afl_Init();
1054 }
1055 else
1056 {
1057 throw std::runtime_error("Library not loaded!");
1058 }
1059}
1060
1061inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_Exit(void )
1062{
1063 auto& inst = instance();
1064 if(inst.m_peak_afl_Exit)
1065 {
1066 return inst.m_peak_afl_Exit();
1067 }
1068 else
1069 {
1070 throw std::runtime_error("Library not loaded!");
1071 }
1072}
1073
1074inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_GetLastError(peak_afl_status * lastErrorCode, char * lastErrorMessage, size_t * lastErrorMessageSize)
1075{
1076 auto& inst = instance();
1077 if(inst.m_peak_afl_GetLastError)
1078 {
1079 return inst.m_peak_afl_GetLastError(lastErrorCode, lastErrorMessage, lastErrorMessageSize);
1080 }
1081 else
1082 {
1083 throw std::runtime_error("Library not loaded!");
1084 }
1085}
1086
1087inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_GetVersion(uint32_t * majorVersion, uint32_t * minorVersion, uint32_t * subminorVersion, uint32_t * patchVersion)
1088{
1089 auto& inst = instance();
1090 if(inst.m_peak_afl_GetVersion)
1091 {
1092 return inst.m_peak_afl_GetVersion(majorVersion, minorVersion, subminorVersion, patchVersion);
1093 }
1094 else
1095 {
1096 throw std::runtime_error("Library not loaded!");
1097 }
1098}
1099
1100inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoFeatureManager_Create(peak_afl_manager_handle * handle, PEAK_NODE_MAP_HANDLE nodeMapHandle)
1101{
1102 auto& inst = instance();
1103 if(inst.m_peak_afl_AutoFeatureManager_Create)
1104 {
1105 return inst.m_peak_afl_AutoFeatureManager_Create(handle, nodeMapHandle);
1106 }
1107 else
1108 {
1109 throw std::runtime_error("Library not loaded!");
1110 }
1111}
1112
1113inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoFeatureManager_Destroy(peak_afl_manager_handle handle)
1114{
1115 auto& inst = instance();
1116 if(inst.m_peak_afl_AutoFeatureManager_Destroy)
1117 {
1118 return inst.m_peak_afl_AutoFeatureManager_Destroy(handle);
1119 }
1120 else
1121 {
1122 throw std::runtime_error("Library not loaded!");
1123 }
1124}
1125
1126inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoFeatureManager_AddController(peak_afl_manager_handle handle, peak_afl_controller_handle controller)
1127{
1128 auto& inst = instance();
1129 if(inst.m_peak_afl_AutoFeatureManager_AddController)
1130 {
1131 return inst.m_peak_afl_AutoFeatureManager_AddController(handle, controller);
1132 }
1133 else
1134 {
1135 throw std::runtime_error("Library not loaded!");
1136 }
1137}
1138
1139inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoFeatureManager_RemoveController(peak_afl_manager_handle handle, peak_afl_controller_handle controller)
1140{
1141 auto& inst = instance();
1142 if(inst.m_peak_afl_AutoFeatureManager_RemoveController)
1143 {
1144 return inst.m_peak_afl_AutoFeatureManager_RemoveController(handle, controller);
1145 }
1146 else
1147 {
1148 throw std::runtime_error("Library not loaded!");
1149 }
1150}
1151
1152inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoFeatureManager_Process(peak_afl_manager_handle handle, PEAK_IPL_IMAGE_HANDLE imageHandle)
1153{
1154 auto& inst = instance();
1155 if(inst.m_peak_afl_AutoFeatureManager_Process)
1156 {
1157 return inst.m_peak_afl_AutoFeatureManager_Process(handle, imageHandle);
1158 }
1159 else
1160 {
1161 throw std::runtime_error("Library not loaded!");
1162 }
1163}
1164
1165inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoFeatureManager_CreateController(peak_afl_manager_handle handle, peak_afl_controller_handle * controller, peak_afl_controllerType controllerType)
1166{
1167 auto& inst = instance();
1168 if(inst.m_peak_afl_AutoFeatureManager_CreateController)
1169 {
1170 return inst.m_peak_afl_AutoFeatureManager_CreateController(handle, controller, controllerType);
1171 }
1172 else
1173 {
1174 throw std::runtime_error("Library not loaded!");
1175 }
1176}
1177
1178inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoFeatureManager_DestroyAllController(peak_afl_manager_handle handle)
1179{
1180 auto& inst = instance();
1181 if(inst.m_peak_afl_AutoFeatureManager_DestroyAllController)
1182 {
1183 return inst.m_peak_afl_AutoFeatureManager_DestroyAllController(handle);
1184 }
1185 else
1186 {
1187 throw std::runtime_error("Library not loaded!");
1188 }
1189}
1190
1191inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoFeatureManager_DestroyController(peak_afl_manager_handle handle, peak_afl_controller_handle controller)
1192{
1193 auto& inst = instance();
1194 if(inst.m_peak_afl_AutoFeatureManager_DestroyController)
1195 {
1196 return inst.m_peak_afl_AutoFeatureManager_DestroyController(handle, controller);
1197 }
1198 else
1199 {
1200 throw std::runtime_error("Library not loaded!");
1201 }
1202}
1203
1204inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoFeatureManager_SetGainIPL(peak_afl_manager_handle handle, PEAK_IPL_GAIN_HANDLE gainHandle)
1205{
1206 auto& inst = instance();
1207 if(inst.m_peak_afl_AutoFeatureManager_SetGainIPL)
1208 {
1209 return inst.m_peak_afl_AutoFeatureManager_SetGainIPL(handle, gainHandle);
1210 }
1211 else
1212 {
1213 throw std::runtime_error("Library not loaded!");
1214 }
1215}
1216
1217inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoFeatureManager_SetCCM(peak_afl_manager_handle handle, float * ccm, size_t ccm_size)
1218{
1219 auto& inst = instance();
1220 if(inst.m_peak_afl_AutoFeatureManager_SetCCM)
1221 {
1222 return inst.m_peak_afl_AutoFeatureManager_SetCCM(handle, ccm, ccm_size);
1223 }
1224 else
1225 {
1226 throw std::runtime_error("Library not loaded!");
1227 }
1228}
1229
1230inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoFeatureManager_Status(peak_afl_manager_handle handle, peak_afl_BOOL8 * running)
1231{
1232 auto& inst = instance();
1233 if(inst.m_peak_afl_AutoFeatureManager_Status)
1234 {
1235 return inst.m_peak_afl_AutoFeatureManager_Status(handle, running);
1236 }
1237 else
1238 {
1239 throw std::runtime_error("Library not loaded!");
1240 }
1241}
1242
1243inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoFeatureManager_Controller_IsSupported(peak_afl_manager_handle handle, peak_afl_controllerType controllerType, peak_afl_BOOL8 * supported)
1244{
1245 auto& inst = instance();
1246 if(inst.m_peak_afl_AutoFeatureManager_Controller_IsSupported)
1247 {
1248 return inst.m_peak_afl_AutoFeatureManager_Controller_IsSupported(handle, controllerType, supported);
1249 }
1250 else
1251 {
1252 throw std::runtime_error("Library not loaded!");
1253 }
1254}
1255
1256inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_Create(peak_afl_controller_handle * controller, peak_afl_controllerType controllerType)
1257{
1258 auto& inst = instance();
1259 if(inst.m_peak_afl_AutoController_Create)
1260 {
1261 return inst.m_peak_afl_AutoController_Create(controller, controllerType);
1262 }
1263 else
1264 {
1265 throw std::runtime_error("Library not loaded!");
1266 }
1267}
1268
1269inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_Destroy(peak_afl_controller_handle controller)
1270{
1271 auto& inst = instance();
1272 if(inst.m_peak_afl_AutoController_Destroy)
1273 {
1274 return inst.m_peak_afl_AutoController_Destroy(controller);
1275 }
1276 else
1277 {
1278 throw std::runtime_error("Library not loaded!");
1279 }
1280}
1281
1282inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_SkipFrames_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported)
1283{
1284 auto& inst = instance();
1285 if(inst.m_peak_afl_AutoController_SkipFrames_IsSupported)
1286 {
1287 return inst.m_peak_afl_AutoController_SkipFrames_IsSupported(controller, supported);
1288 }
1289 else
1290 {
1291 throw std::runtime_error("Library not loaded!");
1292 }
1293}
1294
1295inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_SkipFrames_Set(peak_afl_controller_handle controller, uint32_t count)
1296{
1297 auto& inst = instance();
1298 if(inst.m_peak_afl_AutoController_SkipFrames_Set)
1299 {
1300 return inst.m_peak_afl_AutoController_SkipFrames_Set(controller, count);
1301 }
1302 else
1303 {
1304 throw std::runtime_error("Library not loaded!");
1305 }
1306}
1307
1308inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_SkipFrames_Get(peak_afl_controller_handle controller, uint32_t * count)
1309{
1310 auto& inst = instance();
1311 if(inst.m_peak_afl_AutoController_SkipFrames_Get)
1312 {
1313 return inst.m_peak_afl_AutoController_SkipFrames_Get(controller, count);
1314 }
1315 else
1316 {
1317 throw std::runtime_error("Library not loaded!");
1318 }
1319}
1320
1321inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_SkipFrames_GetRange(peak_afl_controller_handle controller, uint32_t * min, uint32_t * max, uint32_t * inc)
1322{
1323 auto& inst = instance();
1324 if(inst.m_peak_afl_AutoController_SkipFrames_GetRange)
1325 {
1326 return inst.m_peak_afl_AutoController_SkipFrames_GetRange(controller, min, max, inc);
1327 }
1328 else
1329 {
1330 throw std::runtime_error("Library not loaded!");
1331 }
1332}
1333
1334inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_ROI_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported)
1335{
1336 auto& inst = instance();
1337 if(inst.m_peak_afl_AutoController_ROI_IsSupported)
1338 {
1339 return inst.m_peak_afl_AutoController_ROI_IsSupported(controller, supported);
1340 }
1341 else
1342 {
1343 throw std::runtime_error("Library not loaded!");
1344 }
1345}
1346
1347inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_ROI_Set(peak_afl_controller_handle controller, peak_afl_rectangle roi)
1348{
1349 auto& inst = instance();
1350 if(inst.m_peak_afl_AutoController_ROI_Set)
1351 {
1352 return inst.m_peak_afl_AutoController_ROI_Set(controller, roi);
1353 }
1354 else
1355 {
1356 throw std::runtime_error("Library not loaded!");
1357 }
1358}
1359
1360inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_ROI_Get(peak_afl_controller_handle controller, peak_afl_rectangle * roi)
1361{
1362 auto& inst = instance();
1363 if(inst.m_peak_afl_AutoController_ROI_Get)
1364 {
1365 return inst.m_peak_afl_AutoController_ROI_Get(controller, roi);
1366 }
1367 else
1368 {
1369 throw std::runtime_error("Library not loaded!");
1370 }
1371}
1372
1373inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_ROI_Preset_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported)
1374{
1375 auto& inst = instance();
1376 if(inst.m_peak_afl_AutoController_ROI_Preset_IsSupported)
1377 {
1378 return inst.m_peak_afl_AutoController_ROI_Preset_IsSupported(controller, supported);
1379 }
1380 else
1381 {
1382 throw std::runtime_error("Library not loaded!");
1383 }
1384}
1385
1386inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_ROI_Preset_Set(peak_afl_controller_handle controller, peak_afl_roi_preset roiPreset)
1387{
1388 auto& inst = instance();
1389 if(inst.m_peak_afl_AutoController_ROI_Preset_Set)
1390 {
1391 return inst.m_peak_afl_AutoController_ROI_Preset_Set(controller, roiPreset);
1392 }
1393 else
1394 {
1395 throw std::runtime_error("Library not loaded!");
1396 }
1397}
1398
1399inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_Mode_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported)
1400{
1401 auto& inst = instance();
1402 if(inst.m_peak_afl_AutoController_Mode_IsSupported)
1403 {
1404 return inst.m_peak_afl_AutoController_Mode_IsSupported(controller, supported);
1405 }
1406 else
1407 {
1408 throw std::runtime_error("Library not loaded!");
1409 }
1410}
1411
1412inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_Mode_Set(peak_afl_controller_handle controller, peak_afl_controller_automode mode)
1413{
1414 auto& inst = instance();
1415 if(inst.m_peak_afl_AutoController_Mode_Set)
1416 {
1417 return inst.m_peak_afl_AutoController_Mode_Set(controller, mode);
1418 }
1419 else
1420 {
1421 throw std::runtime_error("Library not loaded!");
1422 }
1423}
1424
1425inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_Mode_Get(peak_afl_controller_handle controller, peak_afl_controller_automode * mode)
1426{
1427 auto& inst = instance();
1428 if(inst.m_peak_afl_AutoController_Mode_Get)
1429 {
1430 return inst.m_peak_afl_AutoController_Mode_Get(controller, mode);
1431 }
1432 else
1433 {
1434 throw std::runtime_error("Library not loaded!");
1435 }
1436}
1437
1438inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_BrightnessAlgorithm_Set(peak_afl_controller_handle controller, peak_afl_controller_brightness_algorithm algorithm)
1439{
1440 auto& inst = instance();
1441 if(inst.m_peak_afl_AutoController_BrightnessAlgorithm_Set)
1442 {
1443 return inst.m_peak_afl_AutoController_BrightnessAlgorithm_Set(controller, algorithm);
1444 }
1445 else
1446 {
1447 throw std::runtime_error("Library not loaded!");
1448 }
1449}
1450
1451inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_BrightnessAlgorithm_Get(peak_afl_controller_handle controller, peak_afl_controller_brightness_algorithm * algorithm)
1452{
1453 auto& inst = instance();
1454 if(inst.m_peak_afl_AutoController_BrightnessAlgorithm_Get)
1455 {
1456 return inst.m_peak_afl_AutoController_BrightnessAlgorithm_Get(controller, algorithm);
1457 }
1458 else
1459 {
1460 throw std::runtime_error("Library not loaded!");
1461 }
1462}
1463
1464inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_BrightnessAlgorithm_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported)
1465{
1466 auto& inst = instance();
1467 if(inst.m_peak_afl_AutoController_BrightnessAlgorithm_IsSupported)
1468 {
1469 return inst.m_peak_afl_AutoController_BrightnessAlgorithm_IsSupported(controller, supported);
1470 }
1471 else
1472 {
1473 throw std::runtime_error("Library not loaded!");
1474 }
1475}
1476
1477inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_BrightnessComponent_Mode_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported)
1478{
1479 auto& inst = instance();
1480 if(inst.m_peak_afl_AutoController_BrightnessComponent_Mode_IsSupported)
1481 {
1482 return inst.m_peak_afl_AutoController_BrightnessComponent_Mode_IsSupported(controller, supported);
1483 }
1484 else
1485 {
1486 throw std::runtime_error("Library not loaded!");
1487 }
1488}
1489
1490inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_BrightnessComponent_Unit_IsSupported(peak_afl_controller_handle controller, peak_afl_controller_brightness_component unit, peak_afl_BOOL8 * supported)
1491{
1492 auto& inst = instance();
1493 if(inst.m_peak_afl_AutoController_BrightnessComponent_Unit_IsSupported)
1494 {
1495 return inst.m_peak_afl_AutoController_BrightnessComponent_Unit_IsSupported(controller, unit, supported);
1496 }
1497 else
1498 {
1499 throw std::runtime_error("Library not loaded!");
1500 }
1501}
1502
1503inline 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)
1504{
1505 auto& inst = instance();
1506 if(inst.m_peak_afl_AutoController_BrightnessComponent_Mode_Set)
1507 {
1508 return inst.m_peak_afl_AutoController_BrightnessComponent_Mode_Set(controller, component, mode);
1509 }
1510 else
1511 {
1512 throw std::runtime_error("Library not loaded!");
1513 }
1514}
1515
1516inline 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)
1517{
1518 auto& inst = instance();
1519 if(inst.m_peak_afl_AutoController_BrightnessComponent_Mode_Get)
1520 {
1521 return inst.m_peak_afl_AutoController_BrightnessComponent_Mode_Get(controller, component, mode);
1522 }
1523 else
1524 {
1525 throw std::runtime_error("Library not loaded!");
1526 }
1527}
1528
1529inline 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)
1530{
1531 auto& inst = instance();
1532 if(inst.m_peak_afl_AutoController_BrightnessComponent_Status)
1533 {
1534 return inst.m_peak_afl_AutoController_BrightnessComponent_Status(controller, component, status);
1535 }
1536 else
1537 {
1538 throw std::runtime_error("Library not loaded!");
1539 }
1540}
1541
1542inline 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)
1543{
1544 auto& inst = instance();
1545 if(inst.m_peak_afl_AutoController_BrightnessComponent_Callback_Set)
1546 {
1547 return inst.m_peak_afl_AutoController_BrightnessComponent_Callback_Set(controller, component, type, funcPtr, context);
1548 }
1549 else
1550 {
1551 throw std::runtime_error("Library not loaded!");
1552 }
1553}
1554
1555inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_ExposureLimit_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported)
1556{
1557 auto& inst = instance();
1558 if(inst.m_peak_afl_AutoController_ExposureLimit_IsSupported)
1559 {
1560 return inst.m_peak_afl_AutoController_ExposureLimit_IsSupported(controller, supported);
1561 }
1562 else
1563 {
1564 throw std::runtime_error("Library not loaded!");
1565 }
1566}
1567
1568inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_ExposureLimit_Set(peak_afl_controller_handle controller, peak_afl_double_limit limit)
1569{
1570 auto& inst = instance();
1571 if(inst.m_peak_afl_AutoController_ExposureLimit_Set)
1572 {
1573 return inst.m_peak_afl_AutoController_ExposureLimit_Set(controller, limit);
1574 }
1575 else
1576 {
1577 throw std::runtime_error("Library not loaded!");
1578 }
1579}
1580
1581inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_ExposureLimit_Get(peak_afl_controller_handle controller, peak_afl_double_limit * limit)
1582{
1583 auto& inst = instance();
1584 if(inst.m_peak_afl_AutoController_ExposureLimit_Get)
1585 {
1586 return inst.m_peak_afl_AutoController_ExposureLimit_Get(controller, limit);
1587 }
1588 else
1589 {
1590 throw std::runtime_error("Library not loaded!");
1591 }
1592}
1593
1594inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_Status(peak_afl_controller_handle controller, peak_afl_controller_status * status)
1595{
1596 auto& inst = instance();
1597 if(inst.m_peak_afl_AutoController_Status)
1598 {
1599 return inst.m_peak_afl_AutoController_Status(controller, status);
1600 }
1601 else
1602 {
1603 throw std::runtime_error("Library not loaded!");
1604 }
1605}
1606
1607inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_GetLastAutoAverage(peak_afl_controller_handle controller, uint8_t * average)
1608{
1609 auto& inst = instance();
1610 if(inst.m_peak_afl_AutoController_GetLastAutoAverage)
1611 {
1612 return inst.m_peak_afl_AutoController_GetLastAutoAverage(controller, average);
1613 }
1614 else
1615 {
1616 throw std::runtime_error("Library not loaded!");
1617 }
1618}
1619
1620inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_GetLastAutoAverages(peak_afl_controller_handle controller, uint8_t * averageRed, uint8_t * averageGreen, uint8_t * averageBlue)
1621{
1622 auto& inst = instance();
1623 if(inst.m_peak_afl_AutoController_GetLastAutoAverages)
1624 {
1625 return inst.m_peak_afl_AutoController_GetLastAutoAverages(controller, averageRed, averageGreen, averageBlue);
1626 }
1627 else
1628 {
1629 throw std::runtime_error("Library not loaded!");
1630 }
1631}
1632
1633inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_AutoTarget_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported)
1634{
1635 auto& inst = instance();
1636 if(inst.m_peak_afl_AutoController_AutoTarget_IsSupported)
1637 {
1638 return inst.m_peak_afl_AutoController_AutoTarget_IsSupported(controller, supported);
1639 }
1640 else
1641 {
1642 throw std::runtime_error("Library not loaded!");
1643 }
1644}
1645
1646inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_AutoTarget_Set(peak_afl_controller_handle controller, uint32_t target)
1647{
1648 auto& inst = instance();
1649 if(inst.m_peak_afl_AutoController_AutoTarget_Set)
1650 {
1651 return inst.m_peak_afl_AutoController_AutoTarget_Set(controller, target);
1652 }
1653 else
1654 {
1655 throw std::runtime_error("Library not loaded!");
1656 }
1657}
1658
1659inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_AutoTarget_Get(peak_afl_controller_handle controller, uint32_t * target)
1660{
1661 auto& inst = instance();
1662 if(inst.m_peak_afl_AutoController_AutoTarget_Get)
1663 {
1664 return inst.m_peak_afl_AutoController_AutoTarget_Get(controller, target);
1665 }
1666 else
1667 {
1668 throw std::runtime_error("Library not loaded!");
1669 }
1670}
1671
1672inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_AutoTarget_GetRange(peak_afl_controller_handle controller, uint32_t * min, uint32_t * max, uint32_t * inc)
1673{
1674 auto& inst = instance();
1675 if(inst.m_peak_afl_AutoController_AutoTarget_GetRange)
1676 {
1677 return inst.m_peak_afl_AutoController_AutoTarget_GetRange(controller, min, max, inc);
1678 }
1679 else
1680 {
1681 throw std::runtime_error("Library not loaded!");
1682 }
1683}
1684
1685inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_AutoTolerance_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported)
1686{
1687 auto& inst = instance();
1688 if(inst.m_peak_afl_AutoController_AutoTolerance_IsSupported)
1689 {
1690 return inst.m_peak_afl_AutoController_AutoTolerance_IsSupported(controller, supported);
1691 }
1692 else
1693 {
1694 throw std::runtime_error("Library not loaded!");
1695 }
1696}
1697
1698inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_AutoTolerance_Set(peak_afl_controller_handle controller, uint32_t tolerance)
1699{
1700 auto& inst = instance();
1701 if(inst.m_peak_afl_AutoController_AutoTolerance_Set)
1702 {
1703 return inst.m_peak_afl_AutoController_AutoTolerance_Set(controller, tolerance);
1704 }
1705 else
1706 {
1707 throw std::runtime_error("Library not loaded!");
1708 }
1709}
1710
1711inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_AutoTolerance_Get(peak_afl_controller_handle controller, uint32_t * tolerance)
1712{
1713 auto& inst = instance();
1714 if(inst.m_peak_afl_AutoController_AutoTolerance_Get)
1715 {
1716 return inst.m_peak_afl_AutoController_AutoTolerance_Get(controller, tolerance);
1717 }
1718 else
1719 {
1720 throw std::runtime_error("Library not loaded!");
1721 }
1722}
1723
1724inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_AutoTolerance_GetRange(peak_afl_controller_handle controller, uint32_t * min, uint32_t * max, uint32_t * inc)
1725{
1726 auto& inst = instance();
1727 if(inst.m_peak_afl_AutoController_AutoTolerance_GetRange)
1728 {
1729 return inst.m_peak_afl_AutoController_AutoTolerance_GetRange(controller, min, max, inc);
1730 }
1731 else
1732 {
1733 throw std::runtime_error("Library not loaded!");
1734 }
1735}
1736
1737inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_AutoPercentile_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported)
1738{
1739 auto& inst = instance();
1740 if(inst.m_peak_afl_AutoController_AutoPercentile_IsSupported)
1741 {
1742 return inst.m_peak_afl_AutoController_AutoPercentile_IsSupported(controller, supported);
1743 }
1744 else
1745 {
1746 throw std::runtime_error("Library not loaded!");
1747 }
1748}
1749
1750inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_AutoPercentile_Set(peak_afl_controller_handle controller, double percentile)
1751{
1752 auto& inst = instance();
1753 if(inst.m_peak_afl_AutoController_AutoPercentile_Set)
1754 {
1755 return inst.m_peak_afl_AutoController_AutoPercentile_Set(controller, percentile);
1756 }
1757 else
1758 {
1759 throw std::runtime_error("Library not loaded!");
1760 }
1761}
1762
1763inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_AutoPercentile_Get(peak_afl_controller_handle controller, double * percentile)
1764{
1765 auto& inst = instance();
1766 if(inst.m_peak_afl_AutoController_AutoPercentile_Get)
1767 {
1768 return inst.m_peak_afl_AutoController_AutoPercentile_Get(controller, percentile);
1769 }
1770 else
1771 {
1772 throw std::runtime_error("Library not loaded!");
1773 }
1774}
1775
1776inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_AutoPercentile_GetRange(peak_afl_controller_handle controller, double * min, double * max, double * inc)
1777{
1778 auto& inst = instance();
1779 if(inst.m_peak_afl_AutoController_AutoPercentile_GetRange)
1780 {
1781 return inst.m_peak_afl_AutoController_AutoPercentile_GetRange(controller, min, max, inc);
1782 }
1783 else
1784 {
1785 throw std::runtime_error("Library not loaded!");
1786 }
1787}
1788
1789inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_Type_Get(peak_afl_controller_handle controller, peak_afl_controllerType * type)
1790{
1791 auto& inst = instance();
1792 if(inst.m_peak_afl_AutoController_Type_Get)
1793 {
1794 return inst.m_peak_afl_AutoController_Type_Get(controller, type);
1795 }
1796 else
1797 {
1798 throw std::runtime_error("Library not loaded!");
1799 }
1800}
1801
1802inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_Algorithm_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported)
1803{
1804 auto& inst = instance();
1805 if(inst.m_peak_afl_AutoController_Algorithm_IsSupported)
1806 {
1807 return inst.m_peak_afl_AutoController_Algorithm_IsSupported(controller, supported);
1808 }
1809 else
1810 {
1811 throw std::runtime_error("Library not loaded!");
1812 }
1813}
1814
1815inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_Algorithm_Set(peak_afl_controller_handle controller, peak_afl_controller_algorithm algorithm)
1816{
1817 auto& inst = instance();
1818 if(inst.m_peak_afl_AutoController_Algorithm_Set)
1819 {
1820 return inst.m_peak_afl_AutoController_Algorithm_Set(controller, algorithm);
1821 }
1822 else
1823 {
1824 throw std::runtime_error("Library not loaded!");
1825 }
1826}
1827
1828inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_Algorithm_Get(peak_afl_controller_handle controller, peak_afl_controller_algorithm * algorithm)
1829{
1830 auto& inst = instance();
1831 if(inst.m_peak_afl_AutoController_Algorithm_Get)
1832 {
1833 return inst.m_peak_afl_AutoController_Algorithm_Get(controller, algorithm);
1834 }
1835 else
1836 {
1837 throw std::runtime_error("Library not loaded!");
1838 }
1839}
1840
1841inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_Algorithm_GetList(peak_afl_controller_handle controller, peak_afl_controller_algorithm * typeList, uint32_t * listSize)
1842{
1843 auto& inst = instance();
1844 if(inst.m_peak_afl_AutoController_Algorithm_GetList)
1845 {
1846 return inst.m_peak_afl_AutoController_Algorithm_GetList(controller, typeList, listSize);
1847 }
1848 else
1849 {
1850 throw std::runtime_error("Library not loaded!");
1851 }
1852}
1853
1854inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_SharpnessAlgorithm_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported)
1855{
1856 auto& inst = instance();
1857 if(inst.m_peak_afl_AutoController_SharpnessAlgorithm_IsSupported)
1858 {
1859 return inst.m_peak_afl_AutoController_SharpnessAlgorithm_IsSupported(controller, supported);
1860 }
1861 else
1862 {
1863 throw std::runtime_error("Library not loaded!");
1864 }
1865}
1866
1867inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_SharpnessAlgorithm_Set(peak_afl_controller_handle controller, peak_afl_controller_sharpness_algorithm algorithm)
1868{
1869 auto& inst = instance();
1870 if(inst.m_peak_afl_AutoController_SharpnessAlgorithm_Set)
1871 {
1872 return inst.m_peak_afl_AutoController_SharpnessAlgorithm_Set(controller, algorithm);
1873 }
1874 else
1875 {
1876 throw std::runtime_error("Library not loaded!");
1877 }
1878}
1879
1880inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_SharpnessAlgorithm_Get(peak_afl_controller_handle controller, peak_afl_controller_sharpness_algorithm * algorithm)
1881{
1882 auto& inst = instance();
1883 if(inst.m_peak_afl_AutoController_SharpnessAlgorithm_Get)
1884 {
1885 return inst.m_peak_afl_AutoController_SharpnessAlgorithm_Get(controller, algorithm);
1886 }
1887 else
1888 {
1889 throw std::runtime_error("Library not loaded!");
1890 }
1891}
1892
1893inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_SharpnessAlgorithm_GetList(peak_afl_controller_handle controller, peak_afl_controller_sharpness_algorithm * typeList, uint32_t * listSize)
1894{
1895 auto& inst = instance();
1896 if(inst.m_peak_afl_AutoController_SharpnessAlgorithm_GetList)
1897 {
1898 return inst.m_peak_afl_AutoController_SharpnessAlgorithm_GetList(controller, typeList, listSize);
1899 }
1900 else
1901 {
1902 throw std::runtime_error("Library not loaded!");
1903 }
1904}
1905
1906inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_Callback_Set(peak_afl_controller_handle controller, peak_afl_callback_type type, void * funcPtr, void * context)
1907{
1908 auto& inst = instance();
1909 if(inst.m_peak_afl_AutoController_Callback_Set)
1910 {
1911 return inst.m_peak_afl_AutoController_Callback_Set(controller, type, funcPtr, context);
1912 }
1913 else
1914 {
1915 throw std::runtime_error("Library not loaded!");
1916 }
1917}
1918
1919inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_Weighted_ROI_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported)
1920{
1921 auto& inst = instance();
1922 if(inst.m_peak_afl_AutoController_Weighted_ROI_IsSupported)
1923 {
1924 return inst.m_peak_afl_AutoController_Weighted_ROI_IsSupported(controller, supported);
1925 }
1926 else
1927 {
1928 throw std::runtime_error("Library not loaded!");
1929 }
1930}
1931
1932inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_Weighted_ROI_Min_Size(peak_afl_controller_handle controller, peak_afl_size * size)
1933{
1934 auto& inst = instance();
1935 if(inst.m_peak_afl_AutoController_Weighted_ROI_Min_Size)
1936 {
1937 return inst.m_peak_afl_AutoController_Weighted_ROI_Min_Size(controller, size);
1938 }
1939 else
1940 {
1941 throw std::runtime_error("Library not loaded!");
1942 }
1943}
1944
1945inline 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)
1946{
1947 auto& inst = instance();
1948 if(inst.m_peak_afl_AutoController_Weighted_ROI_Set)
1949 {
1950 return inst.m_peak_afl_AutoController_Weighted_ROI_Set(controller, weightedRoiList, listSize);
1951 }
1952 else
1953 {
1954 throw std::runtime_error("Library not loaded!");
1955 }
1956}
1957
1958inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_Weighted_ROI_Get(peak_afl_controller_handle controller, peak_afl_weighted_rectangle * weightedRoiList, uint32_t * listSize)
1959{
1960 auto& inst = instance();
1961 if(inst.m_peak_afl_AutoController_Weighted_ROI_Get)
1962 {
1963 return inst.m_peak_afl_AutoController_Weighted_ROI_Get(controller, weightedRoiList, listSize);
1964 }
1965 else
1966 {
1967 throw std::runtime_error("Library not loaded!");
1968 }
1969}
1970
1971inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_Limit_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported)
1972{
1973 auto& inst = instance();
1974 if(inst.m_peak_afl_AutoController_Limit_IsSupported)
1975 {
1976 return inst.m_peak_afl_AutoController_Limit_IsSupported(controller, supported);
1977 }
1978 else
1979 {
1980 throw std::runtime_error("Library not loaded!");
1981 }
1982}
1983
1984inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_Limit_Default(peak_afl_controller_handle controller, peak_afl_controller_limit * limit)
1985{
1986 auto& inst = instance();
1987 if(inst.m_peak_afl_AutoController_Limit_Default)
1988 {
1989 return inst.m_peak_afl_AutoController_Limit_Default(controller, limit);
1990 }
1991 else
1992 {
1993 throw std::runtime_error("Library not loaded!");
1994 }
1995}
1996
1997inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_Limit_Set(peak_afl_controller_handle controller, peak_afl_controller_limit limit)
1998{
1999 auto& inst = instance();
2000 if(inst.m_peak_afl_AutoController_Limit_Set)
2001 {
2002 return inst.m_peak_afl_AutoController_Limit_Set(controller, limit);
2003 }
2004 else
2005 {
2006 throw std::runtime_error("Library not loaded!");
2007 }
2008}
2009
2010inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_Limit_Get(peak_afl_controller_handle controller, peak_afl_controller_limit * limit)
2011{
2012 auto& inst = instance();
2013 if(inst.m_peak_afl_AutoController_Limit_Get)
2014 {
2015 return inst.m_peak_afl_AutoController_Limit_Get(controller, limit);
2016 }
2017 else
2018 {
2019 throw std::runtime_error("Library not loaded!");
2020 }
2021}
2022
2023inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_Hysteresis_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported)
2024{
2025 auto& inst = instance();
2026 if(inst.m_peak_afl_AutoController_Hysteresis_IsSupported)
2027 {
2028 return inst.m_peak_afl_AutoController_Hysteresis_IsSupported(controller, supported);
2029 }
2030 else
2031 {
2032 throw std::runtime_error("Library not loaded!");
2033 }
2034}
2035
2036inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_Hysteresis_Default(peak_afl_controller_handle controller, uint8_t * hysteresis)
2037{
2038 auto& inst = instance();
2039 if(inst.m_peak_afl_AutoController_Hysteresis_Default)
2040 {
2041 return inst.m_peak_afl_AutoController_Hysteresis_Default(controller, hysteresis);
2042 }
2043 else
2044 {
2045 throw std::runtime_error("Library not loaded!");
2046 }
2047}
2048
2049inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_Hysteresis_Set(peak_afl_controller_handle controller, uint8_t hysteresis)
2050{
2051 auto& inst = instance();
2052 if(inst.m_peak_afl_AutoController_Hysteresis_Set)
2053 {
2054 return inst.m_peak_afl_AutoController_Hysteresis_Set(controller, hysteresis);
2055 }
2056 else
2057 {
2058 throw std::runtime_error("Library not loaded!");
2059 }
2060}
2061
2062inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_Hysteresis_Get(peak_afl_controller_handle controller, uint8_t * hysteresis)
2063{
2064 auto& inst = instance();
2065 if(inst.m_peak_afl_AutoController_Hysteresis_Get)
2066 {
2067 return inst.m_peak_afl_AutoController_Hysteresis_Get(controller, hysteresis);
2068 }
2069 else
2070 {
2071 throw std::runtime_error("Library not loaded!");
2072 }
2073}
2074
2075inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_Hysteresis_GetRange(peak_afl_controller_handle controller, uint8_t * min, uint8_t * max, uint8_t * inc)
2076{
2077 auto& inst = instance();
2078 if(inst.m_peak_afl_AutoController_Hysteresis_GetRange)
2079 {
2080 return inst.m_peak_afl_AutoController_Hysteresis_GetRange(controller, min, max, inc);
2081 }
2082 else
2083 {
2084 throw std::runtime_error("Library not loaded!");
2085 }
2086}
2087
2088inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_GainLimit_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 * supported)
2089{
2090 auto& inst = instance();
2091 if(inst.m_peak_afl_AutoController_GainLimit_IsSupported)
2092 {
2093 return inst.m_peak_afl_AutoController_GainLimit_IsSupported(controller, supported);
2094 }
2095 else
2096 {
2097 throw std::runtime_error("Library not loaded!");
2098 }
2099}
2100
2101inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_GainLimit_Set(peak_afl_controller_handle controller, peak_afl_double_limit limit)
2102{
2103 auto& inst = instance();
2104 if(inst.m_peak_afl_AutoController_GainLimit_Set)
2105 {
2106 return inst.m_peak_afl_AutoController_GainLimit_Set(controller, limit);
2107 }
2108 else
2109 {
2110 throw std::runtime_error("Library not loaded!");
2111 }
2112}
2113
2114inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_GainLimit_Get(peak_afl_controller_handle controller, peak_afl_double_limit * limit)
2115{
2116 auto& inst = instance();
2117 if(inst.m_peak_afl_AutoController_GainLimit_Get)
2118 {
2119 return inst.m_peak_afl_AutoController_GainLimit_Get(controller, limit);
2120 }
2121 else
2122 {
2123 throw std::runtime_error("Library not loaded!");
2124 }
2125}
2126
2127inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_GainLimit_GetRange(peak_afl_controller_handle controller, peak_afl_double_limit * limit)
2128{
2129 auto& inst = instance();
2130 if(inst.m_peak_afl_AutoController_GainLimit_GetRange)
2131 {
2132 return inst.m_peak_afl_AutoController_GainLimit_GetRange(controller, limit);
2133 }
2134 else
2135 {
2136 throw std::runtime_error("Library not loaded!");
2137 }
2138}
2139
2140inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_GainAnalogLimit_Set(peak_afl_controller_handle controller, peak_afl_double_limit limit)
2141{
2142 auto& inst = instance();
2143 if(inst.m_peak_afl_AutoController_GainAnalogLimit_Set)
2144 {
2145 return inst.m_peak_afl_AutoController_GainAnalogLimit_Set(controller, limit);
2146 }
2147 else
2148 {
2149 throw std::runtime_error("Library not loaded!");
2150 }
2151}
2152
2153inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_GainAnalogLimit_Get(peak_afl_controller_handle controller, peak_afl_double_limit * limit)
2154{
2155 auto& inst = instance();
2156 if(inst.m_peak_afl_AutoController_GainAnalogLimit_Get)
2157 {
2158 return inst.m_peak_afl_AutoController_GainAnalogLimit_Get(controller, limit);
2159 }
2160 else
2161 {
2162 throw std::runtime_error("Library not loaded!");
2163 }
2164}
2165
2166inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_GainAnalogLimit_GetRange(peak_afl_controller_handle controller, peak_afl_double_limit * limit)
2167{
2168 auto& inst = instance();
2169 if(inst.m_peak_afl_AutoController_GainAnalogLimit_GetRange)
2170 {
2171 return inst.m_peak_afl_AutoController_GainAnalogLimit_GetRange(controller, limit);
2172 }
2173 else
2174 {
2175 throw std::runtime_error("Library not loaded!");
2176 }
2177}
2178
2179inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_GainDigitalLimit_Set(peak_afl_controller_handle controller, peak_afl_double_limit limit)
2180{
2181 auto& inst = instance();
2182 if(inst.m_peak_afl_AutoController_GainDigitalLimit_Set)
2183 {
2184 return inst.m_peak_afl_AutoController_GainDigitalLimit_Set(controller, limit);
2185 }
2186 else
2187 {
2188 throw std::runtime_error("Library not loaded!");
2189 }
2190}
2191
2192inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_GainDigitalLimit_Get(peak_afl_controller_handle controller, peak_afl_double_limit * limit)
2193{
2194 auto& inst = instance();
2195 if(inst.m_peak_afl_AutoController_GainDigitalLimit_Get)
2196 {
2197 return inst.m_peak_afl_AutoController_GainDigitalLimit_Get(controller, limit);
2198 }
2199 else
2200 {
2201 throw std::runtime_error("Library not loaded!");
2202 }
2203}
2204
2205inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_GainDigitalLimit_GetRange(peak_afl_controller_handle controller, peak_afl_double_limit * limit)
2206{
2207 auto& inst = instance();
2208 if(inst.m_peak_afl_AutoController_GainDigitalLimit_GetRange)
2209 {
2210 return inst.m_peak_afl_AutoController_GainDigitalLimit_GetRange(controller, limit);
2211 }
2212 else
2213 {
2214 throw std::runtime_error("Library not loaded!");
2215 }
2216}
2217
2218inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_GainCombinedLimit_Set(peak_afl_controller_handle controller, peak_afl_double_limit limit)
2219{
2220 auto& inst = instance();
2221 if(inst.m_peak_afl_AutoController_GainCombinedLimit_Set)
2222 {
2223 return inst.m_peak_afl_AutoController_GainCombinedLimit_Set(controller, limit);
2224 }
2225 else
2226 {
2227 throw std::runtime_error("Library not loaded!");
2228 }
2229}
2230
2231inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_GainCombinedLimit_Get(peak_afl_controller_handle controller, peak_afl_double_limit * limit)
2232{
2233 auto& inst = instance();
2234 if(inst.m_peak_afl_AutoController_GainCombinedLimit_Get)
2235 {
2236 return inst.m_peak_afl_AutoController_GainCombinedLimit_Get(controller, limit);
2237 }
2238 else
2239 {
2240 throw std::runtime_error("Library not loaded!");
2241 }
2242}
2243
2244inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_GainCombinedLimit_GetRange(peak_afl_controller_handle controller, peak_afl_double_limit * limit)
2245{
2246 auto& inst = instance();
2247 if(inst.m_peak_afl_AutoController_GainCombinedLimit_GetRange)
2248 {
2249 return inst.m_peak_afl_AutoController_GainCombinedLimit_GetRange(controller, limit);
2250 }
2251 else
2252 {
2253 throw std::runtime_error("Library not loaded!");
2254 }
2255}
2256
2257inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_GainHostLimit_Set(peak_afl_controller_handle controller, peak_afl_double_limit limit)
2258{
2259 auto& inst = instance();
2260 if(inst.m_peak_afl_AutoController_GainHostLimit_Set)
2261 {
2262 return inst.m_peak_afl_AutoController_GainHostLimit_Set(controller, limit);
2263 }
2264 else
2265 {
2266 throw std::runtime_error("Library not loaded!");
2267 }
2268}
2269
2270inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_GainHostLimit_Get(peak_afl_controller_handle controller, peak_afl_double_limit * limit)
2271{
2272 auto& inst = instance();
2273 if(inst.m_peak_afl_AutoController_GainHostLimit_Get)
2274 {
2275 return inst.m_peak_afl_AutoController_GainHostLimit_Get(controller, limit);
2276 }
2277 else
2278 {
2279 throw std::runtime_error("Library not loaded!");
2280 }
2281}
2282
2283inline PEAK_AFL_API_STATUS DynamicLoader::peak_afl_AutoController_GainHostLimit_GetRange(peak_afl_controller_handle controller, peak_afl_double_limit * limit)
2284{
2285 auto& inst = instance();
2286 if(inst.m_peak_afl_AutoController_GainHostLimit_GetRange)
2287 {
2288 return inst.m_peak_afl_AutoController_GainHostLimit_GetRange(controller, limit);
2289 }
2290 else
2291 {
2292 throw std::runtime_error("Library not loaded!");
2293 }
2294}
2295
2296} /* namespace dynamic */
2297} /* namespace afl */
2298} /* namespace peak */
peak_afl_controllerType
Auto feature controller types.
Definition peak_afl.h:223
peak_afl_controller_brightness_algorithm
Brightness calculation algorithms.
Definition peak_afl.h:505
peak_afl_controller_brightness_component
Brightness control components.
Definition peak_afl.h:609
peak_afl_callback_type
Controller callback types.
Definition peak_afl.h:808
peak_afl_controller_algorithm
Focus search algorithms.
Definition peak_afl.h:429
peak_afl_controller_automode
Auto feature controller operation modes.
Definition peak_afl.h:277
peak_afl_roi_preset
Predefined ROI preset configurations.
Definition peak_afl.h:1141
peak_afl_controller_sharpness_algorithm
Focus sharpness calculation algorithms.
Definition peak_afl.h:541
peak_afl_status
Auto feature library status codes.
Definition peak_afl.h:117
peak_afl_controller_status
Controller operational status.
Definition peak_afl.h:323
uint8_t peak_afl_BOOL8
Custom 8-bit boolean type.
Definition peak_afl.h:1359
C API interface for automatic camera feature control.
void * peak_afl_controller_handle
Opaque handle for auto feature controllers.
Definition peak_afl.h:91
void * peak_afl_manager_handle
Opaque handle for auto feature managers.
Definition peak_afl.h:103