Interface for receiving arm events.
More...
#include <ArmEventListener.h>
Interface for receiving arm events.
Implement this interface and register it using ArmEvent::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 (not the caller thread). Keep handlers fast and avoid blocking.
-
The listener object must remain valid until it is removed via ArmEvent::RemoveListener().
◆ ~ArmEventListener()
| virtual ArmEventListener::~ArmEventListener |
( |
| ) |
|
|
virtualdefault |
◆ onArmComplete()
| virtual void ArmEventListener::onArmComplete |
( |
uint16_t | id, |
|
|
ArmSide | side ) |
|
virtual |
Called when an arm command completes successfully.
- Parameters
-
◆ onArmError()
| virtual void ArmEventListener::onArmError |
( |
uint16_t | id, |
|
|
ArmSide | side, |
|
|
ArmErrorType | errorType ) |
|
virtual |
Called when an arm command ends with an error.
- Parameters
-
| id | Command identifier passed to ArmControl::setAngle(). |
| side | Arm side on which the error occurred. |
| errorType | Category of error. |
◆ onArmMovement()
| virtual void ArmEventListener::onArmMovement |
( |
ArmSide | side, |
|
|
float | degreeChange ) |
|
virtual |
Called to report incremental motion events.
This is commonly used for “movement happened” notifications even when there is no active RUNNING command.
- Parameters
-
| side | Arm side that moved. |
| degreeChange | Signed delta angle (degrees) since last notification. |
◆ onArmStateChange()
| virtual void ArmEventListener::onArmStateChange |
( |
ArmSide | side, |
|
|
ArmState | state ) |
|
virtual |
Called when the arm state changes.
- Parameters
-
| side | Arm side that changed state. |
| state | New state. |
The documentation for this class was generated from the following file: