SOLA
Loading...
Searching...
No Matches
daisi
src
cpps
amr
message
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_AMR_MESSAGE_SERIALIZER_H_
18
#define DAISI_CPPS_AMR_MESSAGE_SERIALIZER_H_
19
20
#include <variant>
21
22
#include "cpps/amr/amr_description.h"
23
#include "cpps/amr/amr_topology.h"
24
#include "cpps/amr/message/amr_order_info.h"
25
#include "cpps/amr/message/amr_order_update.h"
26
#include "cpps/amr/message/amr_status_update.h"
27
28
namespace
daisi::cpps::amr {
29
using
Message = std::variant<AmrDescription,
// physical -> logical
30
AmrStatusUpdate,
// physical -> logical
31
AmrOrderInfo,
// logical -> physical
32
AmrOrderUpdate,
// physical -> logical
33
Topology
// logical -> physical
34
>;
35
36
std::string serialize(
const
Message &msg);
37
38
Message deserialize(
const
std::string &msg);
39
40
}
// namespace daisi::cpps::amr
41
42
#endif
Generated by
1.9.8