Class Task::Booking

Nested Relationships

This class is a nested type of Class Task.

Class Documentation

class Booking

Basic information about how the task was booked, e.g. what its name is, when it should start, and what its priority is.

Public Functions

Booking(std::string id, rmf_traffic::Time earliest_start_time, ConstPriorityPtr priority, bool automatic = false, const std::vector<std::string> &labels = {})

Constructor

Parameters:
  • id[in] The identity of the booking

  • earliest_start_time[in] The earliest time that the task may begin

  • priority[in] The priority of the booking

  • automatic[in] Whether this booking was automatically generated

  • labels[in] Labels to describe the purpose of the task dispatch request.

Booking(std::string id, rmf_traffic::Time earliest_start_time, ConstPriorityPtr priority, const std::string &requester, rmf_traffic::Time request_time, bool automatic = false, const std::vector<std::string> &labels = {})

Constructor

Parameters:
  • id[in] The identity of the booking.

  • earliest_start_time[in] The earliest time that the task may begin.

  • priority[in] The priority of the booking.

  • requester[in] The identifier of the entity that requested this task.

  • request_time[in] The time that this task was booked.

  • automatic[in] Whether this booking was automatically generated, default value as false.

  • labels[in] Labels to describe the purpose of the task dispatch request.

const std::string &id() const

The unique id for this booking.

rmf_traffic::Time earliest_start_time() const

Get the earliest time that this booking may begin.

ConstPriorityPtr priority() const

Get the priority of this booking.

std::optional<std::string> requester() const

Get the identifier of the entity that requested this booking. Returns a nullopt if no requester was defined.

std::optional<rmf_traffic::Time> request_time() const

Get the time that this booking was requested. Returns a nullopt if no request time was defined.

bool automatic() const
std::vector<std::string> labels() const

Get the labels that describe the purpose of the task dispatch request.