75 explicit Hysteresis(std::shared_ptr<peak::afl::Controller> controller)
76 : m_controller{ std::move(controller) }
99 void Set(
const uint8_t& value)
override
101 m_controller->SetHysteresis(value);
122 return m_controller->GetHysteresis();
147 const auto result = m_controller->GetHysteresisRange();
148 return { result.min, result.max, result.inc };
187 Set(
static_cast<uint8_t
>(archive.
GetInt(
"Hysteresis")));
198 std::shared_ptr<peak::afl::Controller> m_controller;
Interface for a hierarchical key-value archive system.
Definition peak_common_iarchive.hpp:59
virtual void SetInt(const std::string &key, int64_t value)=0
Stores a 64-bit signed integer.
virtual PEAK_COMMON_NO_DISCARD int64_t GetInt(const std::string &key) const =0
Retrieves a 64-bit signed integer by key.
PEAK_COMMON_NO_DISCARD peak::common::RangeU8 GetRange() const override
Gets the valid range for hysteresis values.
Definition peak_afl_hysteresis.hpp:145
void Serialize(peak::common::serialization::IArchive &archive) const override
Serializes the current hysteresis value to an archive.
Definition peak_afl_hysteresis.hpp:165
void Set(const uint8_t &value) override
Sets the hysteresis value.
Definition peak_afl_hysteresis.hpp:99
void Deserialize(const peak::common::serialization::IArchive &archive) override
Deserializes the hysteresis value from an archive.
Definition peak_afl_hysteresis.hpp:185
PEAK_COMMON_NO_DISCARD uint8_t Get() const override
Gets the current hysteresis value.
Definition peak_afl_hysteresis.hpp:120
Hysteresis(std::shared_ptr< peak::afl::Controller > controller)
Constructs a Hysteresis feature with the specified controller.
Definition peak_afl_hysteresis.hpp:75
Interface for features that have a valid range of values.
Definition peak_afl_ifeature.hpp:128
#define PEAK_COMMON_NO_DISCARD
Compatability macro for the nodiscard attribute.
Definition peak_common_defines.hpp:91
detail::RangeT< uint8_t > RangeU8
Alias for a range of 8-bit unsigned integers.
Definition peak_common_range.hpp:177
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