SOLA
Loading...
Searching...
No Matches
central_server.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_PATH_PLANNING_CONSENSUS_CENTRAL_SERVER_H_
18#define DAISI_PATH_PLANNING_CONSENSUS_CENTRAL_SERVER_H_
19
20#include <memory>
21#include <set>
22
23#include "cpps/common/cpps_logger_ns3.h"
24#include "path_planning/constants.h"
25#include "path_planning/path_planning_logger_ns_3.h"
26#include "solanet/network_udp/network_udp.h"
27
28namespace daisi::path_planning::consensus {
33public:
34 CentralServer(CentralSettings settings, std::shared_ptr<PathPlanningLoggerNs3> logger);
35
40 void setIntersections(const std::set<PPVector> &intersections);
41
42private:
43 std::unique_ptr<solanet::Network> network_;
44
45 void processMessage(const solanet::Message &msg);
46
47 IntersectionOccupancy
48 intersection_occupancy_;
50
51 CentralSettings settings_;
52 std::shared_ptr<PathPlanningLoggerNs3> logger_;
53};
54
55} // namespace daisi::path_planning::consensus
56
57#endif // DAISI_PATH_PLANNING_CONSENSUS_CENTRAL_SERVER_H_
void setIntersections(const std::set< PPVector > &intersections)
Definition central_server.cpp:40
Definition message.h:14
Definition central_settings.h:24