38 Task(std::string name, std::string connection_string,
const std::vector<Order> &orders,
39 std::vector<std::string> follow_up_task_uuids);
41 const std::string &getUuid()
const;
42 const std::string &getName()
const;
43 const std::string &getConnectionString()
const;
45 const std::vector<Order> &getOrders()
const;
46 const std::vector<std::string> &getFollowUpTaskUuids()
const;
48 void setPrecedingTasks(
const std::vector<std::string> &preceding_tasks);
49 const std::vector<std::string> &getPrecedingTaskUuids()
const;
54 bool hasTimeWindow()
const;
55 void setTimeWindow(
const TimeWindow &time_window);
57 void setSpawnTime(
const util::Duration &spawn_time);
59 void setOrderState(uint8_t order_index, daisi::cpps::OrderStates state);
61 bool operator<(
const Task &other)
const {
return uuid_ < other.uuid_; }
62 bool operator==(
const Task &other)
const {
return uuid_ == other.uuid_; }
63 bool operator!=(
const Task &other)
const {
return uuid_ != other.uuid_; }
65 SERIALIZE(uuid_, name_, connection_string_, orders_, follow_up_task_uuids_, preceding_task_uuids_,
66 ability_requirement_);
69 void setOrderState(
TransportOrder &order, daisi::cpps::OrderStates state);
70 void setOrderState(
MoveOrder &order, daisi::cpps::OrderStates state);
71 void setOrderState(
ActionOrder &order, daisi::cpps::OrderStates state);
75 std::string connection_string_;
77 std::vector<Order> orders_;
79 std::vector<std::string> follow_up_task_uuids_;
80 std::vector<std::string> preceding_task_uuids_;
82 std::optional<TimeWindow> time_window_ = std::nullopt;