 |
helics
3.0.1
|
9 #include "../NetworkCommsInterface.hpp"
10 #include "helics/helics-config.h"
33 virtual int getDefaultBrokerPort()
const override;
34 virtual void queue_rx_function()
override;
35 virtual void queue_tx_function()
override;
36 virtual void closeReceiver()
override;
39 std::promise<int> promisePort;
40 std::future<int> futurePort;
std::string brokerTargetAddress
the base for the broker address
Definition: CommsInterface.hpp:125
bool propertyLock()
Definition: CommsInterface.cpp:153
Definition: UdpComms.h:23
InterfaceNetworks
Definition: NetworkBrokerData.hpp:16
@ UDP
use UDP packets to send the data
@ processed
the message was used to update the current state
@ IPV6
use external ipv6 ports
std::pair< std::string, std::string > extractInterfaceandPortString(const std::string &address)
Definition: NetworkBrokerData.cpp:251
static std::shared_ptr< AsioContextManager > getContextPointer(const std::string &contextName=std::string())
Definition: AsioContextManager.cpp:38
@ terminated
the connection has been terminated
void logWarning(const std::string &message) const
Definition: CommsInterface.cpp:571
std::pair< std::string, int > extractInterfaceandPort(const std::string &address)
Definition: NetworkBrokerData.cpp:227
std::atomic< bool > disconnecting
flag indicating that the comm system is in the process of disconnecting
Definition: CommsInterface.hpp:157
UdpComms()
Definition: UdpComms.cpp:25
void logError(const std::string &message) const
Definition: CommsInterface.cpp:580
std::atomic< int > PortNumber
port to use for the local connection
Definition: NetworkCommsInterface.hpp:57
std::string brokerInitString
the initialization string for any automatically generated broker
Definition: CommsInterface.hpp:128
Definition: NetworkBrokerData.hpp:36
std::chrono::milliseconds connectionTimeout
Definition: CommsInterface.hpp:145
ActionMessage generateReplyToIncomingMessage(ActionMessage &cmd)
Definition: NetworkCommsInterface.cpp:194
gmlc::containers::BlockingPriorityQueue< std::pair< route_id, ActionMessage > > txQueue
set of messages waiting to be transmitted
Definition: CommsInterface.hpp:154
bool isValidCommand(const ActionMessage &command) noexcept
Definition: ActionMessage.hpp:317
Definition: AsioContextManager.h:32
bool autoPortNumber
use an automatic port numbering based on broker responses
Definition: NetworkCommsInterface.hpp:58
std::function< void(ActionMessage &&)> ActionCallback
the callback for what to do with a received message
Definition: CommsInterface.hpp:150
@ error
some error occurred on the connection
void disconnect()
Definition: CommsInterface.cpp:385
void transmit(route_id rid, const ActionMessage &cmd)
Definition: CommsInterface.cpp:170
int brokerPort
standardized broker port to use for connection to the brokers
Definition: NetworkCommsInterface.hpp:56
std::string localTargetAddress
the base for the receive address
Definition: CommsInterface.hpp:124
std::string brokerName
the identifier for the broker
Definition: CommsInterface.hpp:126
std::string prettyPrintString(const ActionMessage &command)
Definition: ActionMessage.cpp:841
virtual void loadNetworkInfo(const NetworkBrokerData &netInfo) override
Definition: UdpComms.cpp:34
bool isDisconnectCommand(const ActionMessage &command) noexcept
Definition: ActionMessage.hpp:276
std::atomic< bool > requestDisconnect
flag gets set when disconnect is called
Definition: CommsInterface.hpp:148
virtual void loadNetworkInfo(const NetworkBrokerData &netInfo) override
Definition: NetworkCommsInterface.cpp:77
bool noAckConnection
flag to bypass the connection acknowledge requirement
Definition: NetworkCommsInterface.hpp:61
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
std::string makePortAddress(const std::string &networkInterface, int portNumber)
Definition: NetworkBrokerData.cpp:217
Definition: NetworkCommsInterface.hpp:18
InterfaceTypes
Definition: NetworkBrokerData.hpp:24
~UdpComms()
Definition: UdpComms.cpp:47
@ connected
we are connected
void logMessage(const std::string &message) const
Definition: CommsInterface.cpp:562