helics 3.7.0
Loading...
Searching...
No Matches
IpcComms.h
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 "../CommsInterface.hpp"
10
11#include <atomic>
12#include <string>
13
14namespace helics {
15namespace ipc {
17 class IpcComms final: public CommsInterface {
18 public:
20 IpcComms();
22 ~IpcComms();
23
24 virtual void loadNetworkInfo(const NetworkBrokerData& netInfo) override;
25
26 private:
27 std::atomic<int> ipcbackchannel{
28 0};
29 virtual void queue_rx_function() override;
30 virtual void queue_tx_function() override;
31 virtual void closeReceiver() override;
32
33 public:
35 int getPort() const { return -1; }
36
37 std::string getAddress() const;
38 };
39
40#define IPC_BACKCHANNEL_TRY_RESET 2
41#define IPC_BACKCHANNEL_DISCONNECT 4
42
43} // namespace ipc
44} // namespace helics
Definition CommsInterface.hpp:25
Definition NetworkBrokerData.hpp:23
Definition IpcComms.h:17
IpcComms()
Definition IpcComms.cpp:31
int getPort() const
Definition IpcComms.h:35
virtual void loadNetworkInfo(const NetworkBrokerData &netInfo) override
Definition IpcComms.cpp:42
~IpcComms()
Definition IpcComms.cpp:37
the main namespace for the helics co-simulation library User functions will be in the helics namespac...
Definition AsyncFedCallInfo.hpp:14