Doly C++ SDK v1.00
Loading...
Searching...
No Matches
EdgeEventListener Class Reference

Interface for receiving edge and gap detection events from edge controller. More...

#include <EdgeEventListener.h>

Public Member Functions

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.

Detailed Description

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().

Constructor & Destructor Documentation

◆ ~EdgeEventListener()

virtual EdgeEventListener::~EdgeEventListener ( )
virtualdefault

Virtual destructor for proper cleanup in derived classes.

Member Function Documentation

◆ onEdgeChange()

virtual void EdgeEventListener::onEdgeChange ( std::vector< IrSensor > sensors)
virtual

Called when the set of IR sensor states changes.

Parameters
sensorsVector 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_typeCoarse direction/category of the detected gap.

The documentation for this class was generated from the following file: