Class Event::Standby

Nested Relationships

This class is a nested type of Class Event.

Class Documentation

class Standby

The interface of an event that is in a standby mode. This interface is what will be provided by the Event::Initializer. When the right conditions are met for the event to begin, the owner of the event should trigger the begin() function.

Public Functions

virtual ConstStatePtr state() const = 0

Get the state of this event. The state object returned by this function must always be the same state object, and it must remain the relevant state object for this Event after begin(~) has been called.

virtual rmf_traffic::Duration duration_estimate() const = 0

Estimate how long this event will take once it has started.

virtual ActivePtr begin(std::function<void()> checkpoint, std::function<void()> finished) = 0

Tell this event to begin. This function should be implemented to always return the same Event::Active instance if it gets called more than once.

Parameters:
  • checkpoint[in] A callback that will be triggered when the event reaches a “checkpoint” meaning that the task state should be backed up.

  • finished[in] A callback that will be triggered when the event reaches a Finished state

virtual ~Standby() = default