SOLA
Loading...
Searching...
No Matches
iteration_notification.h
1// Copyright 2023 The SOLA authors
2//
3// This file is part of DAISI.
4//
5// DAISI is free software: you can redistribute it and/or modify it under the terms of the GNU
6// General Public License as published by the Free Software Foundation; version 2.
7//
8// DAISI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
9// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
10// Public License for more details.
11//
12// You should have received a copy of the GNU General Public License along with DAISI. If not, see
13// <https://www.gnu.org/licenses/>.
14//
15// SPDX-License-Identifier: GPL-2.0-only
16
17#ifndef DAISI_CPPS_LOGICAL_MESSAGE_AUCTION_BASED_ITERATION_NOTIFICATION_H_
18#define DAISI_CPPS_LOGICAL_MESSAGE_AUCTION_BASED_ITERATION_NOTIFICATION_H_
19
20#include <string>
21#include <vector>
22
23#include "solanet/serializer/serialize.h"
24#include "solanet/uuid.h"
25#include "solanet/uuid_generator.h"
26
27namespace daisi::cpps::logical {
28
30public:
31 IterationNotification() = default;
32 IterationNotification(std::string initiator_connection, std::vector<std::string> task_uuids)
33 : initiator_connection_(std::move(initiator_connection)),
34 task_uuids_(std::move(task_uuids)) {}
35
36 const std::string &getInitiatorConnection() const { return initiator_connection_; }
37
38 const std::vector<std::string> &getTaskUuids() const { return task_uuids_; }
39
40 solanet::UUID getUUID() const { return uuid_; }
41
42 SERIALIZE(initiator_connection_, task_uuids_);
43
44private:
45 solanet::UUID uuid_ = solanet::generateUUID();
46
47 std::string initiator_connection_;
48
49 std::vector<std::string> task_uuids_;
50};
51
52} // namespace daisi::cpps::logical
53
54#endif
Definition iteration_notification.h:29
Modified Round Robin Algorithm that centrally assigns tasks of incoming material flows to the corresp...
Definition algorithm_config.h:22