![]() |
helics
3.0.1
|
#include <MpiBroker.h>
Public Member Functions | |
MpiBroker (bool rootBroker=false) noexcept | |
MpiBroker (const std::string &broker_name) | |
virtual | ~MpiBroker () |
virtual std::string | generateLocalAddressString () const override |
![]() | |
CommsBroker () noexcept | |
CommsBroker (bool arg) noexcept | |
CommsBroker (const std::string &obj_name) | |
~CommsBroker () | |
virtual void | transmit (route_id rid, const ActionMessage &cmd) override |
virtual void | transmit (route_id rid, ActionMessage &&cmd) override |
virtual void | addRoute (route_id rid, int interfaceId, const std::string &routeInfo) override |
virtual void | removeRoute (route_id rid) override |
MpiComms * | getCommsObjectPointer () |
![]() | |
virtual bool | connect () override final |
virtual void | disconnect () override final |
void | unregister () |
virtual void | processDisconnect (bool skipUnregister=false) override final |
virtual bool | isConnected () const override final |
virtual void | setAsRoot () override final |
virtual bool | isRoot () const override final |
virtual bool | isOpenToNewFederates () const override |
virtual void | setLoggingCallback (const std::function< void(int, std::string_view, std::string_view)> &logFunction) override final |
virtual bool | waitForDisconnect (std::chrono::milliseconds msToWait=std::chrono::milliseconds(0)) const override final |
virtual void | setTimeBarrier (Time barrierTime) override final |
virtual void | clearTimeBarrier () override final |
virtual void | globalError (int32_t errorCode, const std::string &errorString) override final |
CoreBroker (bool setAsRootBroker=false) noexcept | |
CoreBroker (const std::string &broker_name) | |
virtual | ~CoreBroker () |
virtual void | configure (const std::string &configureString) override final |
virtual void | configureFromArgs (int argc, char *argv[]) override final |
virtual void | configureFromVector (std::vector< std::string > args) override final |
bool | allInitReady () const |
connection_state | getAllConnectionState () const |
void | setIdentifier (const std::string &name) |
virtual const std::string & | getIdentifier () const override final |
virtual const std::string & | getAddress () const override final |
virtual void | setLoggingLevel (int logLevel) override final |
virtual void | setLogFile (const std::string &lfile) override final |
virtual std::string | query (const std::string &target, const std::string &queryStr, HelicsSequencingModes mode=HELICS_SEQUENCING_MODE_FAST) override final |
virtual void | setGlobal (const std::string &valueName, const std::string &value) override final |
virtual void | sendCommand (const std::string &target, const std::string &commandStr, HelicsSequencingModes mode) override final |
virtual void | makeConnections (const std::string &file) override final |
virtual void | linkEndpoints (const std::string &source, const std::string &target) override final |
virtual void | dataLink (const std::string &publication, const std::string &input) override final |
virtual void | addSourceFilterToEndpoint (const std::string &filter, const std::string &endpoint) override final |
virtual void | addDestinationFilterToEndpoint (const std::string &filter, const std::string &endpoint) override final |
![]() | |
Broker ()=default | |
virtual | ~Broker ()=default |
![]() | |
BrokerBase (bool DisableQueue=false) noexcept | |
BrokerBase (const std::string &broker_name, bool DisableQueue=false) | |
int | parseArgs (int argc, char *argv[]) |
int | parseArgs (std::vector< std::string > args) |
int | parseArgs (const std::string &initializationString) |
virtual void | configureBase () |
void | addActionMessage (const ActionMessage &m) |
void | addActionMessage (ActionMessage &&m) |
void | setLoggerFunction (std::function< void(int level, std::string_view identifier, std::string_view message)> logFunction) |
void | logFlush () |
bool | isRunning () const |
void | setLogLevel (int32_t level) |
void | setLogLevels (int32_t consoleLevel, int32_t fileLevel) |
GlobalBrokerId | getGlobalId () const |
std::function< void(int, const std::string &, const std::string &)> | getLoggingCallback () const |
void | joinAllThreads () |
std::size_t | currentMessageCounter () const |
Static Public Member Functions | |
static void | displayHelp (bool local_only=false) |
Protected Member Functions | |
virtual std::shared_ptr< helicsCLI11App > | generateCLI () override |
![]() | |
void | setTickForwarding (TickForwardingReasons reason, bool value=true) |
BrokerState | getBrokerState () const |
bool | setBrokerState (BrokerState newState) |
bool | transitionBrokerState (BrokerState expectedState, BrokerState newState) |
virtual bool | sendToLogger (GlobalFederateId federateID, int logLevel, std::string_view name, std::string_view message) const |
void | saveProfilingData (std::string_view message) |
void | writeProfilingData () |
void | generateNewIdentifier () |
void | setErrorState (int eCode, std::string_view estring) |
void | setLoggingFile (const std::string &lfile) |
bool | getFlagValue (int32_t flag) const |
virtual double | getSimulationTime () const |
Additional Inherited Members | |
![]() | |
enum | BrokerState : int16_t { BrokerState::created = -6, BrokerState::configuring = -5, BrokerState::configured = -4, BrokerState::connecting = -3, BrokerState::connected = -2, BrokerState::initializing = -1, BrokerState::operating = 0, BrokerState::terminating = 1, BrokerState::terminated = 3, BrokerState::errored = 7 } |
enum | TickForwardingReasons : uint32_t { NONE = 0, NO_COMMS = 0x01, PING_RESPONSE = 0x02, QUERY_TIMEOUT = 0x04 } |
![]() | |
static bool | isReasonForTick (std::uint32_t code, TickForwardingReasons reason) |
![]() | |
std::atomic< int > | disconnectionStage |
the stage of disconnection | |
std::unique_ptr< MpiComms > | comms |
the actual comms object | |
std::atomic< bool > | brokerInitialized |
atomic protecting local initialization | |
![]() | |
bool | _gateway = false |
set to true if this broker should act as a gateway. | |
![]() | |
std::atomic< GlobalBrokerId > | global_id {parent_broker_id} |
GlobalBrokerId | global_broker_id_local {} |
GlobalBrokerId | higher_broker_id {0} |
the id code of the broker 1 level about this broker | |
std::atomic< int32_t > | maxLogLevel {HELICS_LOG_LEVEL_WARNING} |
int32_t | consoleLogLevel {HELICS_LOG_LEVEL_WARNING} |
the logging level for console display | |
int32_t | fileLogLevel {HELICS_LOG_LEVEL_WARNING} |
the logging level for logging to a file | |
int32_t | minFederateCount {1} |
int32_t | minBrokerCount {0} |
int32_t | maxFederateCount {(std::numeric_limits<int32_t>::max)()} |
int32_t | maxBrokerCount {(std::numeric_limits<int32_t>::max)()} |
int32_t | minChildCount {0} |
int32_t | maxIterationCount {10000} |
the maximum number of iterative loops that are allowed | |
Time | tickTimer {5.0} |
the length of each heartbeat tick | |
Time | timeout {30.0} |
timeout to wait to establish a broker connection before giving up | |
Time | networkTimeout {-1.0} |
timeout to establish a socket connection before giving up | |
Time | queryTimeout {15.0} |
Time | errorDelay {10.0} |
time to delay before terminating after error state | |
Time | grantTimeout {-1.0} |
timeout for triggering diagnostic action waiting for a time grant | |
std::string | identifier |
an identifier for the broker | |
std::string | brokerKey |
std::string | address |
network location of the broker | |
std::shared_ptr< spdlog::logger > | consoleLogger |
default logging object to use if the logging callback is not specified | |
std::shared_ptr< spdlog::logger > | fileLogger |
default logging object to use if the logging callback is not specified | |
std::thread | queueProcessingThread |
thread for running the broker | |
std::function< void(int, std::string_view, std::string_view)> | loggerFunction |
std::atomic< bool > | haltOperations {false} |
flag indicating that no further message should be processed | |
bool | restrictive_time_policy {false} |
flag indicating the broker should use a conservative time policy | |
bool | terminate_on_error {false} |
flag indicating that the federation should halt on any error | |
bool | debugging {false} |
flag indicating operation in a user debugging mode | |
bool | observer {false} |
flag indicating that the broker is an observer only | |
std::string | logFile |
the file to log message to | |
std::unique_ptr< ForwardingTimeCoordinator > | timeCoord |
object managing the time control | |
gmlc::containers::BlockingPriorityQueue< ActionMessage > | actionQueue |
primary routing queue | |
bool | noAutomaticID {false} |
the broker should not automatically generate an ID | |
bool | hasTimeDependency {false} |
set to true if the broker has Time dependencies | |
bool | enteredExecutionMode |
flag indicating that the broker has entered execution mode More... | |
bool | waitingForBrokerPingReply {false} |
flag indicating we are waiting for a ping reply | |
bool | hasFilters {false} |
flag indicating filters come through the broker | |
bool | no_ping {false} |
indicator that the broker is not very responsive to ping requests | |
bool | uuid_like {false} |
will be set to true if the name looks like a uuid | |
bool | useJsonSerialization {false} |
bool | enable_profiling {false} |
indicator that profiling is enabled | |
decltype(std::chrono::steady_clock::now()) | errorTimeStart |
time when the error condition started related to the errorDelay | |
std::atomic< int > | lastErrorCode {0} |
storage for last error code | |
std::string | lastErrorString |
storage for last error string | |
![]() | |
static constexpr double | mInvalidSimulationTime {-98763.2} |
broker object implementing mpi communications for HELICS
|
explicitnoexcept |
default constructor
|
virtual |
destructor
References helics::CoreBroker::getAddress().
|
overrideprotectedvirtual |
generate a CLI11 Application for subprocesses for processing of command line arguments
Reimplemented from helics::CoreBroker.
References helics::CoreBroker::generateCLI().
|
overridevirtual |
generate the local address information
Implements helics::BrokerBase.
References helics::CommsBroker< MpiComms, CoreBroker >::comms.