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