IDS peak AFL v2.1.0
Loading...
Searching...
No Matches
peak_afl_brightness_limit.hpp
Go to the documentation of this file.
1
6
7#pragma once
8
11
14
15#include <memory>
16
17namespace peak
18{
19namespace pipeline
20{
21namespace modules
22{
23namespace autofeature
24{
25namespace features
26{
54class BrightnessLimit : public IFeature<IntervalD>
55{
56public:
72 {
73 const auto interval = Get();
74 archive.SetDouble("Min", interval.GetMinimum());
75 archive.SetDouble("Max", interval.GetMaximum());
76 }
77
94 {
95 IntervalD interval{ archive.GetDouble("Min"), archive.GetDouble("Max") };
96 Set(interval);
97 }
98};
99
125{
126public:
139 explicit BrightnessExposureLimit(std::shared_ptr<peak::afl::Controller> controller)
140 : m_controller{ std::move(controller) }
141 {}
142
161 void Set(const IntervalD& value) override
162 {
163 m_controller->SetExposureLimit({ value.GetMinimum(), value.GetMaximum() });
164 }
165
181 PEAK_COMMON_NO_DISCARD IntervalD Get() const override
182 {
183 const auto result = m_controller->GetExposureLimit();
184 return { result.min, result.max };
185 }
186
187private:
195 std::shared_ptr<peak::afl::Controller> m_controller;
196};
197
220{
221public:
233 explicit BrightnessGainLimit(std::shared_ptr<peak::afl::Controller> controller)
234 : m_controller{ std::move(controller) }
235 {}
236
244 void Set(const IntervalD& value) override
245 {
246 m_controller->SetGainLimit({ value.GetMinimum(), value.GetMaximum() });
247 }
248
256 PEAK_COMMON_NO_DISCARD IntervalD Get() const override
257 {
258 const auto result = m_controller->GetGainLimit();
259 return { result.min, result.max };
260 }
261
262private:
263 std::shared_ptr<peak::afl::Controller> m_controller;
264};
265
287{
288public:
301 explicit BrightnessGainAnalogLimit(std::shared_ptr<peak::afl::Controller> controller)
302 : m_controller{ std::move(controller) }
303 {}
304
317 void Set(const IntervalD& value) override
318 {
319 m_controller->SetGainAnalogLimit({ value.GetMinimum(), value.GetMaximum() });
320 }
321
334 PEAK_COMMON_NO_DISCARD IntervalD Get() const override
335 {
336 const auto result = m_controller->GetGainAnalogLimit();
337 return { result.min, result.max };
338 }
339
340private:
341 std::shared_ptr<peak::afl::Controller> m_controller;
342};
343
365{
366public:
379 explicit BrightnessGainDigitalLimit(std::shared_ptr<peak::afl::Controller> controller)
380 : m_controller{ std::move(controller) }
381 {}
382
395 void Set(const IntervalD& value) override
396 {
397 m_controller->SetGainDigitalLimit({ value.GetMinimum(), value.GetMaximum() });
398 }
399
412 PEAK_COMMON_NO_DISCARD IntervalD Get() const override
413 {
414 const auto result = m_controller->GetGainDigitalLimit();
415 return { result.min, result.max };
416 }
417
418private:
419 std::shared_ptr<peak::afl::Controller> m_controller;
420};
421
444{
445public:
458 explicit BrightnessGainCombinedLimit(std::shared_ptr<peak::afl::Controller> controller)
459 : m_controller{ std::move(controller) }
460 {}
461
474 void Set(const IntervalD& value) override
475 {
476 m_controller->SetGainCombinedLimit({ value.GetMinimum(), value.GetMaximum() });
477 }
478
491 PEAK_COMMON_NO_DISCARD IntervalD Get() const override
492 {
493 const auto result = m_controller->GetGainCombinedLimit();
494 return { result.min, result.max };
495 }
496
497private:
498 std::shared_ptr<peak::afl::Controller> m_controller;
499};
500
526{
527public:
540 explicit BrightnessGainHostLimit(std::shared_ptr<peak::afl::Controller> controller)
541 : m_controller{ std::move(controller) }
542 {}
543
556 void Set(const IntervalD& value) override
557 {
558 m_controller->SetGainHostLimit({ value.GetMinimum(), value.GetMaximum() });
559 }
560
573 PEAK_COMMON_NO_DISCARD IntervalD Get() const override
574 {
575 const auto result = m_controller->GetGainHostLimit();
576 return { result.min, result.max };
577 }
578
579private:
580 std::shared_ptr<peak::afl::Controller> m_controller;
581};
582} // namespace features
583} // namespace autofeature
584} // namespace modules
585} // namespace pipeline
586} // namespace peak
Interface for a hierarchical key-value archive system.
Definition peak_common_iarchive.hpp:54
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:139
void Set(const IntervalD &value) override
Sets the exposure time limits.
Definition peak_afl_brightness_limit.hpp:161
IntervalD Get() const override
Gets the current exposure time limits.
Definition peak_afl_brightness_limit.hpp:181
void Set(const IntervalD &value) override
Sets the analog gain limits.
Definition peak_afl_brightness_limit.hpp:317
BrightnessGainAnalogLimit(std::shared_ptr< peak::afl::Controller > controller)
Constructs an analog gain limit feature with the specified controller.
Definition peak_afl_brightness_limit.hpp:301
IntervalD Get() const override
Gets the current analog gain limits.
Definition peak_afl_brightness_limit.hpp:334
BrightnessGainCombinedLimit(std::shared_ptr< peak::afl::Controller > controller)
Constructs a combined gain limit feature with the specified controller.
Definition peak_afl_brightness_limit.hpp:458
void Set(const IntervalD &value) override
Sets the combined gain limits.
Definition peak_afl_brightness_limit.hpp:474
IntervalD Get() const override
Gets the current combined gain limits.
Definition peak_afl_brightness_limit.hpp:491
BrightnessGainDigitalLimit(std::shared_ptr< peak::afl::Controller > controller)
Constructs a digital gain limit feature with the specified controller.
Definition peak_afl_brightness_limit.hpp:379
void Set(const IntervalD &value) override
Sets the digital gain limits.
Definition peak_afl_brightness_limit.hpp:395
IntervalD Get() const override
Gets the current digital gain limits.
Definition peak_afl_brightness_limit.hpp:412
void Set(const IntervalD &value) override
Sets the host gain limits.
Definition peak_afl_brightness_limit.hpp:556
IntervalD Get() const override
Gets the current host gain limits.
Definition peak_afl_brightness_limit.hpp:573
BrightnessGainHostLimit(std::shared_ptr< peak::afl::Controller > controller)
Constructs a host gain limit feature with the specified controller.
Definition peak_afl_brightness_limit.hpp:540
BrightnessGainLimit(std::shared_ptr< peak::afl::Controller > controller)
Constructs a BrightnessGainLimit feature with the specified controller.
Definition peak_afl_brightness_limit.hpp:233
void Set(const IntervalD &value) override
Sets the overall gain limits.
Definition peak_afl_brightness_limit.hpp:244
IntervalD Get() const override
Gets the current overall gain limits.
Definition peak_afl_brightness_limit.hpp:256
Base class for brightness limit features.
Definition peak_afl_brightness_limit.hpp:55
void Serialize(peak::common::serialization::IArchive &archive) const override
Serializes the current brightness limit to an archive.
Definition peak_afl_brightness_limit.hpp:71
void Deserialize(const peak::common::serialization::IArchive &archive) override
Deserializes the brightness limit from an archive.
Definition peak_afl_brightness_limit.hpp:93
Base interface for auto feature implementations.
Definition peak_afl_ifeature.hpp:55
Interface definitions and implementations for individual module types used within a pipeline.
Definition peak_afl_generic_auto_brightness.hpp:35
Interfaces and implementations for defining and controlling data processing pipelines.
Definition peak_afl_generic_auto_brightness.hpp:33
peak::common::detail::IntervalT< double > IntervalD
Type alias for double-precision interval values.
Definition peak_afl_ifeature.hpp:24