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