![]() |
helics
3.0.1
|
#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, const std::string &brokerName, int argc, char *argv[]) | |
BrokerApp (const std::string &argString) | |
BrokerApp (CoreType ctype, const std::string &argString=std::string{}) | |
BrokerApp (CoreType ctype, const std::string &brokerName, const std::string &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 (const std::string &source, const std::string &target) |
void | dataLink (const std::string &source, const std::string &target) |
void | addSourceFilterToEndpoint (const std::string &filter, const std::string &endpoint) |
void | addDestinationFilterToEndpoint (const std::string &filter, const std::string &endpoint) |
void | makeConnections (const std::string &file) |
const std::string & | getIdentifier () const |
const std::string & | getAddress () const |
std::string | query (const std::string &target, const std::string &queryStr, HelicsSequencingModes mode=HELICS_SEQUENCING_MODE_FAST) |
void | setGlobal (const std::string &valueName, const std::string &value) |
void | sendCommand (const std::string &target, const std::string &commandStr, HelicsSequencingModes mode=HELICS_SEQUENCING_MODE_FAST) |
void | setLogFile (const std::string &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, const std::string &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, |
const std::string & | 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().
helics::BrokerApp::BrokerApp | ( | CoreType | ctype, |
const std::string & | argString = std::string{} |
||
) |
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, |
const std::string & | brokerName, | ||
const std::string & | 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::addDestinationFilterToEndpoint | ( | const std::string & | filter, |
const std::string & | endpoint | ||
) |
add a destination Filter to an endpoint
void helics::BrokerApp::addSourceFilterToEndpoint | ( | const std::string & | filter, |
const std::string & | 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 | ( | const std::string & | source, |
const std::string & | target | ||
) |
link a publication and input
void helics::BrokerApp::forceTerminate | ( | ) |
forceably 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, |
const std::string & | 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 | ( | const std::string & | source, |
const std::string & | 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 | ( | const std::string & | target, |
const std::string & | 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 | ( | const std::string & | target, |
const std::string & | 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 | ( | const std::string & | valueName, |
const std::string & | 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 | ( | const std::string & | 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().