Class SimpleEventState¶
Defined in File SimpleEventState.hpp
Inheritance Relationships¶
Base Type¶
public rmf_task::Event::State
(Class Event::State)
Class Documentation¶
-
class
rmf_task::events
::
SimpleEventState
: public rmf_task::Event::State¶ This class is the simplest possible implementation for directly managing the required fields of the Event interface.
This may be useful if you have a Phase implementation that takes care of the logic for tracking your event(s) but you still need an Event object to satisfy the Phase interface’s finish_event() function. Your Phase implementation can create an instance of this class and then manage its fields directly.
Public Functions
-
virtual uint64_t
id
() const final¶ The ID of this event, which is unique within its phase.
-
virtual Status
status
() const final¶ The current Status of this event.
-
SimpleEventState &
update_status
(Status new_status)¶ Update the status of this event.
-
virtual VersionedString::View
name
() const final¶ The “name” of this event. Ideally a short, simple piece of text that helps a human being intuit what this event is expecting at a glance.
-
SimpleEventState &
update_name
(std::string new_name)¶ Update the name of this event.
-
virtual VersionedString::View
detail
() const final¶ A detailed explanation of this event.
-
SimpleEventState &
update_detail
(std::string new_detail)¶ Update the detail of this event.
-
virtual std::vector<ConstStatePtr>
dependencies
() const final¶ Get more granular dependencies of this event, if any exist.
-
SimpleEventState &
update_dependencies
(std::vector<ConstStatePtr> new_dependencies)¶ Update the dependencies.
-
SimpleEventState &
add_dependency
(ConstStatePtr new_dependency)¶ Add one dependency to the state.
Public Static Functions
-
static std::shared_ptr<SimpleEventState>
make
(uint64_t id, std::string name, std::string detail, Status initial_status, std::vector<ConstStatePtr> dependencies = {}, std::function<rmf_traffic::Time()> clock = nullptr)¶
-
virtual uint64_t