helics 3.7.0
Loading...
Searching...
No Matches
NetworkBroker.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/CoreBroker.hpp"
12
13#include <memory>
14#include <string>
15
16namespace helics {
17template<class COMMS, gmlc::networking::InterfaceTypes baseline, int tcode = 0>
18class NetworkBroker: public CommsBroker<COMMS, CoreBroker> {
19 public:
21 explicit NetworkBroker(bool rootBroker = false) noexcept;
22 explicit NetworkBroker(std::string_view broker_name);
23
24 public:
25 virtual std::string generateLocalAddressString() const override;
26
27 protected:
28 virtual std::shared_ptr<helicsCLI11App> generateCLI() override;
29 virtual bool brokerConnect() override;
30 mutable std::mutex dataMutex;
32};
33
34} // namespace helics
Definition CommsBroker.hpp:21
Definition NetworkBrokerData.hpp:23
Definition NetworkBroker.hpp:18
virtual bool brokerConnect() override
Definition NetworkBroker_impl.hpp:70
std::mutex dataMutex
mutex protecting the configuration information
Definition NetworkBroker.hpp:30
NetworkBrokerData netInfo
structure containing the networking information
Definition NetworkBroker.hpp:31
virtual std::shared_ptr< helicsCLI11App > generateCLI() override
Definition NetworkBroker_impl.hpp:61
virtual std::string generateLocalAddressString() const override
Definition NetworkBroker_impl.hpp:92
the main namespace for the helics co-simulation library User functions will be in the helics namespac...
Definition AsyncFedCallInfo.hpp:14