![]() |
helics
3.6.1
|
Classes | |
| class | BrokerBuilder |
| class | BrokerTypeBuilder |
Functions | |
| void | defineBrokerBuilder (std::shared_ptr< BrokerBuilder > builder, std::string_view name, int code) |
| std::shared_ptr< Broker > | makeBroker (CoreType type, std::string_view name) |
| std::shared_ptr< Broker > | create (CoreType type, std::string_view configureString) |
| std::shared_ptr< Broker > | create (CoreType type, std::string_view brokerName, std::string_view configureString) |
| std::shared_ptr< Broker > | create (CoreType type, int argc, char *argv[]) |
| std::shared_ptr< Broker > | create (CoreType type, std::string_view brokerName, int argc, char *argv[]) |
| std::shared_ptr< Broker > | create (CoreType type, std::vector< std::string > args) |
| std::shared_ptr< Broker > | create (CoreType type, std::string_view brokerName, std::vector< std::string > args) |
| std::shared_ptr< Broker > | findBroker (std::string_view brokerName) |
| std::shared_ptr< Broker > | getConnectedBroker () |
| std::shared_ptr< Broker > | getBrokerByIndex (size_t index) |
| std::shared_ptr< Broker > | findJoinableBrokerOfType (CoreType type) |
| std::vector< std::shared_ptr< Broker > > | getAllBrokers () |
| bool | brokersActive () |
| bool | registerBroker (const std::shared_ptr< Broker > &broker, CoreType type) |
| size_t | cleanUpBrokers () |
| size_t | cleanUpBrokers (std::chrono::milliseconds delay) |
| void | terminateAllBrokers () |
| void | abortAllBrokers (int errorCode, std::string_view errorString) |
| bool | copyBrokerIdentifier (std::string_view copyFromName, std::string_view copyToName) |
| void | unregisterBroker (std::string_view name) |
| void | addAssociatedBrokerType (std::string_view name, CoreType type) |
| void | displayHelp (CoreType type) |
| template<class BrokerTYPE > | |
| std::shared_ptr< BrokerBuilder > | addBrokerType (std::string_view brokerTypeName, int code) |
Factory for building Core API instances.
| void helics::BrokerFactory::abortAllBrokers | ( | int | errorCode, |
| std::string_view | errorString | ||
| ) |
abort all brokers
References cleanUpBrokers(), and getAllBrokers().
| void helics::BrokerFactory::addAssociatedBrokerType | ( | std::string_view | name, |
| CoreType | type | ||
| ) |
add a type associated with a broker
| std::shared_ptr<BrokerBuilder> helics::BrokerFactory::addBrokerType | ( | std::string_view | brokerTypeName, |
| int | code | ||
| ) |
template function to create a builder and link it into the library
References defineBrokerBuilder().
| bool helics::BrokerFactory::brokersActive | ( | ) |
check if there are any active Brokers
Referenced by helics::apps::BrokerServer::hasActiveBrokers().
| size_t helics::BrokerFactory::cleanUpBrokers | ( | ) |
clean up unused brokers
when brokers are unregistered they get put in a holding area that gets cleaned up when a new broker is registered or when the clean up function is called this prevents some odd threading issues
Referenced by abortAllBrokers(), helics::cleanupHelicsLibrary(), helicsBrokerFree(), helicsCloseLibrary(), registerBroker(), and terminateAllBrokers().
| size_t helics::BrokerFactory::cleanUpBrokers | ( | std::chrono::milliseconds | delay | ) |
clean up unused brokers
when brokers are unregistered they get put in a holding area that gets cleaned up when a new broker is registered or when the clean up function is called this prevents some odd threading issues
| delay | the number of milliseconds to wait to ensure stuff is cleaned up |
| bool helics::BrokerFactory::copyBrokerIdentifier | ( | std::string_view | copyFromName, |
| std::string_view | copyToName | ||
| ) |
make a copy of the broker pointer to allow access to the new name
Create a broker from command line arguments
References create().
| std::shared_ptr< Broker > helics::BrokerFactory::create | ( | CoreType | type, |
| std::string_view | brokerName, | ||
| std::vector< std::string > | args | ||
| ) |
Create a broker from command line arguments in a vector
References helics::EXTRACT, and registerBroker().
| std::shared_ptr< Broker > helics::BrokerFactory::create | ( | CoreType | type, |
| std::string_view | configureString | ||
| ) |
Creates a Broker object of the specified type.
Invokes initialize() on the instantiated Core object.
Referenced by create(), helicsCreateBroker(), and helicsCreateBrokerFromArgs().
| std::shared_ptr< Broker > helics::BrokerFactory::create | ( | CoreType | type, |
| std::vector< std::string > | args | ||
| ) |
Create a broker from command line arguments in a vector
References create().
| void helics::BrokerFactory::defineBrokerBuilder | ( | std::shared_ptr< BrokerBuilder > | builder, |
| std::string_view | name, | ||
| int | code | ||
| ) |
define a new Broker Builder from the builder give a name and build code
Referenced by addBrokerType().
| void helics::BrokerFactory::displayHelp | ( | CoreType | type = CoreType::UNRECOGNIZED | ) |
display the help listing for a particular CoreType
References helics::DEFAULT, helics::TCP_SS, and helics::UNRECOGNIZED.
| std::shared_ptr< Broker > helics::BrokerFactory::findBroker | ( | std::string_view | brokerName | ) |
locate a coreBroker by name
| brokerName | the name of the broker |
References getBrokerByIndex(), and getConnectedBroker().
Referenced by helics::BrokerApp::BrokerApp(), helics::NetworkBrokerData::commandLineParser(), and helics::CoreBroker::unregister().
try to find a joinable broker of a specific type
| std::vector< std::shared_ptr< Broker > > helics::BrokerFactory::getAllBrokers | ( | ) |
get all available brokers
Referenced by abortAllBrokers(), helics::apps::BrokerServer::forceTerminate(), and terminateAllBrokers().
| std::shared_ptr< Broker > helics::BrokerFactory::getBrokerByIndex | ( | size_t | index | ) |
get a broker by index (0 based)
| index | the index counter value of the broker |
Referenced by findBroker().
| std::shared_ptr< Broker > helics::BrokerFactory::getConnectedBroker | ( | ) |
get the first available Connected broker
Referenced by findBroker().
| bool helics::BrokerFactory::registerBroker | ( | const std::shared_ptr< Broker > & | broker, |
| CoreType | type | ||
| ) |
register a coreBroker so it can be found by others
also cleans up any leftover brokers that were previously unregistered this can be controlled by calling cleanUpBrokers earlier if desired
| broker | a pointer to a Broker object that should be able to be found globally |
| type | the core type associated with a broker |
References cleanUpBrokers().
Referenced by create().
| void helics::BrokerFactory::terminateAllBrokers | ( | ) |
terminate all running Brokers
References cleanUpBrokers(), and getAllBrokers().
| void helics::BrokerFactory::unregisterBroker | ( | std::string_view | name | ) |
remove a broker from the registry
| name | the name of the broker to unregister |
Referenced by helics::CoreBroker::unregister().