![]() |
IDS peak AFL v2.0.0
|
Hysteresis feature implementation for auto controllers. More...
#include <peak_afl/pipeline/modules/controllers/features/peak_afl_hysteresis.hpp>
Public Member Functions | |
| Hysteresis (std::shared_ptr< peak::afl::Controller > controller) | |
| Constructs a Hysteresis feature with the specified controller. | |
| void | Set (const uint8_t &value) override |
| Sets the hysteresis value. | |
| uint8_t | Get () const override |
| Gets the current hysteresis value. | |
| peak::common::RangeU8 | GetRange () const override |
| Gets the valid range for hysteresis values. | |
| void | Serialize (peak::common::serialization::IArchive &archive) const override |
| Serializes the current hysteresis value to an archive. | |
| void | Deserialize (const peak::common::serialization::IArchive &archive) override |
| Deserializes the hysteresis value from an archive. | |
| Public Member Functions inherited from IFeature< uint8_t > | |
| virtual | ~IFeature ()=default |
| Virtual destructor for proper cleanup of derived classes. | |
Hysteresis feature implementation for auto controllers.
The Hysteresis class provides a feature interface for managing the hysteresis parameter of auto controllers. Hysteresis prevents oscillation in automatic control systems by introducing a dead zone around the target value where no adjustments are made.
Hysteresis is particularly important in automatic exposure and focus systems to prevent continuous small adjustments that can cause visible flickering or hunting behavior. The hysteresis value defines how far from the target the measured value must move before the controller will make an adjustment.
This class inherits from IRangeFeature<uint8_t> and provides serialization support for configuration persistence.
|
inlineexplicit |
Constructs a Hysteresis feature with the specified controller.
| [in] | controller | Shared pointer to the auto controller that will be used to manage the hysteresis parameter. The controller must support hysteresis operations. |
|
inlineoverridevirtual |
Deserializes the hysteresis value from an archive.
Loads the hysteresis value from the provided archive and applies it to the controller. The value is expected to be stored with the key "Hysteresis".
| [in] | archive | The archive to read the hysteresis value from |
| May | throw serialization exceptions if the archive operation fails |
| May | throw controller exceptions if the deserialized value is invalid |
Implements ISerializable.
|
inlineoverridevirtual |
Gets the current hysteresis value.
Retrieves the currently configured hysteresis value that defines the dead zone around the target for automatic adjustments.
| May | throw exceptions based on the underlying controller implementation if the controller is in an invalid state. |
Implements IFeature< uint8_t >.
|
inlineoverridevirtual |
Gets the valid range for hysteresis values.
Retrieves the minimum, maximum, and increment values that are valid for the hysteresis parameter. This information can be used to validate input values or to populate user interface controls.
| May | throw exceptions based on the underlying controller implementation if the controller is in an invalid state. |
Implements IRangeFeature< uint8_t >.
|
inlineoverridevirtual |
Serializes the current hysteresis value to an archive.
Stores the current hysteresis value in the provided archive for configuration persistence. The value is stored with the key "Hysteresis".
| [in,out] | archive | The archive to write the hysteresis value to |
| May | throw serialization exceptions if the archive operation fails |
Implements ISerializable.
|
inlineoverridevirtual |
Sets the hysteresis value.
Sets the hysteresis value that defines the dead zone around the target where no automatic adjustments will be made. This prevents oscillation and hunting behavior in automatic control systems.
| [in] | value | The hysteresis value to set. Higher values create a larger dead zone, reducing sensitivity but improving stability. The exact valid range can be obtained using GetRange(). |
| May | throw exceptions based on the underlying controller implementation if the value is outside the valid range or if the controller is in an invalid state. |
Implements IFeature< uint8_t >.