SOLA
Loading...
Searching...
No Matches
cpps_communicator.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_COMMON_CPPS_COMMUNICATOR_H_
18#define DAISI_CPPS_COMMON_CPPS_COMMUNICATOR_H_
19
20#include "SOLA/event_dissemination_minhcast.h"
21#include "SOLA/management_overlay_minhton.h"
22#include "SOLA/sola.h"
23#include "solanet/network_udp/network_udp.h"
24
25namespace daisi::cpps::common {
26
32 const sola::EventDisseminationMinhcast::Config &event_dissemination_config,
33 sola::TopicMessageReceiveFct topic_recv, sola::LoggerPtr logger,
34 const std::function<void(const solanet::Message &)> &callback)
35 : sola(storage_config, event_dissemination_config, std::move(topic_recv), logger),
36 network(callback) {}
37
39 solanet::Network network;
40};
41
42using CppsCommunicatorPtr = std::shared_ptr<daisi::cpps::common::CppsCommunicator>;
43
44} // namespace daisi::cpps::common
45
46#endif
Definition config_node.h:30
Definition sola.h:30
Definition message.h:14
Definition network_udp.h:18
Aggregation object holding communication related members.
Definition cpps_communicator.h:28
CppsCommunicator(const sola::ManagementOverlayMinhton::Config &storage_config, const sola::EventDisseminationMinhcast::Config &event_dissemination_config, sola::TopicMessageReceiveFct topic_recv, sola::LoggerPtr logger, const std::function< void(const solanet::Message &)> &callback)
Definition cpps_communicator.h:31
Definition event_dissemination_minhcast.h:35