![]() |
helics
2.8.1
|
#include <MpiComms.h>
Inheritance diagram for helics::mpi::MpiComms:Public Member Functions | |
| MpiComms () | |
| ~MpiComms () | |
| void | setBrokerAddress (const std::string &address) |
| std::string | getAddress () |
| gmlc::containers::BlockingQueue< ActionMessage > & | getRxMessageQueue () |
| gmlc::containers::BlockingQueue< std::pair< std::pair< int, int >, std::vector< char > > > & | getTxMessageQueue () |
Public Member Functions inherited from helics::CommsInterface | |
| CommsInterface ()=default | |
| CommsInterface (thread_generation threads) | |
| virtual | ~CommsInterface () |
| virtual void | loadNetworkInfo (const NetworkBrokerData &netInfo) |
| void | loadTargetInfo (const std::string &localTarget, const std::string &brokerTarget, interface_networks targetNetwork=interface_networks::local) |
| void | transmit (route_id rid, const ActionMessage &cmd) |
| void | transmit (route_id rid, ActionMessage &&cmd) |
| void | addRoute (route_id rid, const std::string &routeInfo) |
| void | removeRoute (route_id rid) |
| bool | connect () |
| void | disconnect () |
| bool | reconnect () |
| void | setName (const std::string &commName) |
| void | setRequireBrokerConnection (bool requireBrokerConnection) |
| void | setCallback (std::function< void(ActionMessage &&)> callback) |
| void | setLoggingCallback (std::function< void(int level, const std::string &name, const std::string &message)> callback) |
| void | setMessageSize (int maxMsgSize, int maxCount) |
| bool | isConnected () const |
| void | setTimeout (std::chrono::milliseconds timeOut) |
| virtual void | setFlag (const std::string &flag, bool val) |
| void | setServerMode (bool serverActive) |
| void | logWarning (const std::string &message) const |
| void | logError (const std::string &message) const |
| void | logMessage (const std::string &message) const |
Additional Inherited Members | |
Public Types inherited from helics::CommsInterface | |
| enum | thread_generation { single, dual } |
Protected Types inherited from helics::CommsInterface | |
| enum | connection_status : int { connection_status::startup = -1, connection_status::connected = 0, connection_status::reconnecting = 1, connection_status::terminated = 2, connection_status::error = 4 } |
Protected Member Functions inherited from helics::CommsInterface | |
| void | setTxStatus (connection_status txStatus) |
| void | setRxStatus (connection_status rxStatus) |
| connection_status | getRxStatus () const |
| connection_status | getTxStatus () const |
| bool | propertyLock () |
| void | propertyUnLock () |
| void | join_tx_rx_thread () |
| const std::string & | getRandomID () const |
Protected Attributes inherited from helics::CommsInterface | |
| gmlc::concurrency::TriggerVariable | rxTrigger |
| std::string | name |
| the name of the object | |
| std::string | localTargetAddress |
| the base for the receive address | |
| std::string | brokerTargetAddress |
| the base for the broker address | |
| std::string | brokerName |
| the identifier for the broker | |
| std::string | brokerInitString |
| the initialization string for any automatically generated broker | |
| bool | mRequireBrokerConnection |
| specify that the comms should assume we have a broker More... | |
| bool | serverMode {true} |
| some comms have a server mode and non-server mode | |
| bool | autoBroker {false} |
| the broker should be automatically generated if needed | |
| bool | useJsonSerialization {false} |
| true to make all connections use JSON serialization | |
| std::chrono::milliseconds | connectionTimeout {4000} |
| int | maxMessageSize = 16 * 1024 |
| the maximum message size for the queues (if needed) | |
| int | maxMessageCount = 512 |
| the maximum number of message to buffer (if needed) | |
| std::atomic< bool > | requestDisconnect {false} |
| flag gets set when disconnect is called | |
| std::function< void(ActionMessage &&)> | ActionCallback |
| the callback for what to do with a received message | |
| std::function< void(int level, const std::string &name, const std::string &message)> | loggingCallback |
| callback for logging | |
| gmlc::containers::BlockingPriorityQueue< std::pair< route_id, ActionMessage > > | txQueue |
| set of messages waiting to be transmitted | |
| std::atomic< bool > | disconnecting |
| flag indicating that the comm system is in the process of disconnecting More... | |
| interface_networks | interfaceNetwork = interface_networks::local |
implementation for the communication interface that uses MPI to communicate
| helics::mpi::MpiComms::MpiComms | ( | ) |
default constructor
References helics::CommsInterface::localTargetAddress, and helics::CommsInterface::logMessage().
| helics::mpi::MpiComms::~MpiComms | ( | ) |
destructor
References helics::CommsInterface::disconnect().
1.8.17