Focus limit feature implementation for auto focus controllers. More...
#include <peak_afl/pipeline/modules/controllers/features/peak_afl_focus_limit.hpp>
Public Member Functions | |
| FocusLimit (std::shared_ptr< peak::afl::Controller > controller) | |
| Constructs a FocusLimit feature with the specified controller. | |
| void | Set (const peak::common::Interval &value) override |
| Sets the focus position limits. | |
| peak::common::Interval | Get () const override |
| Gets the current focus position limits. | |
| void | Serialize (peak::common::serialization::IArchive &archive) const override |
| Serializes the current focus limits to an archive. | |
| void | Deserialize (const peak::common::serialization::IArchive &archive) override |
| Deserializes the focus limits from an archive. | |
| Public Member Functions inherited from IFeature< peak::common::Interval > | |
| virtual | ~IFeature ()=default |
| Virtual destructor for proper cleanup of derived classes. | |
Focus limit feature implementation for auto focus controllers.
The FocusLimit class provides a feature interface for managing the focus limit parameter of auto focus controllers. This feature defines the range of focus positions that the automatic focus algorithm is allowed to use during focus operations.
Focus limits are useful for:
The limit is defined as an interval with minimum and maximum focus positions, typically expressed in lens-specific units or motor steps.
This class inherits from IFeature<peak::common::Interval> and provides serialization support for configuration persistence.
|
inlineexplicit |
Constructs a FocusLimit feature with the specified controller.
| [in] | controller | Shared pointer to the auto focus controller that will be used to manage the focus limit parameter. The controller must support focus limit operations. |
|
inlineoverridevirtual |
Deserializes the focus limits from an archive.
Loads the focus position limits from the provided archive and applies them to the controller. The limits are expected to be stored with keys "Min" and "Max".
| [in] | archive | The archive to read the focus limits from |
| May | throw serialization exceptions if the archive operation fails |
| May | throw controller exceptions if the deserialized limits are invalid |
Implements ISerializable.
|
inlineoverridevirtual |
Gets the current focus position limits.
Retrieves the currently configured range of focus positions that the automatic focus algorithm is allowed to use.
| May | throw exceptions based on the underlying controller implementation if the controller is in an invalid state. |
Implements IFeature< peak::common::Interval >.
|
inlineoverridevirtual |
Serializes the current focus limits to an archive.
Stores the current focus position limits in the provided archive for configuration persistence. The limits are stored with keys "Min" and "Max".
| [in,out] | archive | The archive to write the focus limits to |
| May | throw serialization exceptions if the archive operation fails |
Implements ISerializable.
|
inlineoverridevirtual |
Sets the focus position limits.
Sets the range of focus positions that the automatic focus algorithm is allowed to use. The focus search will be restricted to positions between the minimum and maximum values of the interval.
| [in] | value | The interval defining the focus limits. The minimum value should be less than or equal to the maximum value. Values are typically in lens-specific units or motor steps. |
| May | throw exceptions based on the underlying controller implementation if the interval is invalid or if the controller is in an invalid state. |
Implements IFeature< peak::common::Interval >.