helics 3.7.0
Loading...
Searching...
No Matches
NetworkCore.hpp
1/*
2Copyright (c) 2017-2026,
3Battelle Memorial Institute; Lawrence Livermore National Security, LLC; Alliance for Energy
4Innovation LLC. See the top-level NOTICE for additional details. All rights reserved.
5SPDX-License-Identifier: BSD-3-Clause
6*/
7#pragma once
8
9#include "CommsBroker.hpp"
10#include "NetworkBrokerData.hpp"
11#include "helics/core/CommonCore.hpp"
12
13#include <memory>
14#include <string>
15
16namespace helics {
17using InterfaceTypes = gmlc::networking::InterfaceTypes;
18template<class COMMS, InterfaceTypes baseline = InterfaceTypes::IP>
19class NetworkCore: public CommsBroker<COMMS, CommonCore> {
20 public:
22 NetworkCore() noexcept;
23 explicit NetworkCore(std::string_view broker_name);
24
25 public:
26 virtual std::string generateLocalAddressString() const override;
27
28 protected:
29 virtual std::shared_ptr<helicsCLI11App> generateCLI() override;
30 virtual bool brokerConnect() override;
31 mutable std::mutex dataMutex;
33};
34
35} // namespace helics
Definition CommsBroker.hpp:21
Definition NetworkBrokerData.hpp:23
Definition NetworkCore.hpp:19
NetworkCore() noexcept
Definition NetworkCore_impl.hpp:24
std::mutex dataMutex
mutex protecting the configuration information
Definition NetworkCore.hpp:31
virtual std::string generateLocalAddressString() const override
Definition NetworkCore_impl.hpp:70
virtual bool brokerConnect() override
Definition NetworkCore_impl.hpp:47
NetworkBrokerData netInfo
structure containing the networking information
Definition NetworkCore.hpp:32
virtual std::shared_ptr< helicsCLI11App > generateCLI() override
Definition NetworkCore_impl.hpp:37
the main namespace for the helics co-simulation library User functions will be in the helics namespac...
Definition AsyncFedCallInfo.hpp:14