 |
helics
3.0.1
|
9 #include "../NetworkCommsInterface.hpp"
36 void addConnections(
const std::vector<std::string>& newConnections);
38 virtual void setFlag(
const std::string& flag,
bool val)
override;
41 bool outgoingConnectionsAllowed{
43 bool reuse_address{
false};
44 std::vector<std::string> connections;
45 virtual int getDefaultBrokerPort()
const override;
46 virtual void queue_rx_function()
override;
47 virtual void queue_tx_function()
override;
59 size_t dataReceive(
TcpConnection* connection,
const char* data,
size_t bytes_received);
std::string brokerTargetAddress
the base for the broker address
Definition: CommsInterface.hpp:125
bool propertyLock()
Definition: CommsInterface.cpp:153
@ processed
the message was used to update the current state
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
void logWarning(const std::string &message) const
Definition: CommsInterface.cpp:571
void logError(const std::string &message) const
Definition: CommsInterface.cpp:580
thread_generation
Definition: CommsInterface.hpp:30
void addConnection(const std::string &newConn)
Definition: TcpCommsSS.cpp:34
std::atomic< int > PortNumber
port to use for the local connection
Definition: NetworkCommsInterface.hpp:57
std::chrono::milliseconds connectionTimeout
Definition: CommsInterface.hpp:145
TcpCommsSS() noexcept
Definition: TcpCommsSS.cpp:24
std::string getAddress() const
Definition: NetworkCommsInterface.cpp:228
Definition: ActionMessage.hpp:30
Definition: TcpCommsSS.h:26
void addConnections(const std::vector< std::string > &newConnections)
Definition: TcpCommsSS.cpp:42
gmlc::containers::BlockingPriorityQueue< std::pair< route_id, ActionMessage > > txQueue
set of messages waiting to be transmitted
Definition: CommsInterface.hpp:154
asio::io_context & getBaseContext() const
Definition: AsioContextManager.h:116
Definition: AsioContextManager.h:32
~TcpCommsSS()
Definition: TcpCommsSS.cpp:30
std::function< void(ActionMessage &&)> ActionCallback
the callback for what to do with a received message
Definition: CommsInterface.hpp:150
virtual void setFlag(const std::string &flag, bool val) override
Definition: TcpCommsSS.cpp:55
void disconnect()
Definition: CommsInterface.cpp:385
Definition: TcpHelperClasses.h:26
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
bool isDisconnectCommand(const ActionMessage &command) noexcept
Definition: ActionMessage.hpp:276
Definition: CommsInterface.hpp:26
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
const char * actionMessageType(action_message_def::action_t action)
Definition: ActionMessage.cpp:806
bool serverMode
some comms have a server mode and non-server mode
Definition: CommsInterface.hpp:140
std::string makePortAddress(const std::string &networkInterface, int portNumber)
Definition: NetworkBrokerData.cpp:217
virtual void setFlag(const std::string &flag, bool val) override
Definition: NetworkCommsInterface.cpp:177
Definition: NetworkCommsInterface.hpp:18
InterfaceTypes
Definition: NetworkBrokerData.hpp:24
int maxMessageSize
the maximum message size for the queues (if needed)
Definition: CommsInterface.hpp:146
LoopHandle startContextLoop()
Definition: AsioContextManager.cpp:151