 |
helics
3.3.0
|
9 #include "../CommsInterface.hpp"
10 #include "gmlc/containers/BlockingQueue.hpp"
11 #include "helics/helics-config.h"
32 std::atomic<bool> shutdown{
false};
33 virtual void queue_rx_function()
override;
34 virtual void queue_tx_function()
override;
41 gmlc::containers::BlockingQueue<ActionMessage> rxMessageQueue;
43 gmlc::containers::BlockingQueue<std::pair<std::pair<int, int>, std::vector<char>>>
46 std::atomic<bool> hasBroker{
false};
47 virtual void closeReceiver()
override;
50 void setBrokerAddress(
const std::string& address);
53 gmlc::containers::BlockingQueue<ActionMessage>& getRxMessageQueue()
55 return rxMessageQueue;
57 gmlc::containers::BlockingQueue<std::pair<std::pair<int, int>, std::vector<char>>>&
60 return txMessageQueue;
std::string brokerTargetAddress
the base for the broker address
Definition: CommsInterface.hpp:125
bool propertyLock()
Definition: CommsInterface.cpp:153
~MpiComms()
Definition: MpiComms.cpp:29
@ processed
the message was used to update the current state
Definition: MpiComms.h:24
Definition: ActionMessage.hpp:30
MpiComms()
Definition: MpiComms.cpp:21
void logError(std::string_view message) const
Definition: CommsInterface.cpp:581
gmlc::containers::BlockingPriorityQueue< std::pair< route_id, ActionMessage > > txQueue
set of messages waiting to be transmitted
Definition: CommsInterface.hpp:155
bool isValidCommand(const ActionMessage &command) noexcept
Definition: ActionMessage.hpp:338
bool isIgnoreableCommand(const ActionMessage &command) noexcept
Definition: ActionMessage.hpp:317
void logMessage(std::string_view message) const
Definition: CommsInterface.cpp:563
std::function< void(ActionMessage &&)> ActionCallback
the callback for what to do with a received message
Definition: CommsInterface.hpp:151
void disconnect()
Definition: CommsInterface.cpp:385
@ TERMINATED
the connection has been TERMINATED
void logWarning(std::string_view message) const
Definition: CommsInterface.cpp:572
std::string localTargetAddress
the base for the receive address
Definition: CommsInterface.hpp:124
std::string prettyPrintString(const ActionMessage &command)
Definition: ActionMessage.cpp:846
Definition: CommsInterface.hpp:25
bool isProtocolCommand(const ActionMessage &command) noexcept
Definition: ActionMessage.hpp:226
the main namespace for the helics co-simulation library User functions will be in the helics namespac...
Definition: AsyncFedCallInfo.hpp:14
@ CONNECTED
we are CONNECTED