![]() |
helics
2.8.1
|
#include <Broker.hpp>
Public Member Functions | |
Broker ()=default | |
virtual | ~Broker ()=default |
virtual bool | connect ()=0 |
virtual void | disconnect ()=0 |
virtual bool | isConnected () const =0 |
virtual void | setAsRoot ()=0 |
virtual bool | isRoot () const =0 |
virtual bool | isOpenToNewFederates () const =0 |
virtual void | configure (const std::string &configureString)=0 |
virtual void | configureFromArgs (int argc, char *argv[])=0 |
void | initialize (const std::string &configureString) |
void | initializeFromArgs (int argc, char *argv[]) |
virtual void | configureFromVector (std::vector< std::string > args)=0 |
virtual const std::string & | getIdentifier () const =0 |
virtual const std::string & | getAddress () const =0 |
virtual void | setLoggingLevel (int logLevel)=0 |
virtual void | setLoggingCallback (const std::function< void(int, const std::string &, const std::string &)> &logFunction)=0 |
virtual void | setLogFile (const std::string &lfile)=0 |
virtual bool | waitForDisconnect (std::chrono::milliseconds msToWait=std::chrono::milliseconds(0)) const =0 |
virtual std::string | query (const std::string &target, const std::string &queryStr, helics_sequencing_mode mode=helics_sequencing_mode_fast)=0 |
virtual void | setGlobal (const std::string &valueName, const std::string &value)=0 |
virtual void | makeConnections (const std::string &file)=0 |
virtual void | dataLink (const std::string &source, const std::string &target)=0 |
virtual void | addSourceFilterToEndpoint (const std::string &filter, const std::string &target)=0 |
virtual void | addDestinationFilterToEndpoint (const std::string &filter, const std::string &target)=0 |
virtual void | setTimeBarrier (Time barrierTime)=0 |
virtual void | clearTimeBarrier ()=0 |
virtual void | globalError (int32_t errorCode, const std::string &errorString)=0 |
virtual class defining a public interface to a broker
|
default |
default constructor
|
virtualdefault |
destructor
|
pure virtual |
create a filter connection between a named filter and a named endpoint for destination processing
filter | the name of the filter |
target | the name of the source target |
Implemented in helics::CoreBroker.
|
pure virtual |
create a filter connection between a named filter and a named endpoint for messages coming from that endpoint
filter | the name of the filter |
target | the name of the source target |
Implemented in helics::CoreBroker.
|
pure virtual |
update a time barrier with a new time
Implemented in helics::CoreBroker.
|
pure virtual |
start up the broker with an initialization string containing commands and parameters
Implemented in helics::CoreBroker.
Referenced by initialize().
|
pure virtual |
initialize from command line arguments
Implemented in helics::CoreBroker.
Referenced by initializeFromArgs().
|
pure virtual |
Initialize the Broker from command line arguments contained in a vector Should be invoked a single time to initialize the co-simulation broker.
Implemented in helics::CoreBroker.
|
pure virtual |
connect the core to its broker
should be done after initialization has complete
Implemented in helics::CoreBroker.
|
pure virtual |
create a data Link between a named publication and a named input
source | the name of the publication |
target | the name of the input |
Implemented in helics::CoreBroker.
|
pure virtual |
disconnect the broker from any other brokers and communications
Implemented in helics::CoreBroker.
|
pure virtual |
get the connection address for the broker
Implemented in helics::CoreBroker.
|
pure virtual |
get the local identification for the broker
Implemented in helics::CoreBroker.
|
pure virtual |
generate a global error and halt the federation
errorCode | the code to use for the error |
errorString | the error message to associate with the error |
Implemented in helics::CoreBroker.
|
inline |
start up the broker with an initialization string containing commands and parameters
References configure().
|
inline |
initialize from command line arguments
References configureFromArgs().
|
pure virtual |
check if the broker is connected
Implemented in helics::CoreBroker.
|
pure virtual |
check if the broker is ready to accept new federates or cores
Implemented in helics::CoreBroker.
|
pure virtual |
return true if the broker is a root broker
Implemented in helics::CoreBroker.
|
pure virtual |
load a file containing connection information
file | a JSON or TOML file containing connection information |
Implemented in helics::CoreBroker.
|
pure virtual |
make a query for information from the co-simulation
the format is somewhat unspecified target is the name of an object typically one of "federation", "broker", or the name of a specific object query is a broken
target | the specific target of the query |
queryStr | the actual query |
mode | fast (asynchronous; default) means the query goes on priority channels, ordered (synchronous) is slower but has more ordering guarantees |
Implemented in helics::CoreBroker.
|
pure virtual |
set the broker to be a root broker
only valid before the initialization function is called
Implemented in helics::CoreBroker.
|
pure virtual |
set a federation global value
this overwrites any previous value for this name globals can be queried with a target of "global" and queryStr of the value to Query
valueName | the name of the global to set |
value | the value of the global |
Implemented in helics::CoreBroker.
|
pure virtual |
set the broker logging file
Implemented in helics::CoreBroker.
|
pure virtual |
set the logging callback function
logFunction | a function with a signature of void(int level, const std::string &source, const std::string &message) the function takes a level indicating the logging level string with the source name and a string with the message |
Implemented in helics::CoreBroker.
|
pure virtual |
set the broker logging level
Implemented in helics::CoreBroker.
|
pure virtual |
update a time barrier with a new time
Implemented in helics::CoreBroker.
|
pure virtual |
waits in the current thread until the broker is disconnected
msToWait | the timeout to wait for disconnect |
Implemented in helics::CoreBroker.