helics  3.0.1
ZmqBroker.h
1 /*
2 Copyright (c) 2017-2021,
3 Battelle Memorial Institute; Lawrence Livermore National Security, LLC; Alliance for Sustainable
4 Energy, LLC. See the top-level NOTICE for additional details. All rights reserved.
5 SPDX-License-Identifier: BSD-3-Clause
6 */
7 #pragma once
8 #include "../NetworkBroker.hpp"
9 
10 #include <string>
11 namespace helics {
12 namespace zeromq {
13  class ZmqComms;
14  class ZmqCommsSS;
15 
17  class ZmqBroker final: public NetworkBroker<ZmqComms, InterfaceTypes::TCP, 1> {
18  public:
20  explicit ZmqBroker(bool rootbroker = false) noexcept;
22  explicit ZmqBroker(const std::string& brokerName);
23 
24  private:
25  virtual bool brokerConnect() override;
26  };
27 
28  class ZmqCommsSS;
30  class ZmqBrokerSS final: public NetworkBroker<ZmqCommsSS, InterfaceTypes::TCP, 1> {
31  public:
33  explicit ZmqBrokerSS(bool rootbroker = false) noexcept;
35  explicit ZmqBrokerSS(const std::string& broker_name);
36 
37  private:
38  virtual bool brokerConnect() override;
39  };
40 
41 } // namespace zeromq
42 } // namespace helics
helics::zeromq::ZmqBrokerSS
Definition: ZmqBroker.h:30
helics::NetworkBroker
Definition: NetworkBroker.hpp:18
ZmqContextManager::startContext
static void startContext(const std::string &contextName=std::string{})
Definition: ZmqContextManager.cpp:58
helics::NetworkBroker::brokerConnect
virtual bool brokerConnect() override
Definition: NetworkBroker_impl.hpp:70
helics::zeromq::ZmqCommsSS
Definition: ZmqCommsSS.h:26
helics::zeromq::ZmqBroker
Definition: ZmqBroker.h:17
helics::zeromq::ZmqBroker::ZmqBroker
ZmqBroker(bool rootbroker=false) noexcept
Definition: ZmqBroker.cpp:19
helics
the main namespace for the helics co-simulation library User functions will be in the helics namespac...
Definition: AsyncFedCallInfo.hpp:14
helics::NetworkBrokerData::server_mode
ServerModeOptions server_mode
setup a server mode
Definition: NetworkBrokerData.hpp:70
helics::zeromq::ZmqBrokerSS::ZmqBrokerSS
ZmqBrokerSS(bool rootbroker=false) noexcept
Definition: ZmqBroker.cpp:35
helics::NetworkBroker< ZmqComms, InterfaceTypes::TCP, 1 >::netInfo
NetworkBrokerData netInfo
structure containing the networking information
Definition: NetworkBroker.hpp:31