SOLA
Loading...
Searching...
No Matches
serializer.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_SERIALIZER_H_
18#define DAISI_CPPS_LOGICAL_MESSAGE_SERIALIZER_H_
19
20#include <string>
21#include <variant>
22
23#include "auction_based/bid_submission.h"
24#include "auction_based/call_for_proposal.h"
25#include "auction_based/iteration_notification.h"
26#include "auction_based/winner_notification.h"
27#include "auction_based/winner_response.h"
28#include "central_allocation/assignment_notification.h"
29#include "central_allocation/assignment_response.h"
30#include "central_allocation/status_update.h"
31#include "central_allocation/status_update_request.h"
32#include "material_flow_update.h"
33
34namespace daisi::cpps::logical {
35
36using Message =
37 std::variant<CallForProposal, BidSubmission, IterationNotification, WinnerNotification,
38 WinnerResponse, AssignmentNotification, AssignmentResponse, StatusUpdate,
39 StatusUpdateRequest, MaterialFlowUpdate>;
40
41std::string serialize(const Message &msg);
42
43Message deserialize(const std::string &msg);
44
45} // namespace daisi::cpps::logical
46
47#endif
Modified Round Robin Algorithm that centrally assigns tasks of incoming material flows to the corresp...
Definition algorithm_config.h:22