SOLA
Loading...
Searching...
No Matches
status_update.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_CENTRAL_ALLOCATION_STATUS_UPDATE_H_
18#define DAISI_CPPS_LOGICAL_MESSAGE_CENTRAL_ALLOCATION_STATUS_UPDATE_H_
19
20#include <string>
21
22#include "cpps/amr/model/amr_static_ability.h"
23#include "cpps/logical/task_management/metrics_composition.h"
24#include "solanet/serializer/serialize.h"
25#include "solanet/uuid.h"
26#include "solanet/uuid_generator.h"
27#include "utils/structure_helpers.h"
28
29namespace daisi::cpps::logical {
30
32// Message that consists information about a participant's status.
34public:
35 StatusUpdate() = default;
36 StatusUpdate(std::string participant_connection, const Metrics &metrics,
37 const util::Position end_position)
38 : participant_connection_(std::move(participant_connection)),
39 metrics_(metrics),
40 end_position_(end_position) {}
41
42 const std::string &getParticipantConnection() const { return participant_connection_; }
43 const Metrics &getMetrics() const { return metrics_; }
44 util::Position getEndPosition() const { return end_position_; }
45
46 solanet::UUID getUUID() const { return uuid_; }
47
48 SERIALIZE(uuid_, participant_connection_, metrics_, end_position_);
49
50private:
51 solanet::UUID uuid_ = solanet::generateUUID();
52
53 std::string participant_connection_;
54 Metrics metrics_;
55 util::Position end_position_;
56};
57} // namespace daisi::cpps::logical
58
59#endif
Definition metrics.h:28
might need some revision / additions in the future
Definition status_update.h:33
Modified Round Robin Algorithm that centrally assigns tasks of incoming material flows to the corresp...
Definition algorithm_config.h:22