 |
helics
2.8.1
|
9 #include "../../core/ActionMessage.hpp"
10 #include "ZmqContextManager.h"
11 #include "cppzmq/zmq.hpp"
12 #include "gmlc/containers/extra/optional.hpp"
43 void addRoutes(
int routeNumber,
const std::string& routeInfo);
63 void SendDelayedMessages();
66 std::map<int, std::unique_ptr<zmq::socket_t>> routes;
67 std::map<int, bool> routes_waiting;
68 std::vector<zmq::pollitem_t> active_routes;
69 std::vector<WaitingResponse> active_messages;
70 std::vector<std::pair<int, ActionMessage>>
72 std::deque<ActionMessage> Responses;
73 std::shared_ptr<ZmqContextManager> ctx;
Definition: ZmqContextManager.h:32
int route
the route identifier for the socket
Definition: ZmqRequestSets.h:26
bool waiting
whether the response is waiting
Definition: ZmqRequestSets.h:28
void to_string(std::string &data) const
Definition: ActionMessage.cpp:383
Definition: ActionMessage.hpp:29
Definition: ZmqRequestSets.h:38
void addRoutes(int routeNumber, const std::string &routeInfo)
Definition: ZmqRequestSets.cpp:18
bool transmit(int routeNumber, const ActionMessage &command)
Definition: ZmqRequestSets.cpp:39
stx::optional< ActionMessage > getMessage()
Definition: ZmqRequestSets.cpp:142
Definition: ZmqRequestSets.h:24
ActionMessage txmsg
the most recently sent message
Definition: ZmqRequestSets.h:29
void close()
Definition: ZmqRequestSets.cpp:131
bool hasMessages() const
Definition: ZmqRequestSets.cpp:61
ZmqRequestSets()
Definition: ZmqRequestSets.cpp:17
the main namespace for the helics co-simulation library User functions will be in the helics namespac...
Definition: AsyncFedCallInfo.hpp:14
bool waiting() const
Definition: ZmqRequestSets.cpp:59
std::uint16_t loops
the number of loops
Definition: ZmqRequestSets.h:27
int checkForMessages()
Definition: ZmqRequestSets.cpp:63