IDS peak AFL v1.7.0
Loading...
Searching...
No Matches
peak_afl.hpp
Go to the documentation of this file.
1
10
11#pragma once
12
13
14#ifdef PEAK_AFL_DYNAMIC_LOADING
15# define PEAK_AFL_C_ABI_PREFIX peak::afl::dynamic::DynamicLoader::
16#else
17# define PEAK_AFL_C_ABI_PREFIX // we could also set ::
18#endif
19
20#include "peak_afl/peak_afl.h"
21#include "peak_ipl/types/peak_ipl_image.hpp"
22#include "peak_ipl/algorithm/peak_ipl_gain.hpp"
23#include "peak/node_map/peak_node_map.hpp"
24
25#include <type_traits>
26#include <cstdint>
27#include <exception>
28#include <string>
29#include <tuple>
30#include <utility>
31#include <vector>
32#include <memory>
33#include <functional>
34
35#if __cplusplus >= 201703L || _MSVC_LANG >= 201703L
36# define PEAK_AFL_NO_DISCARD [[nodiscard]]
37# define PEAK_AFL_MAYBE_UNUSED [[maybe_unused]]
38#else
39# ifdef _MSC_VER
40# define PEAK_AFL_NO_DISCARD _Check_return_
41# define PEAK_AFL_MAYBE_UNUSED
42# elif defined(__clang__) || defined(__GNUC__) || defined(__GNUG__)
43# define PEAK_AFL_NO_DISCARD __attribute__((warn_unused_result))
44# define PEAK_AFL_MAYBE_UNUSED __attribute__((unused))
45# else
46# define PEAK_AFL_NO_DISCARD
47# define PEAK_AFL_MAYBE_UNUSED
48# endif
49#endif
50
55
56
62
63namespace peak
64{
65namespace afl
66{
67namespace library
68{
69
75{
76 std::uint32_t major;
77 std::uint32_t minor;
78 std::uint32_t subminor;
79 std::uint32_t patch;
80
85 PEAK_AFL_NO_DISCARD std::string ToString() const
86 {
87 return std::to_string(major) + "." + std::to_string(minor) + "." + std::to_string(subminor) + "."
88 + std::to_string(patch);
89 }
90
96 PEAK_AFL_NO_DISCARD uint32_t Major() const
97 {
98 return major;
99 }
100
106 PEAK_AFL_NO_DISCARD uint32_t Minor() const
107 {
108 return minor;
109 }
110
115 PEAK_AFL_NO_DISCARD uint32_t Subminor() const
116 {
117 return subminor;
118 }
119
125 PEAK_AFL_NO_DISCARD uint32_t Patch() const
126 {
127 return patch;
128 }
129};
130
146inline void Init();
147
163inline void Exit();
164
173PEAK_AFL_NO_DISCARD inline std::string GetLastError();
174
189PEAK_AFL_NO_DISCARD inline Version_t Version();
190} // namespace library
191
192namespace error
193{
194
195
200class Exception : public std::exception
201{
202public:
203 explicit Exception(peak_afl_status code, bool get_text=true)
204 : m_code(code)
205 {
206 if (get_text)
207 {
208 m_text = library::GetLastError();
209 }
210 }
211
219 PEAK_AFL_NO_DISCARD peak_afl_status code() const
220 {
221 return m_code;
222 }
223
231 PEAK_AFL_NO_DISCARD const char* what() const noexcept override
232 {
233 if(m_text.empty())
234 {
235 return "-";
236 }
237 else
238 {
239 return m_text.c_str();
240 }
241 }
242
252 PEAK_AFL_NO_DISCARD static std::string translateCode(peak_afl_status status)
253 {
254 switch(status)
255 {
257 return "PEAK_AFL_STATUS_SUCCESS";
258
260 return "PEAK_AFL_STATUS_ERROR";
261
263 return "PEAK_AFL_STATUS_NOT_INITIALIZED";
264
266 return "PEAK_AFL_STATUS_INVALID_PARAMETER";
267
269 return "PEAK_AFL_STATUS_ACCESS_DENIED";
270
272 return "PEAK_AFL_STATUS_BUSY";
273
275 return "PEAK_AFL_STATUS_BUFFER_TOO_SMALL";
276
278 return "PEAK_AFL_STATUS_INVALID_IMAGE_FORMAT";
279
281 return "PEAK_AFL_STATUS_NOT_SUPPORTED";
282
283 case PEAK_AFL_STATUS_VALUE_ADJUSTED:
284 return "PEAK_AFL_STATUS_VALUE_ADJUSTED";
285
286 default:
287 return "Unknown Status code";
288 }
289 }
290
291private:
292 peak_afl_status m_code{};
293 std::string m_text{};
294};
295} // namespace error
296
297class Controller;
298
304{
305public:
317 inline explicit Manager(const std::shared_ptr<peak::core::NodeMap>& node_map);
318
322 inline ~Manager();
323
324 Manager(const Manager&) = delete;
325 inline Manager(Manager&&) noexcept;
326
327 Manager& operator=(const Manager&) noexcept = delete;
328 inline Manager& operator=(Manager&&) noexcept;
329
342 inline void AddController(const std::shared_ptr<Controller>& controller);
343
356 inline void RemoveController(const std::shared_ptr<Controller>& controller);
357
369 inline void Process(const peak::ipl::Image& image) const;
370
385 PEAK_AFL_NO_DISCARD inline std::shared_ptr<Controller> CreateController(peak_afl_controllerType type);
386
396 inline void DestroyAllController();
397
407 inline void DestroyController(const std::shared_ptr<Controller>& controller);
408
418 inline void SetGainIPL(const peak::ipl::Gain& gain);
419
431 PEAK_AFL_NO_DISCARD inline bool Status() const;
432
440 PEAK_AFL_NO_DISCARD inline std::vector<std::shared_ptr<Controller>> ControllerList() const;
441
449 PEAK_AFL_NO_DISCARD inline size_t ControllerCount() const;
450
462 PEAK_AFL_NO_DISCARD inline std::shared_ptr<Controller> GetController(peak_afl_controllerType type) const;
463
464private:
465 std::vector<std::shared_ptr<Controller>> m_controllerList;
466 mutable std::mutex m_mutex{};
467 peak_afl_manager_handle m_handle{};
468};
469
479template<typename... ControllerTypes>
480std::tuple<Manager, std::vector<std::shared_ptr<Controller>>>
481CreateManager(const std::shared_ptr<peak::core::NodeMap>& node_map, ControllerTypes... types)
482{
483 constexpr int size = sizeof...(types);
484 constexpr std::array<peak_afl_controllerType, size> controller_types{types...};
485 std::vector<std::shared_ptr<Controller>> controller{};
486 Manager manager{node_map};
487 controller.reserve(size);
488
489 std::for_each(controller_types.cbegin(), controller_types.cend(), [&manager, &controller](peak_afl_controllerType type) {
490 controller.emplace_back(manager.CreateController(type));
491 });
492
493 return { std::move(manager), std::move(controller) };
494}
495
496
501template <typename T, typename std::enable_if_t<std::is_arithmetic<T>::value, int> = 0>
502struct Range
503{
504 T min;
505 T max;
506 T inc;
507};
508
509namespace callback
510{
511using FinishedCallback = std::function<void(void)>;
512using DataProcessingCallback = std::function<void(int, int)>;
513using ProcessingCallback = std::function<void(peak_afl_process_data*)>;
514using ComponentCallback = std::function<void(void)>;
515
516using RegisterFunction = std::function<PEAK_AFL_API_STATUS(void*, void*)>;
517using UnRegisterFunction = std::function<void()>;
518}
519
524class Controller : public std::enable_shared_from_this<Controller>
525{
526 friend class Manager;
527
528 template<class T>
529 class Callback
530 {
531#ifndef SWIG
532 public:
533 template<typename R, typename ...Args>
534 Callback(const std::shared_ptr<peak::afl::Controller>& controller, callback::RegisterFunction register_function,
535 callback::UnRegisterFunction unregister_function, std::function<R(Args...)> callback) :
536 m_unregister_function(std::move(unregister_function)),
537 m_callback(std::move(callback))
538 {
539 const auto ret = register_function(reinterpret_cast<void*>(&Callback::Func<Args...>), this);
540 if (ret != PEAK_AFL_STATUS_SUCCESS)
541 {
542 throw error::Exception(ret);
543 }
544 m_controller = controller;
545 }
546
547 virtual ~Callback()
548 {
549 if (auto controller = m_controller.lock())
550 {
551 m_unregister_function();
552 }
553 }
554
555 private:
556 template<typename ...Args>
557 static void Func(Args... args, void* ptr)
558 {
559 static_cast<Callback *>(ptr)->m_callback(args...);
560 };
561#endif
562
563 std::weak_ptr<peak::afl::Controller> m_controller{};
564 callback::UnRegisterFunction m_unregister_function{};
565 T m_callback{};
566 };
567
568
578 inline explicit Controller(peak_afl_controller_handle handle)
579 : m_handle(handle) {};
580
581public:
585 inline ~Controller();
586
587 Controller(const Controller&) = delete;
588 Controller(Controller&&) = delete;
589 Controller& operator=(const Controller&) = delete;
590 Controller& operator=(Controller&&) = delete;
591
603 PEAK_AFL_NO_DISCARD inline static std::shared_ptr<Controller> Create(peak_afl_controllerType type);
604
614 PEAK_AFL_NO_DISCARD inline bool IsSkipFramesSupported() const;
615
627 inline void SetSkipFrames(std::uint32_t count);
628
640 PEAK_AFL_NO_DISCARD inline std::uint32_t GetSkipFrames() const;
641
651 PEAK_AFL_NO_DISCARD inline Range<std::uint32_t> GetSkipFramesRange() const;
652
664 PEAK_AFL_NO_DISCARD inline bool IsROISupported() const;
665
677 inline void SetROI(peak_afl_rectangle rect);
678
690 PEAK_AFL_NO_DISCARD inline peak_afl_rectangle GetROI() const;
691
703 PEAK_AFL_NO_DISCARD inline bool IsROIPresetSupported() const;
704
716 inline void SetROIPreset(peak_afl_roi_preset preset);
717
729 PEAK_AFL_NO_DISCARD inline bool IsModeSupported() const;
730
742 inline void SetMode(peak_afl_controller_automode mode);
743
753 PEAK_AFL_NO_DISCARD inline peak_afl_controller_automode GetMode() const;
754
766 PEAK_AFL_NO_DISCARD bool IsBrightnessAlgorithmSupported() const;
767
780
789
801 PEAK_AFL_NO_DISCARD inline peak_afl_controller_status Status() const;
802
814 PEAK_AFL_NO_DISCARD inline std::uint8_t GetLastAutoAverage() const;
815
827 PEAK_AFL_NO_DISCARD inline std::tuple<std::uint8_t, std::uint8_t, std::uint8_t> GetLastAutoAverages() const;
828
840 PEAK_AFL_NO_DISCARD inline bool IsAutoTargetSupported() const;
841
854 inline void SetAutoTarget(uint32_t target);
855
865 PEAK_AFL_NO_DISCARD inline std::uint32_t GetAutoTarget() const;
866
879 PEAK_AFL_NO_DISCARD inline Range<std::uint32_t> GetAutoTargetRange() const;
880
892 PEAK_AFL_NO_DISCARD inline bool IsAutoToleranceSupported() const;
893
905 inline void SetAutoTolerance(std::uint32_t tolerance);
906
916 PEAK_AFL_NO_DISCARD inline std::uint32_t GetAutoTolerance() const;
917
930 PEAK_AFL_NO_DISCARD inline Range<std::uint32_t> GetAutoToleranceRange() const;
931
943 PEAK_AFL_NO_DISCARD inline bool IsAutoPercentileSupported() const;
944
957 inline void SetAutoPercentile(double percentile);
958
968 PEAK_AFL_NO_DISCARD inline double GetAutoPercentile() const;
969
982 PEAK_AFL_NO_DISCARD inline Range<double> GetAutoPercentileRange() const;
983
995 PEAK_AFL_NO_DISCARD inline peak_afl_controllerType Type() const;
996
1010 PEAK_AFL_NO_DISCARD inline bool IsAlgorithmSupported() const;
1011
1023 inline void SetAlgorithm(peak_afl_controller_algorithm algorithm);
1024
1032 PEAK_AFL_NO_DISCARD inline peak_afl_controller_algorithm GetAlgorithm() const;
1033
1045 PEAK_AFL_NO_DISCARD inline std::vector<peak_afl_controller_algorithm> GetAlgorithmList() const;
1046
1058 PEAK_AFL_NO_DISCARD inline bool IsSharpnessAlgorithmSupported() const;
1059
1072
1082 PEAK_AFL_NO_DISCARD inline peak_afl_controller_sharpness_algorithm GetSharpnessAlgorithm() const;
1083
1095 PEAK_AFL_NO_DISCARD inline std::vector<peak_afl_controller_sharpness_algorithm> GetSharpnessAlgorithmList() const;
1096
1106 inline void RegisterFinishedCallback(const callback::FinishedCallback& callback);
1107
1115 inline void UnRegisterFinishedCallback();
1116
1125 inline void RegisterComponentCallback(peak_afl_controller_brightness_component component, const callback::FinishedCallback& callback);
1126
1137
1147 inline void RegisterDataProcessingCallback(const callback::DataProcessingCallback& callback);
1148
1157
1165 inline void RegisterProcessingCallback(const callback::ProcessingCallback& callback);
1166
1174 inline void UnRegisterProcessingCallback();
1175
1187 PEAK_AFL_NO_DISCARD inline bool IsWeightedROISupported() const;
1188
1200 inline void SetWeightedROIs(const std::vector<peak_afl_weighted_rectangle>& list);
1201
1213 inline void SetWeightedROI(const peak_afl_weighted_rectangle& rect);
1214
1224 PEAK_AFL_NO_DISCARD inline peak_afl_size GetWeightedROIMinSize() const;
1225
1235 PEAK_AFL_NO_DISCARD inline std::vector<peak_afl_weighted_rectangle> GetWeightedROIs() const;
1236
1248 PEAK_AFL_NO_DISCARD inline bool IsLimitSupported() const;
1249
1261 inline void SetLimit(peak_afl_controller_limit limit);
1262
1272 PEAK_AFL_NO_DISCARD inline peak_afl_controller_limit GetLimit() const;
1273
1283 PEAK_AFL_NO_DISCARD inline peak_afl_controller_limit GetDefaultLimit() const;
1284
1296 PEAK_AFL_NO_DISCARD inline bool IsHysteresisSupported() const;
1297
1309 inline void SetHysteresis(std::uint8_t hysteresis);
1310
1320 PEAK_AFL_NO_DISCARD inline std::uint8_t GetHysteresis() const;
1321
1331 PEAK_AFL_NO_DISCARD inline std::uint8_t GetDefaultHysteresis() const;
1332
1342 PEAK_AFL_NO_DISCARD inline Range<std::uint8_t> GetHysteresisRange() const;
1343
1355 PEAK_AFL_NO_DISCARD inline bool IsBrightnessComponentModeSupported() const;
1356
1369 PEAK_AFL_NO_DISCARD inline bool IsBrightnessComponentUnitSupported(peak_afl_controller_brightness_component component) const;
1370
1384
1396
1410
1420 PEAK_AFL_NO_DISCARD inline bool IsGainLimitSupported() const;
1421
1438 inline void SetGainLimit(peak_afl_double_limit limit);
1439
1449 inline peak_afl_double_limit GetGainLimit() const;
1450
1461
1477 inline void SetGainAnalogLimit(peak_afl_double_limit limit);
1478
1489
1500
1516 inline void SetGainDigitalLimit(peak_afl_double_limit limit);
1517
1528
1539
1556
1567
1578
1594 inline void SetGainHostLimit(peak_afl_double_limit limit);
1595
1606
1617
1627 inline void SetExposureLimit(peak_afl_double_limit limit);
1628
1639
1640
1641private:
1642 using FinishedCallbackType = Callback<callback::FinishedCallback>;
1643 using DataProcessingCallbackType = Callback<callback::DataProcessingCallback>;
1644 using ProcessingCallbackType = Callback<callback::ProcessingCallback>;
1645 using ComponentCallbackType = Callback<callback::ComponentCallback>;
1646
1647 peak_afl_controller_handle m_handle{};
1648 std::unique_ptr<FinishedCallbackType> m_finishedCallback{};
1649 std::unique_ptr<DataProcessingCallbackType> m_dataProcessingCallback{};
1650 std::unique_ptr<ProcessingCallbackType> m_ProcessingCallback{};
1651 std::unique_ptr<ComponentCallbackType> m_finishedExposureCallback{};
1652 std::unique_ptr<ComponentCallbackType> m_finishedGainCallback{};
1653};
1654
1655namespace library
1656{
1657inline void Init()
1658{
1659 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_Init();
1660 if (ret != PEAK_AFL_STATUS_SUCCESS)
1661
1662 {
1663 throw error::Exception(ret, false);
1664 }
1665}
1666
1667inline void Exit()
1668{
1669 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_Exit();
1670 if (ret != PEAK_AFL_STATUS_SUCCESS)
1671 {
1672 throw error::Exception(ret, false);
1673 }
1674}
1675
1677{
1678 Version_t version{};
1679
1680 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_GetVersion(&version.major, &version.minor, &version.subminor, &version.patch);
1681 if (ret != PEAK_AFL_STATUS_SUCCESS)
1682 {
1683 throw error::Exception(ret, false);
1684 }
1685
1686 return version;
1687}
1688
1689inline std::string GetLastError()
1690{
1691 std::size_t lastErrorMessageSize;
1692 peak_afl_status code;
1693
1694 auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_GetLastError(&code, nullptr, &lastErrorMessageSize);
1695 if (ret != PEAK_AFL_STATUS_SUCCESS)
1696 {
1697 return "Cannot get last error!";
1698 }
1699
1700 std::vector<char> text;
1701 text.resize(lastErrorMessageSize);
1702
1703 ret = PEAK_AFL_C_ABI_PREFIX peak_afl_GetLastError(&code, text.data(), &lastErrorMessageSize);
1704 if (ret != PEAK_AFL_STATUS_SUCCESS)
1705 {
1706 return "Cannot get last error!";
1707 }
1708
1709 return { text.begin(), text.end() };
1710}
1711} // namespace library
1712
1713inline Manager::Manager(const std::shared_ptr<peak::core::NodeMap>& node_map)
1714{
1715 if(!node_map)
1716 {
1717 throw std::runtime_error("Invalid node map handle!");
1718 }
1719
1720 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoFeatureManager_Create(&m_handle, node_map->Handle());
1721 if (ret != PEAK_AFL_STATUS_SUCCESS)
1722 {
1723 throw error::Exception(ret);
1724 }
1725}
1726
1728{
1729 if (m_handle != nullptr)
1730 {
1731 PEAK_AFL_C_ABI_PREFIX peak_afl_AutoFeatureManager_DestroyAllController(m_handle);
1732
1733 {
1734 std::lock_guard<std::mutex> lck(m_mutex);
1735 for (auto& c : m_controllerList)
1736 {
1737 c->m_handle = nullptr;
1738 }
1739 }
1740
1741 PEAK_AFL_C_ABI_PREFIX peak_afl_AutoFeatureManager_Destroy(m_handle);
1742 m_handle = nullptr;
1743 }
1744}
1745
1746inline Manager::Manager(Manager&& other) noexcept {
1747 m_handle = other.m_handle;
1748 other.m_handle = nullptr;
1749
1750 std::lock_guard<std::mutex> lck(other.m_mutex);
1751 m_controllerList = std::move(other.m_controllerList);
1752}
1753
1754inline Manager& Manager::operator=(Manager&& other) noexcept
1755{
1756 m_handle = other.m_handle;
1757 other.m_handle = nullptr;
1758
1759 std::lock_guard<std::mutex> lck(other.m_mutex);
1760 m_controllerList = std::move(other.m_controllerList);
1761
1762 return *this;
1763}
1764
1765inline void Manager::AddController(const std::shared_ptr<Controller>& controller)
1766{
1767 std::lock_guard<std::mutex> lck(m_mutex);
1768
1769 auto cnt = std::any_of(m_controllerList.begin(), m_controllerList.end(), [controller](const std::shared_ptr<Controller>& c) {
1770 return c == controller;
1771 });
1772
1773 if(cnt)
1774 {
1775 return;
1776 }
1777
1778 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoFeatureManager_AddController(m_handle, controller->m_handle);
1779 if (ret != PEAK_AFL_STATUS_SUCCESS)
1780 {
1781 throw error::Exception(ret);
1782 }
1783
1784 m_controllerList.emplace_back(controller);
1785}
1786
1787inline void Manager::RemoveController(const std::shared_ptr<Controller>& controller)
1788{
1789 std::lock_guard<std::mutex> lck(m_mutex);
1790
1791 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoFeatureManager_RemoveController(m_handle, controller->m_handle);
1792 if (ret != PEAK_AFL_STATUS_SUCCESS)
1793 {
1794 throw error::Exception(ret);
1795 }
1796
1797 auto it = std::remove_if(m_controllerList.begin(), m_controllerList.end(), [controller](const std::shared_ptr<Controller>& c) {
1798 return c == controller;
1799 });
1800
1801 m_controllerList.erase(it, m_controllerList.end());
1802}
1803
1804inline void Manager::Process(const peak::ipl::Image& image) const
1805{
1806 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoFeatureManager_Process(m_handle, ImageBackendAccessor::BackendHandle(image));
1807 if (ret != PEAK_AFL_STATUS_SUCCESS)
1808 {
1809 throw error::Exception(ret);
1810 }
1811}
1812
1813inline std::shared_ptr<Controller> Manager::CreateController(peak_afl_controllerType type)
1814{
1815 std::lock_guard<std::mutex> lck(m_mutex);
1816
1818 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoFeatureManager_CreateController(m_handle, &handle, type);
1819 if (ret != PEAK_AFL_STATUS_SUCCESS)
1820 {
1821 throw error::Exception(ret);
1822 }
1823
1824 auto shared = std::shared_ptr<Controller>(new Controller(handle));
1825 m_controllerList.emplace_back(shared);
1826
1827 return shared;
1828}
1829
1831{
1832 std::lock_guard<std::mutex> lck(m_mutex);
1833
1834 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoFeatureManager_DestroyAllController(m_handle);
1835 if (ret != PEAK_AFL_STATUS_SUCCESS)
1836 {
1837 throw error::Exception(ret);
1838 }
1839
1840 for(auto& c : m_controllerList)
1841 {
1842 c->m_handle = nullptr;
1843 }
1844
1845 m_controllerList.clear();
1846}
1847
1848inline void Manager::DestroyController(const std::shared_ptr<Controller>& controller)
1849{
1850 std::lock_guard<std::mutex> lck(m_mutex);
1851
1852 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoFeatureManager_DestroyController(m_handle, controller->m_handle);
1853 if (ret != PEAK_AFL_STATUS_SUCCESS)
1854 {
1855 throw error::Exception(ret);
1856 }
1857
1858 auto it = std::remove_if(m_controllerList.begin(), m_controllerList.end(), [controller](const std::shared_ptr<Controller>& c) {
1859 return c == controller;
1860 });
1861
1862 m_controllerList.erase(it, m_controllerList.end());
1863
1864 controller->m_handle = nullptr;
1865}
1866
1867inline void Manager::SetGainIPL(const peak::ipl::Gain& gain)
1868{
1869 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoFeatureManager_SetGainIPL(m_handle, GainBackendAccessor::BackendHandle(gain));
1870 if (ret != PEAK_AFL_STATUS_SUCCESS)
1871 {
1872 throw error::Exception(ret);
1873 }
1874}
1875
1876inline bool Manager::Status() const
1877{
1878 std::uint8_t status;
1879 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoFeatureManager_Status(m_handle, &status);
1880 if (ret != PEAK_AFL_STATUS_SUCCESS)
1881 {
1882 throw error::Exception(ret);
1883 }
1884
1885 return status;
1886}
1887
1888inline std::vector<std::shared_ptr<Controller>> Manager::ControllerList() const
1889{
1890 std::lock_guard<std::mutex> lck(m_mutex);
1891
1892 std::vector<std::shared_ptr<Controller>> controller{};
1893
1894 std::copy(m_controllerList.begin(), m_controllerList.end(), std::back_inserter(controller));
1895
1896 return controller;
1897}
1898
1899inline size_t Manager::ControllerCount() const
1900{
1901 return m_controllerList.size();
1902}
1903
1904inline std::shared_ptr<Controller> Manager::GetController(peak_afl_controllerType type) const
1905{
1906 std::lock_guard<std::mutex> lck(m_mutex);
1907
1908 auto it = std::find_if(m_controllerList.cbegin(), m_controllerList.cend(), [=](const std::shared_ptr<Controller>& controller) {
1909 return type == controller->Type();
1910 });
1911
1912 if(it != m_controllerList.cend())
1913 {
1914 return *it;
1915 }
1916 else
1917 {
1919 }
1920}
1921
1922inline std::shared_ptr<Controller> Controller::Create(peak_afl_controllerType type)
1923{
1925 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_Create(&handle, type);
1926 if (ret != PEAK_AFL_STATUS_SUCCESS)
1927 {
1928 throw error::Exception(ret);
1929 }
1930
1931 return std::shared_ptr<Controller>(new Controller(handle));
1932}
1933
1935{
1936 if (m_handle != nullptr)
1937 {
1938 PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_Destroy(m_handle);
1939 m_handle = nullptr;
1940 }
1941}
1942
1944{
1945 peak_afl_BOOL8 supported{};
1946 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_SkipFrames_IsSupported(m_handle, &supported);
1947 if (ret != PEAK_AFL_STATUS_SUCCESS)
1948 {
1949 throw error::Exception(ret);
1950 }
1951
1952 return supported;
1953}
1954
1955inline void Controller::SetSkipFrames(std::uint32_t count)
1956{
1957 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_SkipFrames_Set(m_handle, count);
1958 if (ret != PEAK_AFL_STATUS_SUCCESS)
1959 {
1960 throw error::Exception(ret);
1961 }
1962}
1963
1964inline std::uint32_t Controller::GetSkipFrames() const
1965{
1966 std::uint32_t count{};
1967 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_SkipFrames_Get(m_handle, &count);
1968 if (ret != PEAK_AFL_STATUS_SUCCESS)
1969 {
1970 throw error::Exception(ret);
1971 }
1972
1973 return count;
1974}
1975
1977{
1978 Range<std::uint32_t> range{};
1979 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_SkipFrames_GetRange(m_handle, &range.min, &range.max, &range.inc);
1980 if (ret != PEAK_AFL_STATUS_SUCCESS)
1981 {
1982 throw error::Exception(ret);
1983 }
1984
1985 return range;
1986}
1987
1989{
1990 peak_afl_BOOL8 supported{};
1991 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_ROI_IsSupported(m_handle, &supported);
1992 if (ret != PEAK_AFL_STATUS_SUCCESS)
1993 {
1994 throw error::Exception(ret);
1995 }
1996
1997 return supported;
1998}
1999
2001{
2002 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_ROI_Set(m_handle, rect);
2003 if (ret != PEAK_AFL_STATUS_SUCCESS)
2004 {
2005 throw error::Exception(ret);
2006 }
2007}
2008
2010{
2011 peak_afl_rectangle rect{};
2012 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_ROI_Get(m_handle, &rect);
2013 if (ret != PEAK_AFL_STATUS_SUCCESS)
2014 {
2015 throw error::Exception(ret);
2016 }
2017 return rect;
2018}
2019
2021{
2022 peak_afl_BOOL8 supported{};
2023 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_ROI_Preset_IsSupported(m_handle, &supported);
2024 if (ret != PEAK_AFL_STATUS_SUCCESS)
2025 {
2026 throw error::Exception(ret);
2027 }
2028
2029 return supported;
2030}
2031
2033{
2034 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_ROI_Preset_Set(m_handle, preset);
2035 if (ret != PEAK_AFL_STATUS_SUCCESS)
2036 {
2037 throw error::Exception(ret);
2038 }
2039}
2040
2042{
2043 peak_afl_BOOL8 supported{};
2044 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_Mode_IsSupported(m_handle, &supported);
2045 if (ret != PEAK_AFL_STATUS_SUCCESS)
2046 {
2047 throw error::Exception(ret);
2048 }
2049
2050 return supported;
2051}
2052
2054{
2055 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_Mode_Set(m_handle, mode);
2056 if (ret != PEAK_AFL_STATUS_SUCCESS)
2057 {
2058 throw error::Exception(ret);
2059 }
2060}
2061
2063{
2065 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_Mode_Get(m_handle, &mode);
2066 if (ret != PEAK_AFL_STATUS_SUCCESS)
2067 {
2068 throw error::Exception(ret);
2069 }
2070 return mode;
2071}
2072
2074{
2075 peak_afl_BOOL8 supported{};
2076 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_BrightnessAlgorithm_IsSupported(m_handle, &supported);
2077 if (ret != PEAK_AFL_STATUS_SUCCESS)
2078 {
2079 throw error::Exception(ret);
2080 }
2081
2082 return supported;
2083}
2084
2086{
2087 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_BrightnessAlgorithm_Set(m_handle, algorithm);
2088 if (ret != PEAK_AFL_STATUS_SUCCESS)
2089 {
2090 throw error::Exception(ret);
2091 }
2092}
2093
2095{
2097 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_BrightnessAlgorithm_Get(m_handle, &algorithm);
2098 if (ret != PEAK_AFL_STATUS_SUCCESS)
2099 {
2100 throw error::Exception(ret);
2101 }
2102 return algorithm;
2103}
2104
2106{
2108 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_Status(m_handle, &status);
2109 if (ret != PEAK_AFL_STATUS_SUCCESS)
2110 {
2111 throw error::Exception(ret);
2112 }
2113 return status;
2114}
2115
2116
2117inline std::uint8_t Controller::GetLastAutoAverage() const
2118{
2119 std::uint8_t average{};
2120 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_GetLastAutoAverage(m_handle, &average);
2121 if (ret != PEAK_AFL_STATUS_SUCCESS)
2122 {
2123 throw error::Exception(ret);
2124 }
2125 return average;
2126}
2127
2128inline std::tuple<std::uint8_t, std::uint8_t, std::uint8_t> Controller::GetLastAutoAverages() const
2129{
2130 std::uint8_t averageRed{}, averageGreen{}, averageBlue{};
2131 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_GetLastAutoAverages(m_handle, &averageRed, &averageGreen, &averageBlue);
2132 if (ret != PEAK_AFL_STATUS_SUCCESS)
2133 {
2134 throw error::Exception(ret);
2135 }
2136 return { averageRed, averageGreen, averageBlue };
2137}
2138
2140{
2141 peak_afl_BOOL8 supported{};
2142 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_AutoTarget_IsSupported(m_handle, &supported);
2143 if (ret != PEAK_AFL_STATUS_SUCCESS)
2144 {
2145 throw error::Exception(ret);
2146 }
2147
2148 return supported;
2149}
2150
2151inline void Controller::SetAutoTarget(std::uint32_t target)
2152{
2153 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_AutoTarget_Set(m_handle, target);
2154 if (ret != PEAK_AFL_STATUS_SUCCESS)
2155 {
2156 throw error::Exception(ret);
2157 }
2158}
2159
2160inline std::uint32_t Controller::GetAutoTarget() const
2161{
2162 std::uint32_t target{};
2163 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_AutoTarget_Get(m_handle, &target);
2164 if (ret != PEAK_AFL_STATUS_SUCCESS)
2165 {
2166 throw error::Exception(ret);
2167 }
2168 return target;
2169}
2170
2172{
2173 Range<std::uint32_t> range{};
2174 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_AutoTarget_GetRange(m_handle, &range.min, &range.max, &range.inc);
2175 if (ret != PEAK_AFL_STATUS_SUCCESS)
2176 {
2177 throw error::Exception(ret);
2178 }
2179 return range;
2180}
2181
2183{
2184 peak_afl_BOOL8 supported{};
2185 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_AutoTolerance_IsSupported(m_handle, &supported);
2186 if (ret != PEAK_AFL_STATUS_SUCCESS)
2187 {
2188 throw error::Exception(ret);
2189 }
2190
2191 return supported;
2192}
2193
2194inline void Controller::SetAutoTolerance(uint32_t tolerance)
2195{
2196 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_AutoTolerance_Set(m_handle, tolerance);
2197 if (ret != PEAK_AFL_STATUS_SUCCESS)
2198 {
2199 throw error::Exception(ret);
2200 }
2201}
2202
2203inline uint32_t Controller::GetAutoTolerance() const
2204{
2205 std::uint32_t tolerance;
2206 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_AutoTolerance_Get(m_handle, &tolerance);
2207 if (ret != PEAK_AFL_STATUS_SUCCESS)
2208 {
2209 throw error::Exception(ret);
2210 }
2211 return tolerance;
2212}
2213
2215{
2216 Range<uint32_t> range{};
2217 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_AutoTolerance_GetRange(m_handle, &range.min, &range.max, &range.inc);
2218 if (ret != PEAK_AFL_STATUS_SUCCESS)
2219 {
2220 throw error::Exception(ret);
2221 }
2222 return range;
2223}
2224
2226{
2227 peak_afl_BOOL8 supported{};
2228 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_AutoPercentile_IsSupported(m_handle, &supported);
2229 if (ret != PEAK_AFL_STATUS_SUCCESS)
2230 {
2231 throw error::Exception(ret);
2232 }
2233
2234 return supported;
2235}
2236
2237inline void Controller::SetAutoPercentile(double percentile)
2238{
2239 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_AutoPercentile_Set(m_handle, percentile);
2240 if (ret != PEAK_AFL_STATUS_SUCCESS)
2241 {
2242 throw error::Exception(ret);
2243 }
2244}
2245
2247{
2248 double percentile;
2249 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_AutoPercentile_Get(m_handle, &percentile);
2250 if (ret != PEAK_AFL_STATUS_SUCCESS)
2251 {
2252 throw error::Exception(ret);
2253 }
2254 return percentile;
2255}
2256
2258{
2259 Range<double> range{};
2260 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_AutoPercentile_GetRange(m_handle, &range.min, &range.max, &range.inc);
2261 if (ret != PEAK_AFL_STATUS_SUCCESS)
2262 {
2263 throw error::Exception(ret);
2264 }
2265 return range;
2266}
2267
2269{
2271 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_Type_Get(m_handle, &type);
2272 if (ret != PEAK_AFL_STATUS_SUCCESS)
2273 {
2274 throw error::Exception(ret);
2275 }
2276 return type;
2277}
2278
2280{
2281 peak_afl_BOOL8 supported{};
2282 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_Algorithm_IsSupported(m_handle, &supported);
2283 if (ret != PEAK_AFL_STATUS_SUCCESS)
2284 {
2285 throw error::Exception(ret);
2286 }
2287
2288 return supported;
2289}
2290
2292{
2293 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_Algorithm_Set(m_handle, alg);
2294 if (ret != PEAK_AFL_STATUS_SUCCESS)
2295 {
2296 throw error::Exception(ret);
2297 }
2298}
2299
2301{
2303 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_Algorithm_Get(m_handle, &alg);
2304 if (ret != PEAK_AFL_STATUS_SUCCESS)
2305 {
2306 throw error::Exception(ret);
2307 }
2308
2309 return alg;
2310}
2311
2312inline std::vector<peak_afl_controller_algorithm> Controller::GetAlgorithmList() const
2313{
2314 std::vector<peak_afl_controller_algorithm> algList{};
2315 std::uint32_t listSize{};
2316
2317 auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_Algorithm_GetList(m_handle, nullptr, &listSize);
2318 if (ret != PEAK_AFL_STATUS_SUCCESS)
2319 {
2320 throw error::Exception(ret);
2321 }
2322
2323 algList.resize(listSize);
2324
2325 ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_Algorithm_GetList(m_handle, algList.data(), &listSize);
2326 if (ret != PEAK_AFL_STATUS_SUCCESS)
2327 {
2328 throw error::Exception(ret);
2329 }
2330
2331 return algList;
2332}
2333
2335{
2336 peak_afl_BOOL8 supported{};
2337 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_SharpnessAlgorithm_IsSupported(m_handle, &supported);
2338 if (ret != PEAK_AFL_STATUS_SUCCESS)
2339 {
2340 throw error::Exception(ret);
2341 }
2342
2343 return supported;
2344}
2345
2347{
2348 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_SharpnessAlgorithm_Set(m_handle, alg);
2349 if (ret != PEAK_AFL_STATUS_SUCCESS)
2350 {
2351 throw error::Exception(ret);
2352 }
2353}
2354
2356{
2358 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_SharpnessAlgorithm_Get(m_handle, &alg);
2359 if (ret != PEAK_AFL_STATUS_SUCCESS)
2360 {
2361 throw error::Exception(ret);
2362 }
2363
2364 return alg;
2365}
2366
2367inline std::vector<peak_afl_controller_sharpness_algorithm> Controller::GetSharpnessAlgorithmList() const
2368{
2369 std::vector<peak_afl_controller_sharpness_algorithm> algList{};
2370 std::uint32_t listSize{};
2371
2372 auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_SharpnessAlgorithm_GetList(m_handle, nullptr, &listSize);
2373 if (ret != PEAK_AFL_STATUS_SUCCESS)
2374 {
2375 throw error::Exception(ret);
2376 }
2377
2378 algList.resize(listSize);
2379
2380 ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_SharpnessAlgorithm_GetList(m_handle, algList.data(), &listSize);
2381 if (ret != PEAK_AFL_STATUS_SUCCESS)
2382 {
2383 throw error::Exception(ret);
2384 }
2385
2386 return algList;
2387}
2388
2389inline void Controller::RegisterFinishedCallback(const callback::FinishedCallback& callback)
2390{
2391 m_finishedCallback = std::make_unique<FinishedCallbackType>(shared_from_this(),
2392 [handle = m_handle](void* ptr, void* ctx) {
2393 return PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_Callback_Set(handle, PEAK_AFL_CONTROLLER_CALLBACK_FINISHED, ptr, ctx); },
2394 [handle = m_handle] {
2395 PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_Callback_Set(handle, PEAK_AFL_CONTROLLER_CALLBACK_FINISHED, nullptr, nullptr); },
2396 callback);
2397}
2398
2400{
2401 m_finishedCallback.reset();
2402}
2403
2404inline void Controller::RegisterComponentCallback(peak_afl_controller_brightness_component component, const callback::FinishedCallback& callback)
2405{
2407 {
2409 }
2410
2412 {
2413 m_finishedExposureCallback = std::make_unique<ComponentCallbackType>(shared_from_this(),
2414 [handle = m_handle, component](void* ptr, void* ctx) {
2416 ptr, ctx); },
2417 [handle = m_handle, component] {
2419 nullptr, nullptr); },
2420 callback);
2421 }
2423 {
2424 m_finishedGainCallback = std::make_unique<ComponentCallbackType>(shared_from_this(),
2425 [handle = m_handle, component](void* ptr, void* ctx) {
2427 ptr, ctx); },
2428 [handle = m_handle, component] {
2430 nullptr, nullptr); },
2431 callback);
2432 }
2433 else
2434 {
2436 }
2437}
2438
2440{
2442 {
2443 m_finishedExposureCallback.reset();
2444 }
2446 {
2447 m_finishedGainCallback.reset();
2448 }
2449 else
2450 {
2452 }
2453}
2454
2455inline void Controller::RegisterDataProcessingCallback(const callback::DataProcessingCallback& callback)
2456{
2457 m_dataProcessingCallback = std::make_unique<DataProcessingCallbackType>(shared_from_this(),
2458 [handle = m_handle](void* ptr, void* ctx) {
2459 return PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_Callback_Set(handle, PEAK_AFL_CONTROLLER_CALLBACK_PROCESSING_DATA, ptr, ctx); },
2460 [handle = m_handle] {
2461 PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_Callback_Set(handle, PEAK_AFL_CONTROLLER_CALLBACK_PROCESSING_DATA, nullptr, nullptr);},
2462 callback);
2463}
2464
2465inline void Controller::RegisterProcessingCallback(const callback::ProcessingCallback& callback)
2466{
2467 m_ProcessingCallback = std::make_unique<ProcessingCallbackType>(shared_from_this(),
2468 [handle = m_handle](void* ptr, void* ctx) {
2469 return PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_Callback_Set(handle, PEAK_AFL_CONTROLLER_CALLBACK_PROCESSING, ptr, ctx); },
2470 [handle = m_handle] {
2471 PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_Callback_Set(handle, PEAK_AFL_CONTROLLER_CALLBACK_PROCESSING, nullptr, nullptr);},
2472 callback);
2473}
2474
2476{
2477 m_ProcessingCallback.reset();
2478}
2479
2481{
2482 m_dataProcessingCallback.reset();
2483}
2484
2486{
2487 peak_afl_BOOL8 supported{};
2488 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_Weighted_ROI_IsSupported(m_handle, &supported);
2489 if (ret != PEAK_AFL_STATUS_SUCCESS)
2490 {
2491 throw error::Exception(ret);
2492 }
2493
2494 return supported;
2495}
2496
2497inline void Controller::SetWeightedROIs(const std::vector<peak_afl_weighted_rectangle>& list)
2498{
2499 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_Weighted_ROI_Set(m_handle, list.data(), static_cast<uint32_t>(list.size()));
2500 if (ret != PEAK_AFL_STATUS_SUCCESS)
2501 {
2502 throw error::Exception(ret);
2503 }
2504}
2505
2507{
2508 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_Weighted_ROI_Set(m_handle, &rect, 1);
2509 if (ret != PEAK_AFL_STATUS_SUCCESS)
2510 {
2511 throw error::Exception(ret);
2512 }
2513}
2514
2516{
2517 peak_afl_size minSize{};
2518 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_Weighted_ROI_Min_Size(m_handle, &minSize);
2519 if (ret != PEAK_AFL_STATUS_SUCCESS)
2520 {
2521 throw error::Exception(ret);
2522 }
2523 return minSize;
2524}
2525
2526inline std::vector<peak_afl_weighted_rectangle> Controller::GetWeightedROIs() const
2527{
2528 std::vector<peak_afl_weighted_rectangle> list;
2529 std::uint32_t listSize{};
2530
2531 auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_Weighted_ROI_Get(m_handle, nullptr, &listSize);
2532 if (ret != PEAK_AFL_STATUS_SUCCESS)
2533 {
2534 throw error::Exception(ret);
2535 }
2536
2537 list.resize(listSize);
2538
2539 ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_Weighted_ROI_Get(m_handle, list.data(), &listSize);
2540 if (ret != PEAK_AFL_STATUS_SUCCESS)
2541 {
2542 throw error::Exception(ret);
2543 }
2544
2545 return list;
2546}
2547
2549{
2550 peak_afl_BOOL8 supported{};
2551 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_Limit_IsSupported(m_handle, &supported);
2552 if (ret != PEAK_AFL_STATUS_SUCCESS)
2553 {
2554 throw error::Exception(ret);
2555 }
2556
2557 return supported;
2558}
2559
2561{
2562 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_Limit_Set(m_handle, limit);
2563 if (ret != PEAK_AFL_STATUS_SUCCESS)
2564 {
2565 throw error::Exception(ret);
2566 }
2567}
2568
2570{
2572 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_Limit_Get(m_handle, &limit);
2573 if (ret != PEAK_AFL_STATUS_SUCCESS)
2574 {
2575 throw error::Exception(ret);
2576 }
2577 return limit;
2578}
2579
2581{
2583 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_Limit_Default(m_handle, &limit);
2584 if (ret != PEAK_AFL_STATUS_SUCCESS)
2585 {
2586 throw error::Exception(ret);
2587 }
2588 return limit;
2589}
2590
2592{
2593 peak_afl_BOOL8 supported{};
2594 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_Hysteresis_IsSupported(m_handle, &supported);
2595 if (ret != PEAK_AFL_STATUS_SUCCESS)
2596 {
2597 throw error::Exception(ret);
2598 }
2599
2600 return supported;
2601}
2602
2603inline void Controller::SetHysteresis(std::uint8_t hysteresis)
2604{
2605 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_Hysteresis_Set(m_handle, hysteresis);
2606 if (ret != PEAK_AFL_STATUS_SUCCESS)
2607 {
2608 throw error::Exception(ret);
2609 }
2610}
2611
2612inline std::uint8_t Controller::GetHysteresis() const
2613{
2614 std::uint8_t hysteresis{};
2615 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_Hysteresis_Get(m_handle, &hysteresis);
2616 if (ret != PEAK_AFL_STATUS_SUCCESS)
2617 {
2618 throw error::Exception(ret);
2619 }
2620
2621 return hysteresis;
2622}
2623
2624inline std::uint8_t Controller::GetDefaultHysteresis() const
2625{
2626 std::uint8_t hysteresis{};
2627 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_Hysteresis_Default(m_handle, &hysteresis);
2628 if (ret != PEAK_AFL_STATUS_SUCCESS)
2629 {
2630 throw error::Exception(ret);
2631 }
2632
2633 return hysteresis;
2634}
2635
2637{
2638 Range<std::uint8_t> hysteresis{};
2639 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_Hysteresis_GetRange(
2640 m_handle, &hysteresis.min, &hysteresis.max, &hysteresis.inc);
2641 if (ret != PEAK_AFL_STATUS_SUCCESS)
2642 {
2643 throw error::Exception(ret);
2644 }
2645
2646 return hysteresis;
2647}
2648
2649PEAK_AFL_NO_DISCARD inline bool Controller::IsBrightnessComponentModeSupported() const
2650{
2651 peak_afl_BOOL8 supported{};
2652 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_BrightnessComponent_Mode_IsSupported(m_handle, &supported);
2653 if (ret != PEAK_AFL_STATUS_SUCCESS)
2654 {
2655 throw error::Exception(ret);
2656 }
2657
2658 return supported;
2659}
2660
2662{
2663 peak_afl_BOOL8 supported{};
2664 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_BrightnessComponent_Unit_IsSupported(m_handle, component, &supported);
2665 if (ret != PEAK_AFL_STATUS_SUCCESS)
2666 {
2667 throw error::Exception(ret);
2668 }
2669
2670 return supported;
2671}
2672
2675{
2676 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_BrightnessComponent_Mode_Set(m_handle, component, mode);
2677 if (ret != PEAK_AFL_STATUS_SUCCESS)
2678 {
2679 throw error::Exception(ret);
2680 }
2681}
2682
2685{
2687 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_BrightnessComponent_Mode_Get(m_handle, component, &mode);
2688 if (ret != PEAK_AFL_STATUS_SUCCESS)
2689 {
2690 throw error::Exception(ret);
2691 }
2692 return mode;
2693}
2694
2697{
2699 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_BrightnessComponent_Status(m_handle, component, &status);
2700 if (ret != PEAK_AFL_STATUS_SUCCESS)
2701 {
2702 throw error::Exception(ret);
2703 }
2704 return status;
2705}
2706
2708{
2709 peak_afl_BOOL8 supported{};
2710 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_GainLimit_IsSupported(m_handle, &supported);
2711 if (ret != PEAK_AFL_STATUS_SUCCESS)
2712 {
2713 throw error::Exception(ret);
2714 }
2715
2716 return supported;
2717}
2718
2720{
2721 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_GainLimit_Set(m_handle, limit);
2722 if (ret == PEAK_AFL_STATUS_VALUE_ADJUSTED)
2723 {
2724 // Do nothing. Not an error.
2725 }
2726 else if (ret != PEAK_AFL_STATUS_SUCCESS)
2727 {
2728 throw error::Exception(ret);
2729 }
2730}
2731
2733{
2734 peak_afl_double_limit limit{};
2735 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_GainLimit_Get(m_handle, &limit);
2736 if (ret != PEAK_AFL_STATUS_SUCCESS)
2737 {
2738 throw error::Exception(ret);
2739 }
2740
2741 return limit;
2742}
2743
2745{
2746 peak_afl_double_limit limit{};
2747 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_GainLimit_GetRange(m_handle, &limit);
2748 if (ret != PEAK_AFL_STATUS_SUCCESS)
2749 {
2750 throw error::Exception(ret);
2751 }
2752
2753 return limit;
2754}
2755
2757{
2758 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_GainAnalogLimit_Set(m_handle, limit);
2759 if (ret == PEAK_AFL_STATUS_VALUE_ADJUSTED)
2760 {
2761 // Do nothing. Not an error.
2762 }
2763 else if (ret != PEAK_AFL_STATUS_SUCCESS)
2764 {
2765 throw error::Exception(ret);
2766 }
2767}
2768
2770{
2771 peak_afl_double_limit limit{};
2772 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_GainAnalogLimit_Get(m_handle, &limit);
2773 if (ret != PEAK_AFL_STATUS_SUCCESS)
2774 {
2775 throw error::Exception(ret);
2776 }
2777
2778 return limit;
2779}
2780
2782{
2783 peak_afl_double_limit limit{};
2784 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_GainAnalogLimit_GetRange(m_handle, &limit);
2785 if (ret != PEAK_AFL_STATUS_SUCCESS)
2786 {
2787 throw error::Exception(ret);
2788 }
2789
2790 return limit;
2791}
2792
2794{
2795 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_GainDigitalLimit_Set(m_handle, limit);
2796 if (ret == PEAK_AFL_STATUS_VALUE_ADJUSTED)
2797 {
2798 // Do nothing. Not an error.
2799 }
2800 else if (ret != PEAK_AFL_STATUS_SUCCESS)
2801 {
2802 throw error::Exception(ret);
2803 }
2804}
2805
2807{
2808 peak_afl_double_limit limit{};
2809 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_GainDigitalLimit_Get(m_handle, &limit);
2810 if (ret != PEAK_AFL_STATUS_SUCCESS)
2811 {
2812 throw error::Exception(ret);
2813 }
2814
2815 return limit;
2816}
2817
2819{
2820 peak_afl_double_limit limit{};
2821 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_GainDigitalLimit_GetRange(m_handle, &limit);
2822 if (ret != PEAK_AFL_STATUS_SUCCESS)
2823 {
2824 throw error::Exception(ret);
2825 }
2826
2827 return limit;
2828}
2829
2831{
2832 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_GainCombinedLimit_Set(m_handle, limit);
2833 if (ret == PEAK_AFL_STATUS_VALUE_ADJUSTED)
2834 {
2835 // Do nothing. Not an error.
2836 }
2837 else if (ret != PEAK_AFL_STATUS_SUCCESS)
2838 {
2839 throw error::Exception(ret);
2840 }
2841}
2842
2844{
2845 peak_afl_double_limit limit{};
2846 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_GainCombinedLimit_Get(m_handle, &limit);
2847 if (ret != PEAK_AFL_STATUS_SUCCESS)
2848 {
2849 throw error::Exception(ret);
2850 }
2851
2852 return limit;
2853}
2854
2856{
2857 peak_afl_double_limit limit{};
2858 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_GainCombinedLimit_GetRange(m_handle, &limit);
2859 if (ret != PEAK_AFL_STATUS_SUCCESS)
2860 {
2861 throw error::Exception(ret);
2862 }
2863
2864 return limit;
2865}
2866
2868{
2869 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_GainHostLimit_Set(m_handle, limit);
2870 if (ret == PEAK_AFL_STATUS_VALUE_ADJUSTED)
2871 {
2872 // Do nothing. Not an error.
2873 }
2874 else if (ret != PEAK_AFL_STATUS_SUCCESS)
2875 {
2876 throw error::Exception(ret);
2877 }
2878}
2879
2881{
2882 peak_afl_double_limit limit{};
2883 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_GainHostLimit_Get(m_handle, &limit);
2884 if (ret != PEAK_AFL_STATUS_SUCCESS)
2885 {
2886 throw error::Exception(ret);
2887 }
2888
2889 return limit;
2890}
2891
2893{
2894 peak_afl_double_limit limit{};
2895 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_GainHostLimit_GetRange(m_handle, &limit);
2896 if (ret != PEAK_AFL_STATUS_SUCCESS)
2897 {
2898 throw error::Exception(ret);
2899 }
2900
2901 return limit;
2902}
2903
2905{
2906 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_ExposureLimit_Set(m_handle, limit);
2907 if (ret != PEAK_AFL_STATUS_SUCCESS)
2908 {
2909 throw error::Exception(ret);
2910 }
2911}
2912
2914{
2915 peak_afl_double_limit limit{};
2916 const auto ret = PEAK_AFL_C_ABI_PREFIX peak_afl_AutoController_ExposureLimit_Get(m_handle, &limit);
2917 if (ret != PEAK_AFL_STATUS_SUCCESS)
2918 {
2919 throw error::Exception(ret);
2920 }
2921
2922 return limit;
2923}
2924
2925} /* namespace afl */
2926} /* namespace peak */
Definition peak_afl.hpp:525
PEAK_AFL_NO_DISCARD peak_afl_controllerType Type() const
Get the controller type.
Definition peak_afl.hpp:2268
void SetROIPreset(peak_afl_roi_preset preset)
Set the autofeature region of interest preset for a controller.
Definition peak_afl.hpp:2032
void SetBrightnessAlgorithm(peak_afl_controller_brightness_algorithm algorithm)
Set the autofeature brightness algorithm for a controller.
Definition peak_afl.hpp:2085
PEAK_AFL_NO_DISCARD bool IsAutoPercentileSupported() const
check if auto percentile is supported for a controller.
Definition peak_afl.hpp:2225
PEAK_AFL_NO_DISCARD bool IsAutoToleranceSupported() const
check if auto tolerance is supported for a controller.
Definition peak_afl.hpp:2182
peak_afl_double_limit GetGainLimit() const
Get autofeature gain limit for a controller.
Definition peak_afl.hpp:2732
void SetGainLimit(peak_afl_double_limit limit)
Set the gain limit for a controller.
Definition peak_afl.hpp:2719
PEAK_AFL_NO_DISCARD std::uint8_t GetDefaultHysteresis() const
Get the autofeature hysteresis default.
Definition peak_afl.hpp:2624
PEAK_AFL_NO_DISCARD std::uint8_t GetHysteresis() const
Get the autofeature hysteresis for a controller.
Definition peak_afl.hpp:2612
void SetGainCombinedLimit(peak_afl_double_limit limit)
Set the combined gain limit for a controller.
Definition peak_afl.hpp:2830
void SetMode(peak_afl_controller_automode mode)
Set the autofeature mode for a controller.
Definition peak_afl.hpp:2053
PEAK_AFL_NO_DISCARD bool IsROISupported() const
Check if setting a region of interest is supported for a controller.
Definition peak_afl.hpp:1988
void SetGainHostLimit(peak_afl_double_limit limit)
Set the host gain limit for a controller.
Definition peak_afl.hpp:2867
void SetWeightedROIs(const std::vector< peak_afl_weighted_rectangle > &list)
Set the autofeature weighted region of interest for a controller.
Definition peak_afl.hpp:2497
void UnRegisterFinishedCallback()
Reset the finished callback for a controller.
Definition peak_afl.hpp:2399
peak_afl_double_limit GetGainDigitalLimit() const
Get autofeature digital gain limit for a controller.
Definition peak_afl.hpp:2806
PEAK_AFL_NO_DISCARD Range< std::uint32_t > GetSkipFramesRange() const
Get range for frames skipped for a controller.
Definition peak_afl.hpp:1976
PEAK_AFL_NO_DISCARD bool IsROIPresetSupported() const
Check if ROI preset is supported for a controller.
Definition peak_afl.hpp:2020
void BrightnessComponentSetMode(peak_afl_controller_brightness_component component, peak_afl_controller_automode mode)
Set the autofeature mode for a brightness controller component.
Definition peak_afl.hpp:2673
PEAK_AFL_NO_DISCARD std::uint8_t GetLastAutoAverage() const
Get the last auto average for a controller.
Definition peak_afl.hpp:2117
PEAK_AFL_NO_DISCARD peak_afl_controller_limit GetLimit() const
Get the autofeature limit for a controller.
Definition peak_afl.hpp:2569
void SetHysteresis(std::uint8_t hysteresis)
Set the autofeature hysteresis for a controller.
Definition peak_afl.hpp:2603
void SetExposureLimit(peak_afl_double_limit limit)
Set the exposure limit for a controller.
Definition peak_afl.hpp:2904
void SetSkipFrames(std::uint32_t count)
Set number of frames skipped for a controller.
Definition peak_afl.hpp:1955
PEAK_AFL_NO_DISCARD std::vector< peak_afl_controller_sharpness_algorithm > GetSharpnessAlgorithmList() const
Get the list of supported sharpness algorithms for a controller.
Definition peak_afl.hpp:2367
PEAK_AFL_NO_DISCARD peak_afl_controller_automode BrightnessComponentGetMode(peak_afl_controller_brightness_component component) const
Get the current autofeature mode for a brightness controller component.
Definition peak_afl.hpp:2683
PEAK_AFL_NO_DISCARD bool IsModeSupported() const
Check if auto mode is supported for a controller.
Definition peak_afl.hpp:2041
PEAK_AFL_NO_DISCARD Range< std::uint32_t > GetAutoToleranceRange() const
Get the auto tolerance range for a controller.
Definition peak_afl.hpp:2214
void SetGainAnalogLimit(peak_afl_double_limit limit)
Set the analog gain limit for a controller.
Definition peak_afl.hpp:2756
void SetAutoPercentile(double percentile)
Set the auto percentile for a controller.
Definition peak_afl.hpp:2237
void UnRegisterProcessingCallback()
Reset the data callback for a controller.
Definition peak_afl.hpp:2475
PEAK_AFL_NO_DISCARD peak_afl_rectangle GetROI() const
Get the autofeature region of interest for a controller.
Definition peak_afl.hpp:2009
peak_afl_double_limit GetExposureLimit() const
Get autofeature exposure limit for a controller.
Definition peak_afl.hpp:2913
void UnRegisterDataProcessingCallback()
Reset the data callback for a controller.
Definition peak_afl.hpp:2480
peak_afl_double_limit GetGainCombinedLimitRange() const
Get autofeature combined gain limit range for a controller.
Definition peak_afl.hpp:2855
PEAK_AFL_NO_DISCARD std::vector< peak_afl_controller_algorithm > GetAlgorithmList() const
Get the list of supported algorithms for a controller.
Definition peak_afl.hpp:2312
~Controller()
Definition peak_afl.hpp:1934
void RegisterDataProcessingCallback(const callback::DataProcessingCallback &callback)
Set the data callback for a controller.
Definition peak_afl.hpp:2455
PEAK_AFL_NO_DISCARD bool IsSharpnessAlgorithmSupported() const
check setting a sharpness algorithm is supported by a controller.
Definition peak_afl.hpp:2334
PEAK_AFL_NO_DISCARD peak_afl_controller_status BrightnessComponentStatus(peak_afl_controller_brightness_component component) const
Get the status for a brightness controller component.
Definition peak_afl.hpp:2695
void UnRegisterComponentCallback(peak_afl_controller_brightness_component component)
Reset the component callback for a controller.
Definition peak_afl.hpp:2439
PEAK_AFL_NO_DISCARD std::tuple< std::uint8_t, std::uint8_t, std::uint8_t > GetLastAutoAverages() const
Get the last auto average for a controller.
Definition peak_afl.hpp:2128
PEAK_AFL_NO_DISCARD std::uint32_t GetAutoTolerance() const
Get the current auto tolerance for a controller.
Definition peak_afl.hpp:2203
void SetAlgorithm(peak_afl_controller_algorithm algorithm)
Set the used algorithm for a controller.
Definition peak_afl.hpp:2291
peak_afl_double_limit GetGainDigitalLimitRange() const
Get autofeature digital gain limit range for a controller.
Definition peak_afl.hpp:2818
void SetROI(peak_afl_rectangle rect)
Set the autofeature region of interest for a controller.
Definition peak_afl.hpp:2000
peak_afl_double_limit GetGainAnalogLimitRange() const
Get autofeature analog gain limit range for a controller.
Definition peak_afl.hpp:2781
PEAK_AFL_NO_DISCARD bool IsSkipFramesSupported() const
Check if skip frames is supported for a controller.
Definition peak_afl.hpp:1943
PEAK_AFL_NO_DISCARD peak_afl_controller_limit GetDefaultLimit() const
Get the autofeature default limit.
Definition peak_afl.hpp:2580
PEAK_AFL_NO_DISCARD bool IsLimitSupported() const
Check if limit is supported for a controller.
Definition peak_afl.hpp:2548
PEAK_AFL_NO_DISCARD peak_afl_size GetWeightedROIMinSize() const
Get the autofeature minimum size of weighted region of interest for a controller.
Definition peak_afl.hpp:2515
PEAK_AFL_NO_DISCARD peak_afl_controller_automode GetMode() const
Get the current autofeature mode for a controller.
Definition peak_afl.hpp:2062
static PEAK_AFL_NO_DISCARD std::shared_ptr< Controller > Create(peak_afl_controllerType type)
Create a new controller.
Definition peak_afl.hpp:1922
void RegisterFinishedCallback(const callback::FinishedCallback &callback)
Set finished callback for a controller.
Definition peak_afl.hpp:2389
PEAK_AFL_NO_DISCARD peak_afl_controller_algorithm GetAlgorithm() const
Get the used algorithm for a controller.
Definition peak_afl.hpp:2300
PEAK_AFL_NO_DISCARD bool IsBrightnessAlgorithmSupported() const
Check if auto brightness algorithm is supported for a controller.
Definition peak_afl.hpp:2073
peak_afl_double_limit GetGainCombinedLimit() const
Get autofeature combined gain limit for a controller.
Definition peak_afl.hpp:2843
PEAK_AFL_NO_DISCARD bool IsGainLimitSupported() const
Check if auto gain limit is supported for a controller.
Definition peak_afl.hpp:2707
peak_afl_double_limit GetGainLimitRange() const
Get autofeature gain limit range for a controller.
Definition peak_afl.hpp:2744
void SetWeightedROI(const peak_afl_weighted_rectangle &rect)
Set single autofeature weighted region of interest for a controller.
Definition peak_afl.hpp:2506
PEAK_AFL_NO_DISCARD std::uint32_t GetSkipFrames() const
Get number of frames skipped for a controller.
Definition peak_afl.hpp:1964
PEAK_AFL_NO_DISCARD peak_afl_controller_sharpness_algorithm GetSharpnessAlgorithm() const
Get the used sharpness algorithm for a controller.
Definition peak_afl.hpp:2355
PEAK_AFL_NO_DISCARD peak_afl_controller_status Status() const
Get the status for a controller.
Definition peak_afl.hpp:2105
PEAK_AFL_NO_DISCARD bool IsBrightnessComponentUnitSupported(peak_afl_controller_brightness_component component) const
Check if a specific unit is supported for a brightness controller component.
Definition peak_afl.hpp:2661
void SetGainDigitalLimit(peak_afl_double_limit limit)
Set the digital gain limit for a controller.
Definition peak_afl.hpp:2793
PEAK_AFL_NO_DISCARD bool IsAlgorithmSupported() const
check if setting an algorithm is supported for a controller.
Definition peak_afl.hpp:2279
PEAK_AFL_NO_DISCARD Range< double > GetAutoPercentileRange() const
Get the auto percentile range for a controller.
Definition peak_afl.hpp:2257
PEAK_AFL_NO_DISCARD double GetAutoPercentile() const
Get the auto percentile for a controller.
Definition peak_afl.hpp:2246
PEAK_AFL_NO_DISCARD peak_afl_controller_brightness_algorithm GetBrightnessAlgorithm() const
Get the current autofeature brightness algorithm for a controller.
Definition peak_afl.hpp:2094
peak_afl_double_limit GetGainAnalogLimit() const
Get autofeature analog gain limit for a controller.
Definition peak_afl.hpp:2769
void SetAutoTarget(uint32_t target)
Set the auto target for a controller.
Definition peak_afl.hpp:2151
PEAK_AFL_NO_DISCARD bool IsBrightnessComponentModeSupported() const
Check if auto mode is supported for a brightness controller component.
Definition peak_afl.hpp:2649
peak_afl_double_limit GetGainHostLimit() const
Get autofeature host gain limit for a controller.
Definition peak_afl.hpp:2880
void SetAutoTolerance(std::uint32_t tolerance)
Set the auto tolerance for a controller.
Definition peak_afl.hpp:2194
PEAK_AFL_NO_DISCARD std::uint32_t GetAutoTarget() const
Get the currently set auto target for a controller.
Definition peak_afl.hpp:2160
PEAK_AFL_NO_DISCARD Range< std::uint32_t > GetAutoTargetRange() const
Get the auto target range for a controller.
Definition peak_afl.hpp:2171
PEAK_AFL_NO_DISCARD Range< std::uint8_t > GetHysteresisRange() const
Get autofeature hysteresis range for a controller.
Definition peak_afl.hpp:2636
void SetLimit(peak_afl_controller_limit limit)
Set the autofeature limit for a controller.
Definition peak_afl.hpp:2560
PEAK_AFL_NO_DISCARD bool IsWeightedROISupported() const
Check if weighted region of interest is supported for a controller.
Definition peak_afl.hpp:2485
PEAK_AFL_NO_DISCARD bool IsHysteresisSupported() const
Check if hysteresis is supported for a controller.
Definition peak_afl.hpp:2591
void RegisterComponentCallback(peak_afl_controller_brightness_component component, const callback::FinishedCallback &callback)
Set component callback for a controller.
Definition peak_afl.hpp:2404
void SetSharpnessAlgorithm(peak_afl_controller_sharpness_algorithm algorithm)
Set the used sharpness algorithm for a controller.
Definition peak_afl.hpp:2346
void RegisterProcessingCallback(const callback::ProcessingCallback &callback)
Set the data callback for a controller.
Definition peak_afl.hpp:2465
peak_afl_double_limit GetGainHostLimitRange() const
Get autofeature host gain limit range for a controller.
Definition peak_afl.hpp:2892
PEAK_AFL_NO_DISCARD bool IsAutoTargetSupported() const
check if auto target is supported for a controller.
Definition peak_afl.hpp:2139
PEAK_AFL_NO_DISCARD std::vector< peak_afl_weighted_rectangle > GetWeightedROIs() const
Get the autofeature weighted region of interest for a controller.
Definition peak_afl.hpp:2526
Definition peak_afl.hpp:304
Manager(const std::shared_ptr< peak::core::NodeMap > &node_map)
Create an automanager instance.
Definition peak_afl.hpp:1713
void RemoveController(const std::shared_ptr< Controller > &controller)
Remove a controller from an automanager.
Definition peak_afl.hpp:1787
PEAK_AFL_NO_DISCARD std::shared_ptr< Controller > GetController(peak_afl_controllerType type) const
Get the controller for a type.
Definition peak_afl.hpp:1904
void DestroyAllController()
Destroy all controllers for a manager.
Definition peak_afl.hpp:1830
void DestroyController(const std::shared_ptr< Controller > &controller)
Destroy a controller.
Definition peak_afl.hpp:1848
PEAK_AFL_NO_DISCARD std::shared_ptr< Controller > CreateController(peak_afl_controllerType type)
Create a controller and append it to Manager.
Definition peak_afl.hpp:1813
PEAK_AFL_NO_DISCARD size_t ControllerCount() const
Get the list count of the controller associated with the manager.
Definition peak_afl.hpp:1899
PEAK_AFL_NO_DISCARD bool Status() const
Get the status of a manager.
Definition peak_afl.hpp:1876
~Manager()
Destructor of an automanager instance.
Definition peak_afl.hpp:1727
void SetGainIPL(const peak::ipl::Gain &gain)
Sets the ipl gain.
Definition peak_afl.hpp:1867
PEAK_AFL_NO_DISCARD std::vector< std::shared_ptr< Controller > > ControllerList() const
Get the list of the controller associated with the manager.
Definition peak_afl.hpp:1888
void AddController(const std::shared_ptr< Controller > &controller)
Add a controller to an automanager.
Definition peak_afl.hpp:1765
void Process(const peak::ipl::Image &image) const
Process an image.
Definition peak_afl.hpp:1804
Definition peak_afl.hpp:201
PEAK_AFL_NO_DISCARD const char * what() const noexcept override
Get the string representation for the exception.
Definition peak_afl.hpp:231
static PEAK_AFL_NO_DISCARD std::string translateCode(peak_afl_status status)
Get a string representation for an error code.
Definition peak_afl.hpp:252
PEAK_AFL_NO_DISCARD peak_afl_status code() const
Get the return code for the failure.
Definition peak_afl.hpp:219
PEAK_AFL_API_STATUS peak_afl_AutoController_AutoPercentile_GetRange(peak_afl_controller_handle controller, double *min, double *max, double *inc)
Get the auto percentile range for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_AutoPercentile_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
check if auto percentile is supported for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_AutoPercentile_Set(peak_afl_controller_handle controller, double percentile)
Set the auto percentile for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_AutoPercentile_Get(peak_afl_controller_handle controller, double *percentile)
Get the auto percentile for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_AutoTarget_GetRange(peak_afl_controller_handle controller, uint32_t *min, uint32_t *max, uint32_t *inc)
Get the auto target range for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_AutoTarget_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
check if auto target is supported for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_AutoTarget_Get(peak_afl_controller_handle controller, uint32_t *target)
Get the currently set auto target for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_AutoTarget_Set(peak_afl_controller_handle controller, uint32_t target)
Set the auto target for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_AutoTolerance_Set(peak_afl_controller_handle controller, uint32_t tolerance)
Set the auto tolerance for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_AutoTolerance_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
check if auto tolerance is supported for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_AutoTolerance_GetRange(peak_afl_controller_handle controller, uint32_t *min, uint32_t *max, uint32_t *inc)
Get the auto tolerance range for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_AutoTolerance_Get(peak_afl_controller_handle controller, uint32_t *tolerance)
Get the current auto tolerance for a controller.
peak_afl_controllerType
controller types
Definition peak_afl.h:124
PEAK_AFL_API_STATUS peak_afl_AutoController_Status(peak_afl_controller_handle controller, peak_afl_controller_status *status)
Get the status for a controller.
peak_afl_controller_status
controller status
Definition peak_afl.h:159
PEAK_AFL_API_STATUS peak_afl_AutoController_Create(peak_afl_controller_handle *controller, peak_afl_controllerType controllerType)
Create a new controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_Type_Get(peak_afl_controller_handle controller, peak_afl_controllerType *type)
Get the controller type.
PEAK_AFL_API_STATUS peak_afl_AutoController_Destroy(peak_afl_controller_handle controller)
Destroy a controller. Will fail if it is queued inside a manager.
PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_Create(peak_afl_manager_handle *handle, PEAK_NODE_MAP_HANDLE nodeMapHandle)
Create an automanager instance.
PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_CreateController(peak_afl_manager_handle handle, peak_afl_controller_handle *controller, peak_afl_controllerType controllerType)
Create a controller and append it to Manager.
PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_Process(peak_afl_manager_handle handle, PEAK_IPL_IMAGE_HANDLE imageHandle)
Process an image.
PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_DestroyController(peak_afl_manager_handle handle, peak_afl_controller_handle controller)
Destroy a controller.
PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_Status(peak_afl_manager_handle handle, peak_afl_BOOL8 *running)
Get the status of a manager.
PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_Destroy(peak_afl_manager_handle handle)
Destroy an automanager instance.
PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_DestroyAllController(peak_afl_manager_handle handle)
Destroy all controllers for a manager.
PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_AddController(peak_afl_manager_handle handle, peak_afl_manager_handle controller)
Add a controller to an auto manager instance.
PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_RemoveController(peak_afl_manager_handle handle, peak_afl_manager_handle controller)
Remove a controller to an automanager instance.
PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_SetGainIPL(peak_afl_manager_handle handle, PEAK_IPL_GAIN_HANDLE gainHandle)
Set the IPL Gain.
PEAK_AFL_API_STATUS peak_afl_AutoController_BrightnessAlgorithm_Set(peak_afl_controller_handle controller, peak_afl_controller_brightness_algorithm algorithm)
Set the brightness algorithm for a controller.
peak_afl_controller_brightness_algorithm
brightness calculation algorithm
Definition peak_afl.h:212
PEAK_AFL_API_STATUS peak_afl_AutoController_BrightnessAlgorithm_Get(peak_afl_controller_handle controller, peak_afl_controller_brightness_algorithm *algorithm)
Get the current brightness algorithm for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_BrightnessAlgorithm_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
Check if brightness algorithm is supported for a controller component.
PEAK_AFL_API_STATUS peak_afl_AutoController_BrightnessComponent_Callback_Set(peak_afl_controller_handle controller, peak_afl_controller_brightness_component component, peak_afl_callback_type type, void *funcPtr, void *context)
Set a callback for a controller component.
PEAK_AFL_API_STATUS peak_afl_AutoController_BrightnessComponent_Status(peak_afl_controller_handle controller, peak_afl_controller_brightness_component component, peak_afl_controller_status *status)
Get the status for a controller component.
peak_afl_controller_brightness_component
controller brightness component
Definition peak_afl.h:247
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)
Check if a specific unit is supported for a brightness controller.
@ PEAK_AFL_CONTROLLER_BRIGHTNESS_COMPONENT_GAIN
gain
Definition peak_afl.h:255
@ PEAK_AFL_CONTROLLER_BRIGHTNESS_COMPONENT_EXPOSURE
exposure
Definition peak_afl.h:252
PEAK_AFL_API_STATUS peak_afl_AutoController_BrightnessComponent_Mode_Get(peak_afl_controller_handle controller, peak_afl_controller_brightness_component component, peak_afl_controller_automode *mode)
Get the current brightness component mode for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_BrightnessComponent_Mode_Set(peak_afl_controller_handle controller, peak_afl_controller_brightness_component component, peak_afl_controller_automode mode)
Set the autofeature mode for a brightness component.
PEAK_AFL_API_STATUS peak_afl_AutoController_BrightnessComponent_Mode_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
Check if brightness component mode is supported for a controller component.
PEAK_AFL_API_STATUS peak_afl_AutoController_GetLastAutoAverage(peak_afl_controller_handle controller, uint8_t *average)
Get the last auto average for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_Callback_Set(peak_afl_controller_handle controller, peak_afl_callback_type type, void *funcPtr, void *context)
Set a callback for a controller.
@ PEAK_AFL_CONTROLLER_CALLBACK_FINISHED
Controller callback type finished.
Definition peak_afl.h:294
@ PEAK_AFL_CONTROLLER_CALLBACK_PROCESSING_DATA
Controller callback type processing.
Definition peak_afl.h:300
@ PEAK_AFL_CONTROLLER_CALLBACK_PROCESSING
Controller callback type processing.
Definition peak_afl.h:303
void Exit()
Exit the peak_afl auto feature library.
Definition peak_afl.hpp:1667
void Init()
Init the peak_afl auto feature library.
Definition peak_afl.hpp:1657
PEAK_AFL_NO_DISCARD std::string GetLastError()
Get the last error message.
Definition peak_afl.hpp:1689
PEAK_AFL_NO_DISCARD Version_t Version()
Query the library version.
Definition peak_afl.hpp:1676
std::tuple< Manager, std::vector< std::shared_ptr< Controller > > > CreateManager(const std::shared_ptr< peak::core::NodeMap > &node_map, ControllerTypes... types)
Convenience function to create a manager with the supplied controllers.
Definition peak_afl.hpp:481
PEAK_AFL_API_STATUS peak_afl_AutoController_ExposureLimit_Set(peak_afl_controller_handle controller, peak_afl_double_limit limit)
Set autofeature exposure limit for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_ExposureLimit_Get(peak_afl_controller_handle controller, peak_afl_double_limit *limit)
Get autofeature exposure limit for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_Algorithm_Get(peak_afl_controller_handle controller, peak_afl_controller_algorithm *algorithm)
Get the used algorithm for a controller.
peak_afl_controller_algorithm
controller algorithm
Definition peak_afl.h:190
PEAK_AFL_API_STATUS peak_afl_AutoController_Algorithm_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
check if setting an algorithm is supported for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_Algorithm_GetList(peak_afl_controller_handle controller, peak_afl_controller_algorithm *typeList, uint32_t *listSize)
Get the list of supported algorithms for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_Algorithm_Set(peak_afl_controller_handle controller, peak_afl_controller_algorithm algorithm)
Set the used algorithm for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_Limit_Default(peak_afl_controller_handle controller, peak_afl_controller_limit *limit)
Get the autofeature default limit.
PEAK_AFL_API_STATUS peak_afl_AutoController_Limit_Get(peak_afl_controller_handle controller, peak_afl_controller_limit *limit)
Get the autofeature limit for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_Limit_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
Check if limit is supported for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_Limit_Set(peak_afl_controller_handle controller, peak_afl_controller_limit limit)
Set the autofeature limit for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_GainAnalogLimit_Get(peak_afl_controller_handle controller, peak_afl_double_limit *limit)
Get autofeature analog gain limit for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_GainAnalogLimit_GetRange(peak_afl_controller_handle controller, peak_afl_double_limit *limit)
Get autofeature analog gain limit range for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_GainAnalogLimit_Set(peak_afl_controller_handle controller, peak_afl_double_limit limit)
Set autofeature analog gain limit for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_GainCombinedLimit_Set(peak_afl_controller_handle controller, peak_afl_double_limit limit)
Set autofeature combined gain limit for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_GainCombinedLimit_GetRange(peak_afl_controller_handle controller, peak_afl_double_limit *limit)
Get autofeature combined gain limit range for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_GainCombinedLimit_Get(peak_afl_controller_handle controller, peak_afl_double_limit *limit)
Get autofeature combined gain limit for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_GainDigitalLimit_GetRange(peak_afl_controller_handle controller, peak_afl_double_limit *limit)
Get autofeature digital gain limit range for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_GainDigitalLimit_Get(peak_afl_controller_handle controller, peak_afl_double_limit *limit)
Get autofeature digital gain limit for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_GainDigitalLimit_Set(peak_afl_controller_handle controller, peak_afl_double_limit limit)
Set autofeature digital gain limit for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_GainHostLimit_Get(peak_afl_controller_handle controller, peak_afl_double_limit *limit)
Get autofeature host gain limit for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_GainHostLimit_Set(peak_afl_controller_handle controller, peak_afl_double_limit limit)
Set autofeature host gain limit for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_GainHostLimit_GetRange(peak_afl_controller_handle controller, peak_afl_double_limit *limit)
Get autofeature host gain limit range for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_GainLimit_Set(peak_afl_controller_handle controller, peak_afl_double_limit limit)
Set autofeature gain limit for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_GainLimit_GetRange(peak_afl_controller_handle controller, peak_afl_double_limit *limit)
Get autofeature gain limit range for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_GainLimit_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
Check if gain limit is supported for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_GainLimit_Get(peak_afl_controller_handle controller, peak_afl_double_limit *limit)
Get autofeature gain limit for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_Hysteresis_Default(peak_afl_controller_handle controller, uint8_t *hysteresis)
Get the autofeature hysteresis default.
PEAK_AFL_API_STATUS peak_afl_AutoController_Hysteresis_Set(peak_afl_controller_handle controller, uint8_t hysteresis)
Set the autofeature hysteresis for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_Hysteresis_Get(peak_afl_controller_handle controller, uint8_t *hysteresis)
Get the autofeature hysteresis for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_Hysteresis_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
Check if hysteresis is supported for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_Hysteresis_GetRange(peak_afl_controller_handle controller, uint8_t *min, uint8_t *max, uint8_t *inc)
Get autofeature hysteresis range for a controller.
PEAK_AFL_API_STATUS peak_afl_Init(void)
Init the peak_afl auto feature library.
PEAK_AFL_API_STATUS peak_afl_Exit(void)
Exit the peak_afl auto feature library.
PEAK_AFL_API_STATUS peak_afl_GetVersion(uint32_t *majorVersion, uint32_t *minorVersion, uint32_t *subminorVersion, uint32_t *patchVersion)
Query the library version.
PEAK_AFL_API_STATUS peak_afl_GetLastError(peak_afl_status *lastErrorCode, char *lastErrorMessage, size_t *lastErrorMessageSize)
Get the last error message.
PEAK_AFL_API_STATUS peak_afl_AutoController_Mode_Get(peak_afl_controller_handle controller, peak_afl_controller_automode *mode)
Get the current autofeature mode for a controller.
peak_afl_controller_automode
controller automode
Definition peak_afl.h:143
PEAK_AFL_API_STATUS peak_afl_AutoController_Mode_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
Check if auto mode is supported for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_Mode_Set(peak_afl_controller_handle controller, peak_afl_controller_automode mode)
Set the autofeature mode for a controller.
peak_afl_roi_preset
controller roi preset
Definition peak_afl.h:410
PEAK_AFL_API_STATUS peak_afl_AutoController_ROI_Preset_Set(peak_afl_controller_handle controller, peak_afl_roi_preset roiPreset)
Set the autofeature region of interest preset for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_ROI_Preset_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
Check if ROI preset is supported for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_ROI_Get(peak_afl_controller_handle controller, peak_afl_rectangle *roi)
Get the autofeature region of interest for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_ROI_Set(peak_afl_controller_handle controller, peak_afl_rectangle roi)
Set the autofeature region of interest for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_ROI_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
Check if setting a region of interest is supported for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_SharpnessAlgorithm_GetList(peak_afl_controller_handle controller, peak_afl_controller_sharpness_algorithm *typeList, uint32_t *listSize)
Get the list of supported sharpness algorithms for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_SharpnessAlgorithm_Set(peak_afl_controller_handle controller, peak_afl_controller_sharpness_algorithm algorithm)
Set the used sharpness algorithm for a controller.
peak_afl_controller_sharpness_algorithm
controller sharpness algorithm (focus)
Definition peak_afl.h:225
PEAK_AFL_API_STATUS peak_afl_AutoController_SharpnessAlgorithm_Get(peak_afl_controller_handle controller, peak_afl_controller_sharpness_algorithm *algorithm)
Get the used sharpness algorithm for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_SharpnessAlgorithm_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
check setting a sharpness algorithm is supported by a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_SkipFrames_GetRange(peak_afl_controller_handle controller, uint32_t *min, uint32_t *max, uint32_t *inc)
Get range for frames skipped for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_SkipFrames_Set(peak_afl_controller_handle controller, uint32_t count)
Set number of frames skipped for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_SkipFrames_Get(peak_afl_controller_handle controller, uint32_t *count)
Get number of frames skipped for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_SkipFrames_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
Check if skip frames is supported for a controller.
peak_afl_status
peak_afl Status codes
Definition peak_afl.h:87
@ PEAK_AFL_STATUS_SUCCESS
Success.
Definition peak_afl.h:89
@ PEAK_AFL_STATUS_INVALID_IMAGE_FORMAT
Invalid image format.
Definition peak_afl.h:110
@ PEAK_AFL_STATUS_ACCESS_DENIED
Access Denied.
Definition peak_afl.h:101
@ PEAK_AFL_STATUS_BUSY
Busy.
Definition peak_afl.h:104
@ PEAK_AFL_STATUS_NOT_SUPPORTED
Not supported.
Definition peak_afl.h:113
@ PEAK_AFL_STATUS_INVALID_PARAMETER
Invalid Parameter.
Definition peak_afl.h:98
@ PEAK_AFL_STATUS_BUFFER_TOO_SMALL
Buffer too small.
Definition peak_afl.h:107
@ PEAK_AFL_STATUS_NOT_INITIALIZED
Library not initialized.
Definition peak_afl.h:95
@ PEAK_AFL_STATUS_ERROR
Error.
Definition peak_afl.h:92
PEAK_AFL_API_STATUS peak_afl_AutoController_Weighted_ROI_Set(peak_afl_controller_handle controller, const peak_afl_weighted_rectangle *weightedRoiList, uint32_t listSize)
Set the autofeature weighted region of interest for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_Weighted_ROI_Get(peak_afl_controller_handle controller, peak_afl_weighted_rectangle *weightedRoiList, uint32_t *listSize)
Get the autofeature weighted region of interest for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_Weighted_ROI_Min_Size(peak_afl_controller_handle controller, peak_afl_size *size)
Get the autofeature minimum size for the weighted region of interest for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_Weighted_ROI_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
Check if weighted region of interest is supported for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_GetLastAutoAverages(peak_afl_controller_handle controller, uint8_t *averageRed, uint8_t *averageGreen, uint8_t *averageBlue)
Get the last auto average for a controller.
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
Definition peak_afl.hpp:503
Definition peak_afl.hpp:75
PEAK_AFL_NO_DISCARD uint32_t Minor() const
Returns the minor part of the version which is the second part of the version scheme separated by dot...
Definition peak_afl.hpp:106
std::uint32_t minor
Major.
Definition peak_afl.hpp:77
std::uint32_t subminor
Minor.
Definition peak_afl.hpp:78
PEAK_AFL_NO_DISCARD std::string ToString() const
Patch.
Definition peak_afl.hpp:85
PEAK_AFL_NO_DISCARD uint32_t Subminor() const
Returns the subminor part of the version which is the third part of the version scheme separated by d...
Definition peak_afl.hpp:115
PEAK_AFL_NO_DISCARD uint32_t Major() const
Returns the major part of the version which is the first part of the version scheme separated by dots...
Definition peak_afl.hpp:96
std::uint32_t patch
Subminor.
Definition peak_afl.hpp:79
PEAK_AFL_NO_DISCARD uint32_t Patch() const
Returns the patch part of the version which is the fourth part of the version scheme separated by dot...
Definition peak_afl.hpp:125
peak_afl Focus Limit
Definition peak_afl.h:496
peak_afl Double Limit
Definition peak_afl.h:512
generic process data
Definition peak_afl.h:311
peak_afl Rectangle (2D)
Definition peak_afl.h:458
peak_afl Size (2D)
Definition peak_afl.h:424
peak_afl Focus Rectangle
Definition peak_afl.h:480