PathPlannerLib
Loading...
Searching...
No Matches
pathplanner::Event Class Referenceabstract
Inheritance diagram for pathplanner::Event:
pathplanner::CancelCommandEvent pathplanner::OneShotTriggerEvent pathplanner::PointTowardsZoneEvent pathplanner::ScheduleCommandEvent pathplanner::TriggerEvent

Public Member Functions

constexpr Event (units::second_t timestamp)
 
constexpr units::second_t getTimestamp () const
 
constexpr void setTimestamp (units::second_t timestamp)
 
virtual void handleEvent (EventScheduler *eventScheduler)=0
 
virtual void cancelEvent (EventScheduler *eventScheduler)=0
 
virtual std::shared_ptr< EventcopyWithTimestamp (units::second_t timestamp)=0
 

Constructor & Destructor Documentation

◆ Event()

constexpr pathplanner::Event::Event ( units::second_t  timestamp)
inlineconstexpr

Create a new event

Parameters
timestampThe trajectory timestamp this event should be handled at

Member Function Documentation

◆ cancelEvent()

virtual void pathplanner::Event::cancelEvent ( EventScheduler eventScheduler)
pure virtual

Cancel this event. This will be called if a path following command ends before this event gets handled.

Parameters
eventSchedulerReference to the EventScheduler handling this event

Implemented in pathplanner::CancelCommandEvent, pathplanner::OneShotTriggerEvent, pathplanner::PointTowardsZoneEvent, pathplanner::ScheduleCommandEvent, and pathplanner::TriggerEvent.

◆ copyWithTimestamp()

virtual std::shared_ptr< Event > pathplanner::Event::copyWithTimestamp ( units::second_t  timestamp)
pure virtual

Copy this event with a different timestamp

Parameters
timestampThe new timestamp
Returns
Copied event with new time

Implemented in pathplanner::CancelCommandEvent, pathplanner::OneShotTriggerEvent, pathplanner::PointTowardsZoneEvent, pathplanner::ScheduleCommandEvent, and pathplanner::TriggerEvent.

◆ getTimestamp()

constexpr units::second_t pathplanner::Event::getTimestamp ( ) const
inlineconstexpr

Get the trajectory timestamp for this event

Returns
Trajectory timestamp, in seconds

◆ handleEvent()

virtual void pathplanner::Event::handleEvent ( EventScheduler eventScheduler)
pure virtual

◆ setTimestamp()

constexpr void pathplanner::Event::setTimestamp ( units::second_t  timestamp)
inlineconstexpr

Set the trajectory timestamp of this event

Parameters
timestampTimestamp of this event along the trajectory

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