helics
3.5.2
|
#include <BrokerApp.hpp>
Public Member Functions | |
BrokerApp ()=default | |
BrokerApp (std::vector< std::string > args) | |
BrokerApp (CoreType ctype, std::vector< std::string > args) | |
BrokerApp (CoreType ctype, const std::string &broker_name, std::vector< std::string > args) | |
BrokerApp (int argc, char *argv[]) | |
BrokerApp (CoreType ctype, int argc, char *argv[]) | |
BrokerApp (CoreType ctype, std::string_view brokerName, int argc, char *argv[]) | |
BrokerApp (std::string_view argString) | |
BrokerApp (CoreType ctype, std::string_view argString=std::string_view{}) | |
BrokerApp (CoreType ctype, std::string_view brokerName, std::string_view argString) | |
BrokerApp (std::shared_ptr< Broker > brk) | |
bool | isConnected () const |
bool | connect () |
bool | isOpenToNewFederates () const |
void | forceTerminate () |
bool | waitForDisconnect (std::chrono::milliseconds waitTime=std::chrono::milliseconds(0)) |
void | linkEndpoints (std::string_view source, std::string_view target) |
void | dataLink (std::string_view source, std::string_view target) |
void | addSourceFilterToEndpoint (std::string_view filter, std::string_view endpoint) |
void | addDestinationFilterToEndpoint (std::string_view filter, std::string_view endpoint) |
void | addAlias (std::string_view interfaceName, std::string_view alias) |
void | makeConnections (const std::string &file) |
const std::string & | getIdentifier () const |
const std::string & | getAddress () const |
std::string | query (std::string_view target, std::string_view queryStr, HelicsSequencingModes mode=HELICS_SEQUENCING_MODE_FAST) |
void | setGlobal (std::string_view valueName, std::string_view value) |
void | sendCommand (std::string_view target, std::string_view commandStr, HelicsSequencingModes mode=HELICS_SEQUENCING_MODE_FAST) |
void | setLogFile (std::string_view logFile) |
void | setLoggingLevel (int loglevel) |
void | reset () |
BrokerApp * | operator-> () |
const BrokerApp * | operator-> () const |
std::shared_ptr< Broker > | getCopyofBrokerPointer () const |
void | setTimeBarrier (Time barrierTime) |
void | clearTimeBarrier () |
void | globalError (int32_t errorCode, std::string_view errorString) |
class implementing a Broker object. This object is meant to a be a very simple broker executor with a similar interface to the other apps
|
default |
default constructor
|
explicit |
construct from command line arguments in a vector
args | the command line arguments to pass in a reverse vector |
References helics::DEFAULT.
helics::BrokerApp::BrokerApp | ( | CoreType | ctype, |
std::vector< std::string > | args | ||
) |
construct from command line arguments in a vector
ctype | the type of broker to create |
args | the command line arguments to pass in a reverse vector |
helics::BrokerApp::BrokerApp | ( | CoreType | ctype, |
const std::string & | broker_name, | ||
std::vector< std::string > | args | ||
) |
construct from command line arguments in a vector
ctype | the type of broker to create |
broker_name | the name of the broker |
args | the command line arguments to pass in a reverse vector |
References helics::MULTI.
helics::BrokerApp::BrokerApp | ( | int | argc, |
char * | argv[] | ||
) |
construct from command line arguments
argc | the number of arguments |
argv | the strings in the input |
References helics::DEFAULT.
helics::BrokerApp::BrokerApp | ( | CoreType | ctype, |
int | argc, | ||
char * | argv[] | ||
) |
construct from command line arguments
ctype | the type of broker to create |
argc | the number of arguments |
argv | the strings in the input |
helics::BrokerApp::BrokerApp | ( | CoreType | ctype, |
std::string_view | brokerName, | ||
int | argc, | ||
char * | argv[] | ||
) |
construct from command line arguments
ctype | the type of broker to create |
brokerName | the name of the broker |
argc | the number of arguments |
argv | the strings in the input |
References helics::MULTI.
|
explicit |
construct from command line arguments parsed as a single string
argString | a merged string with all the arguments |
References helics::BrokerFactory::findBroker().
|
explicit |
construct from command line arguments parsed as a single string
ctype | the type of broker to create |
argString | a merged string with all the arguments |
helics::BrokerApp::BrokerApp | ( | CoreType | ctype, |
std::string_view | brokerName, | ||
std::string_view | argString | ||
) |
construct from command line arguments parsed as a single string
ctype | the type of broker to create |
brokerName | the name of the broker |
argString | a merged string with all the arguments |
References helics::MULTI.
|
explicit |
create a BrokerApp from a broker pointer
void helics::BrokerApp::addAlias | ( | std::string_view | interfaceName, |
std::string_view | alias | ||
) |
add an alias for an interface
void helics::BrokerApp::addDestinationFilterToEndpoint | ( | std::string_view | filter, |
std::string_view | endpoint | ||
) |
add a destination Filter to an endpoint
void helics::BrokerApp::addSourceFilterToEndpoint | ( | std::string_view | filter, |
std::string_view | endpoint | ||
) |
add a source Filter to an endpoint
void helics::BrokerApp::clearTimeBarrier | ( | ) |
clear a global time Barrier
bool helics::BrokerApp::connect | ( | ) |
connect the broker to the network
void helics::BrokerApp::dataLink | ( | std::string_view | source, |
std::string_view | target | ||
) |
link a publication and input
void helics::BrokerApp::forceTerminate | ( | ) |
forcibly disconnect the broker
Referenced by helics::BrokerKeeper::forceTerminate().
const std::string & helics::BrokerApp::getAddress | ( | ) | const |
get the network address of the broker
|
inline |
get a copy of the core pointer
const std::string & helics::BrokerApp::getIdentifier | ( | ) | const |
get the identifier of the broker
void helics::BrokerApp::globalError | ( | int32_t | errorCode, |
std::string_view | errorString | ||
) |
generate a global error that will halt a co-simulation
bool helics::BrokerApp::isConnected | ( | ) | const |
check if the Broker is running
Referenced by helics::BrokerKeeper::isConnected(), and helics::BrokerKeeper::~BrokerKeeper().
bool helics::BrokerApp::isOpenToNewFederates | ( | ) | const |
check if the broker is ready to accept new federates or cores
void helics::BrokerApp::linkEndpoints | ( | std::string_view | source, |
std::string_view | target | ||
) |
link two endpoints source to destination
void helics::BrokerApp::makeConnections | ( | const std::string & | file | ) |
make connections between interfaces with a file
std::string helics::BrokerApp::query | ( | std::string_view | target, |
std::string_view | queryStr, | ||
HelicsSequencingModes | mode = HELICS_SEQUENCING_MODE_FAST |
||
) |
make a query at the broker
target | the target of the query "federation", "parent", "broker", or a specific named object |
queryStr | the query to make |
mode | the ordering mode to use (fast for asynchronous priority channels, and ordered for slower but well ordered queries) |
make a query at the broker
void helics::BrokerApp::reset | ( | ) |
clear the pointer to the broker
void helics::BrokerApp::sendCommand | ( | std::string_view | target, |
std::string_view | commandStr, | ||
HelicsSequencingModes | mode = HELICS_SEQUENCING_MODE_FAST |
||
) |
send a command to a specific target
the format is somewhat unspecified; target is the name of an object, typically one of "federation", "broker", "core", or the name of a specific object/core/broker
target | the specific target of the command |
commandStr | the actual command |
mode | the ordering mode to use (fast for asynchronous priority channels, and ordered for slower but well ordered commands) |
void helics::BrokerApp::setGlobal | ( | std::string_view | valueName, |
std::string_view | value | ||
) |
set a federation global value
this overwrites any previous value for this name globals can be queried with a target of "global" or "global_value" and queryStr of the value to Query
valueName | the name of the global to set |
value | the value of the global |
void helics::BrokerApp::setLogFile | ( | std::string_view | logFile | ) |
set the log file to use for the broker
void helics::BrokerApp::setLoggingLevel | ( | int | loglevel | ) |
set the minimum log level to use in the broker
void helics::BrokerApp::setTimeBarrier | ( | Time | barrierTime | ) |
set a global time Barrier
bool helics::BrokerApp::waitForDisconnect | ( | std::chrono::milliseconds | waitTime = std::chrono::milliseconds(0) | ) |
wait for the broker to normally disconnect for a certain amount of time
Referenced by helics::BrokerKeeper::~BrokerKeeper().