|
Auterion App SDK
Auterion SDK is a library that can be used by AuterionOS apps to communicate with the system.
|
A class for managing subscriptions to object detection service state changes. More...
#include <auterion_sdk/object_detection/object_detection_provider.hpp>
Public Member Functions | |
| ObjectDetectionEnabledSubscription (const std::shared_ptr< class ObjectDetectionEnabledSubscriptionImpl > &impl) | |
| Construct a new ObjectDetectionEnabledSubscription object. | |
| void | onUpdate (ObjectDetectionEnabledCallback callback) |
| Registers a callback function to be called when the object detection enabled state changes. | |
| void | subscribe (ObjectDetectionEnabledCallback callback=nullptr) |
| Activates the subscription process and registers a callback function if provided. | |
| bool | last () const |
| Retrieves the last received object detection enabled state. | |
| bool | isLastValid () const |
| Checks if the last received object detection state is valid. | |
A class for managing subscriptions to object detection service state changes.
This class enables providers to respond to object detection enabled/disabled state by controlling their computational workload accordingly.
| auterion::ObjectDetectionEnabledSubscription::ObjectDetectionEnabledSubscription | ( | const std::shared_ptr< class ObjectDetectionEnabledSubscriptionImpl > & | impl | ) |
Construct a new ObjectDetectionEnabledSubscription object.
| impl | The implementation pointer. |
| bool auterion::ObjectDetectionEnabledSubscription::isLastValid | ( | ) | const |
Checks if the last received object detection state is valid.
| bool auterion::ObjectDetectionEnabledSubscription::last | ( | ) | const |
Retrieves the last received object detection enabled state.
| auterion::AccessException | if no data has been received yet. |
| void auterion::ObjectDetectionEnabledSubscription::onUpdate | ( | ObjectDetectionEnabledCallback | callback | ) |
Registers a callback function to be called when the object detection enabled state changes.
This method does not start the subscription process itself.
| callback | Callback function to handle object detection enabled updates. |
| auterion::InvalidArgumentException | if the callback function is nullptr. |
| void auterion::ObjectDetectionEnabledSubscription::subscribe | ( | ObjectDetectionEnabledCallback | callback = nullptr | ) |
Activates the subscription process and registers a callback function if provided.
If a callback function is provided, it registers it for object detection enabled updates. If the callback is nullptr, only activates the subscription process.
| callback | Callback function to handle object detection enabled updates. |