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