IDS peak AFL v2.0.0
Loading...
Searching...
No Matches
peak_afl_brightness_limit.hpp
Go to the documentation of this file.
1
10
11#pragma once
12
13#include <peak_afl/peak_afl.hpp>
15
18
19#include <memory>
20
21namespace peak
22{
23namespace pipeline
24{
25namespace modules
26{
27namespace autofeature
28{
29namespace features
30{
58class BrightnessLimit : public IFeature<IntervalD>
59{
60public:
76 {
77 const auto interval = Get();
78 archive.SetDouble("Min", interval.GetMinimum());
79 archive.SetDouble("Max", interval.GetMaximum());
80 }
81
98 {
99 IntervalD interval{ archive.GetDouble("Min"), archive.GetDouble("Max") };
100 Set(interval);
101 }
102};
103
129{
130public:
143 explicit BrightnessExposureLimit(std::shared_ptr<peak::afl::Controller> controller)
144 : m_controller{ std::move(controller) }
145 {}
146
165 void Set(const IntervalD& value) override
166 {
167 m_controller->SetExposureLimit({ value.GetMinimum(), value.GetMaximum() });
168 }
169
186 {
187 const auto result = m_controller->GetExposureLimit();
188 return { result.min, result.max };
189 }
190
191private:
199 std::shared_ptr<peak::afl::Controller> m_controller;
200};
201
224{
225public:
237 explicit BrightnessGainLimit(std::shared_ptr<peak::afl::Controller> controller)
238 : m_controller{ std::move(controller) }
239 {}
240
248 void Set(const IntervalD& value) override
249 {
250 m_controller->SetGainLimit({ value.GetMinimum(), value.GetMaximum() });
251 }
252
261 {
262 const auto result = m_controller->GetGainLimit();
263 return { result.min, result.max };
264 }
265
266private:
267 std::shared_ptr<peak::afl::Controller> m_controller;
268};
269
291{
292public:
305 explicit BrightnessGainAnalogLimit(std::shared_ptr<peak::afl::Controller> controller)
306 : m_controller{ std::move(controller) }
307 {}
308
321 void Set(const IntervalD& value) override
322 {
323 m_controller->SetGainAnalogLimit({ value.GetMinimum(), value.GetMaximum() });
324 }
325
339 {
340 const auto result = m_controller->GetGainAnalogLimit();
341 return { result.min, result.max };
342 }
343
344private:
345 std::shared_ptr<peak::afl::Controller> m_controller;
346};
347
369{
370public:
383 explicit BrightnessGainDigitalLimit(std::shared_ptr<peak::afl::Controller> controller)
384 : m_controller{ std::move(controller) }
385 {}
386
399 void Set(const IntervalD& value) override
400 {
401 m_controller->SetGainDigitalLimit({ value.GetMinimum(), value.GetMaximum() });
402 }
403
417 {
418 const auto result = m_controller->GetGainDigitalLimit();
419 return { result.min, result.max };
420 }
421
422private:
423 std::shared_ptr<peak::afl::Controller> m_controller;
424};
425
448{
449public:
462 explicit BrightnessGainCombinedLimit(std::shared_ptr<peak::afl::Controller> controller)
463 : m_controller{ std::move(controller) }
464 {}
465
478 void Set(const IntervalD& value) override
479 {
480 m_controller->SetGainCombinedLimit({ value.GetMinimum(), value.GetMaximum() });
481 }
482
496 {
497 const auto result = m_controller->GetGainCombinedLimit();
498 return { result.min, result.max };
499 }
500
501private:
502 std::shared_ptr<peak::afl::Controller> m_controller;
503};
504
530{
531public:
544 explicit BrightnessGainHostLimit(std::shared_ptr<peak::afl::Controller> controller)
545 : m_controller{ std::move(controller) }
546 {}
547
560 void Set(const IntervalD& value) override
561 {
562 m_controller->SetGainHostLimit({ value.GetMinimum(), value.GetMaximum() });
563 }
564
578 {
579 const auto result = m_controller->GetGainHostLimit();
580 return { result.min, result.max };
581 }
582
583private:
584 std::shared_ptr<peak::afl::Controller> m_controller;
585};
586} // namespace features
587} // namespace autofeature
588} // namespace modules
589} // namespace pipeline
590} // namespace peak
Interface for a hierarchical key-value archive system.
Definition peak_common_iarchive.hpp:59
virtual double GetDouble(const std::string &key) const =0
Retrieves a double-precision number by key.
virtual void SetDouble(const std::string &key, double value)=0
Stores a double-precision floating point number.
BrightnessExposureLimit(std::shared_ptr< peak::afl::Controller > controller)
Constructs a BrightnessExposureLimit feature with the specified controller.
Definition peak_afl_brightness_limit.hpp:143
void Set(const IntervalD &value) override
Sets the exposure time limits.
Definition peak_afl_brightness_limit.hpp:165
IntervalD Get() const override
Gets the current exposure time limits.
Definition peak_afl_brightness_limit.hpp:185
void Set(const IntervalD &value) override
Sets the analog gain limits.
Definition peak_afl_brightness_limit.hpp:321
BrightnessGainAnalogLimit(std::shared_ptr< peak::afl::Controller > controller)
Constructs an analog gain limit feature with the specified controller.
Definition peak_afl_brightness_limit.hpp:305
IntervalD Get() const override
Gets the current analog gain limits.
Definition peak_afl_brightness_limit.hpp:338
BrightnessGainCombinedLimit(std::shared_ptr< peak::afl::Controller > controller)
Constructs a combined gain limit feature with the specified controller.
Definition peak_afl_brightness_limit.hpp:462
void Set(const IntervalD &value) override
Sets the combined gain limits.
Definition peak_afl_brightness_limit.hpp:478
IntervalD Get() const override
Gets the current combined gain limits.
Definition peak_afl_brightness_limit.hpp:495
BrightnessGainDigitalLimit(std::shared_ptr< peak::afl::Controller > controller)
Constructs a digital gain limit feature with the specified controller.
Definition peak_afl_brightness_limit.hpp:383
void Set(const IntervalD &value) override
Sets the digital gain limits.
Definition peak_afl_brightness_limit.hpp:399
IntervalD Get() const override
Gets the current digital gain limits.
Definition peak_afl_brightness_limit.hpp:416
void Set(const IntervalD &value) override
Sets the host gain limits.
Definition peak_afl_brightness_limit.hpp:560
IntervalD Get() const override
Gets the current host gain limits.
Definition peak_afl_brightness_limit.hpp:577
BrightnessGainHostLimit(std::shared_ptr< peak::afl::Controller > controller)
Constructs a host gain limit feature with the specified controller.
Definition peak_afl_brightness_limit.hpp:544
BrightnessGainLimit(std::shared_ptr< peak::afl::Controller > controller)
Constructs a BrightnessGainLimit feature with the specified controller.
Definition peak_afl_brightness_limit.hpp:237
void Set(const IntervalD &value) override
Sets the overall gain limits.
Definition peak_afl_brightness_limit.hpp:248
IntervalD Get() const override
Gets the current overall gain limits.
Definition peak_afl_brightness_limit.hpp:260
Base class for brightness limit features.
Definition peak_afl_brightness_limit.hpp:59
void Serialize(peak::common::serialization::IArchive &archive) const override
Serializes the current brightness limit to an archive.
Definition peak_afl_brightness_limit.hpp:75
void Deserialize(const peak::common::serialization::IArchive &archive) override
Deserializes the brightness limit from an archive.
Definition peak_afl_brightness_limit.hpp:97
Base interface for auto feature implementations.
Definition peak_afl_ifeature.hpp:59
#define PEAK_COMMON_NO_DISCARD
Compatability macro for the nodiscard attribute.
Definition peak_common_defines.h:86
Interface definitions and implementations for individual module types used within a pipeline.
Definition peak_afl_generic_auto_brightness.hpp:39
Interfaces and implementations for defining and controlling data processing pipelines.
Definition peak_afl_generic_auto_brightness.hpp:37
peak::common::detail::IntervalT< double > IntervalD
Type alias for double-precision interval values.
Definition peak_afl_ifeature.hpp:28