helics
3.5.2
|
#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 (std::string_view configureString)=0 |
virtual void | configureFromArgs (int argc, char *argv[])=0 |
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 (std::function< void(int, std::string_view, std::string_view)> logFunction)=0 |
virtual void | setLogFile (std::string_view lfile)=0 |
virtual bool | waitForDisconnect (std::chrono::milliseconds msToWait=std::chrono::milliseconds(0)) const =0 |
virtual std::string | query (std::string_view target, std::string_view queryStr, HelicsSequencingModes mode=HELICS_SEQUENCING_MODE_FAST)=0 |
virtual void | setGlobal (std::string_view valueName, std::string_view value)=0 |
virtual void | sendCommand (std::string_view target, std::string_view commandStr, HelicsSequencingModes mode=HELICS_SEQUENCING_MODE_FAST)=0 |
virtual void | makeConnections (const std::string &file)=0 |
virtual void | linkEndpoints (std::string_view source, std::string_view target)=0 |
virtual void | dataLink (std::string_view source, std::string_view target)=0 |
virtual void | addSourceFilterToEndpoint (std::string_view filter, std::string_view target)=0 |
virtual void | addDestinationFilterToEndpoint (std::string_view filter, std::string_view target)=0 |
virtual void | addAlias (std::string_view interfaceKey, std::string_view alias)=0 |
virtual void | setTimeBarrier (Time barrierTime)=0 |
virtual void | clearTimeBarrier ()=0 |
virtual void | globalError (int32_t errorCode, std::string_view errorString)=0 |
virtual class defining a public interface to a broker
|
default |
default constructor
|
virtualdefault |
destructor
|
pure virtual |
make an alias for an interface, which is a second string that may be used for making connections
interfaceKey | the name of the original interface |
alias | the second name by which it can be used |
Implemented in helics::CoreBroker.
|
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.
|
pure virtual |
initialize from command line arguments
Implemented in helics::CoreBroker.
|
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_STATE and halt the federation
errorCode | the code to use for the ERROR_STATE |
errorString | the ERROR_STATE message to associate with the ERROR_STATE |
Implemented in helics::CoreBroker.
|
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 |
create a data Link between two endpoints sending data from source to destination
source | the name of the endpoint to send from |
target | the name of the endpoint to send the data to |
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 |
send a command to a specific target
the format is somewhat unspecified; target is the name of an object, typically one of "federation","root", "broker", "core", or the name of a specific object/core/broker
target | the specific target of the command |
commandStr | the actual command |
mode | fast (asynchronous; default) means the command 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" or "global_value" 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.