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

Observer interface for receiving servo completion/abort/error events. More...

#include <ServoEventListener.h>

Public Member Functions

virtual ~ServoEventListener ()=default
virtual void onServoAbort (uint16_t id, ServoId channel)
 Called when a servo action is aborted.
virtual void onServoError (uint16_t id, ServoId channel)
 Called when a servo action fails.
virtual void onServoComplete (uint16_t id, ServoId channel)
 Called when a servo action completes successfully.

Detailed Description

Observer interface for receiving servo completion/abort/error events.

Register an implementation using ServoEvent::AddListener().

Warning
Do not destroy a listener object while it is registered.

Constructor & Destructor Documentation

◆ ~ServoEventListener()

virtual ServoEventListener::~ServoEventListener ( )
virtualdefault

Member Function Documentation

◆ onServoAbort()

virtual void ServoEventListener::onServoAbort ( uint16_t id,
ServoId channel )
virtual

Called when a servo action is aborted.

Parameters
idAction identifier passed to ServoControl::setServo().
channelServo channel.

◆ onServoComplete()

virtual void ServoEventListener::onServoComplete ( uint16_t id,
ServoId channel )
virtual

Called when a servo action completes successfully.

Parameters
idAction identifier passed to ServoControl::setServo().
channelServo channel.

◆ onServoError()

virtual void ServoEventListener::onServoError ( uint16_t id,
ServoId channel )
virtual

Called when a servo action fails.

Parameters
idAction identifier passed to ServoControl::setServo().
channelServo channel.

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