|
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 2D object detections. More...
#include <auterion_sdk/object_detection/object_detection_client.hpp>
Public Member Functions | |
| Detections2DSubscription (const std::shared_ptr< class Detections2DSubscriptionImpl > &impl) | |
| Construct a new Detections2DSubscription object. More... | |
| void | onUpdate (Detections2DCallback callback) |
| Registers a callback function to be called when new detections are received. More... | |
| void | subscribe (Detections2DCallback callback=nullptr) |
| Activates the subscription process and registers a callback function if provided. More... | |
| ImageDetections2D | last () const |
| Retrieves the last received detections. More... | |
| bool | isLastValid () const |
| Checks if the last received detections are valid. More... | |
A class for managing subscriptions to 2D object detections.
| auterion::Detections2DSubscription::Detections2DSubscription | ( | const std::shared_ptr< class Detections2DSubscriptionImpl > & | impl | ) |
Construct a new Detections2DSubscription object.
| impl | The implementation pointer. |
| bool auterion::Detections2DSubscription::isLastValid | ( | ) | const |
Checks if the last received detections are valid.
| ImageDetections2D auterion::Detections2DSubscription::last | ( | ) | const |
Retrieves the last received detections.
| auterion::AccessException | if no data has been received yet. |
| void auterion::Detections2DSubscription::onUpdate | ( | Detections2DCallback | callback | ) |
Registers a callback function to be called when new detections are received.
This method does not start the subscription process itself.
| callback | Callback function to handle detection updates. |
| auterion::InvalidArgumentException | if the callback function is nullptr. |
| void auterion::Detections2DSubscription::subscribe | ( | Detections2DCallback | callback = nullptr | ) |
Activates the subscription process and registers a callback function if provided.
If a callback function is provided, it registers it for detection updates. If the callback is nullptr, only activates the subscription process.
| callback | Callback function to handle detection updates. |