Interface for receiving edge and gap detection events from edge controller.
More...
#include <EdgeEventListener.h>
|
| virtual | ~EdgeEventListener ()=default |
| | Virtual destructor for proper cleanup in derived classes.
|
| virtual void | onEdgeChange (std::vector< IrSensor > sensors) |
| | Called when the set of IR sensor states changes.
|
| virtual void | onGapDetect (GapDirection gap_type) |
| | Called when a gap (e.g. drop-off, missing surface) is detected and categorized.
|
Interface for receiving edge and gap detection events from edge controller.
Implement this interface and register it using EdgeEvent::AddListener().
- Note
- Default implementations are no-ops, so you may override only what you need.
- Warning
- Callbacks are typically invoked from an internal worker/event thread. Keep handlers fast and avoid blocking.
-
The listener object must remain valid until it is removed via EdgeEvent::RemoveListener().
◆ ~EdgeEventListener()
| virtual EdgeEventListener::~EdgeEventListener |
( |
| ) |
|
|
virtualdefault |
Virtual destructor for proper cleanup in derived classes.
◆ onEdgeChange()
| virtual void EdgeEventListener::onEdgeChange |
( |
std::vector< IrSensor > | sensors | ) |
|
|
virtual |
Called when the set of IR sensor states changes.
- Parameters
-
| sensors | Vector of IrSensor entries describing the sensors that changed state. The container may include one or multiple sensors. |
◆ onGapDetect()
| virtual void EdgeEventListener::onGapDetect |
( |
GapDirection | gap_type | ) |
|
|
virtual |
Called when a gap (e.g. drop-off, missing surface) is detected and categorized.
- Parameters
-
| gap_type | Coarse direction/category of the detected gap. |
The documentation for this class was generated from the following file: