|
| Broker () HELICS_NOTHROW |
|
| Broker (std::string type, std::string name, std::string initString) |
|
| Broker (std::string type, std::string name, int argc, char **argv) |
|
| Broker (const Broker &brk) |
|
Broker & | operator= (const Broker &brk) |
|
virtual | ~Broker () |
|
| operator HelicsBroker () |
|
HelicsBroker | baseObject () const |
|
bool | isConnected () const |
|
bool | waitForDisconnect (int msToWait=-1) |
|
void | disconnect () |
|
const char * | getIdentifier () const |
|
const char * | getAddress () const |
|
void | setGlobal (const std::string &valueName, const std::string &value) |
|
void | addAlias (const std::string &interfaceName, const std::string &alias) |
|
void | dataLink (const std::string &source, const std::string &target) |
|
void | addSourceFilterToEndpoint (const std::string &filter, const std::string &target) |
|
void | addDestinationFilterToEndpoint (const std::string &filter, const std::string &target) |
|
std::string | query (const std::string &target, const std::string &queryStr, HelicsSequencingModes mode=HELICS_SEQUENCING_MODE_FAST) const |
|
void | sendCommand (const std::string &target, const std::string &command) |
|
void | setTimeBarrier (HelicsTime barrierTime) |
|
void | clearTimeBarrier () |
|
void | globalError (int errorCode, const std::string &errorString) |
|
◆ Broker() [1/4]
helicscpp::Broker::Broker |
( |
| ) |
|
|
inline |
◆ Broker() [2/4]
helicscpp::Broker::Broker |
( |
std::string |
type, |
|
|
std::string |
name, |
|
|
std::string |
initString |
|
) |
| |
|
inline |
◆ Broker() [3/4]
helicscpp::Broker::Broker |
( |
std::string |
type, |
|
|
std::string |
name, |
|
|
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
|
inline |
construct broker
- Parameters
-
type | string with the type of the broker to create |
name | the name of the broker |
argc | the number of command line arguments |
argv | command line argument strings |
References broker, and helicsCreateBrokerFromArgs().
◆ Broker() [4/4]
helicscpp::Broker::Broker |
( |
const Broker & |
brk | ) |
|
|
inline |
◆ ~Broker()
virtual helicscpp::Broker::~Broker |
( |
| ) |
|
|
inlinevirtual |
◆ addAlias()
void helicscpp::Broker::addAlias |
( |
const std::string & |
interfaceName, |
|
|
const std::string & |
alias |
|
) |
| |
|
inline |
add a global alias for an interface
- Parameters
-
interfaceName | the given name of the interface |
alias | the new name by which the interface can be referenced |
References broker, and helicsBrokerAddAlias().
◆ addDestinationFilterToEndpoint()
void helicscpp::Broker::addDestinationFilterToEndpoint |
( |
const std::string & |
filter, |
|
|
const std::string & |
target |
|
) |
| |
|
inline |
◆ addSourceFilterToEndpoint()
void helicscpp::Broker::addSourceFilterToEndpoint |
( |
const std::string & |
filter, |
|
|
const std::string & |
target |
|
) |
| |
|
inline |
create a filter connection between a named filter and a named endpoint for messages coming from that endpoint
- Parameters
-
filter | the name of the filter |
target | the name of the source target |
References broker, and helicsBrokerAddSourceFilterToEndpoint().
◆ baseObject()
get the underlying HelicsBroker object
- Returns
- a HelicsBroker object
References broker.
◆ dataLink()
void helicscpp::Broker::dataLink |
( |
const std::string & |
source, |
|
|
const std::string & |
target |
|
) |
| |
|
inline |
create a data link between a named publication and a named input
- Parameters
-
source | the name of the publication |
target | the name of the input |
References broker, and helicsBrokerDataLink().
◆ disconnect()
void helicscpp::Broker::disconnect |
( |
| ) |
|
|
inline |
◆ getAddress()
const char* helicscpp::Broker::getAddress |
( |
| ) |
const |
|
inline |
◆ getIdentifier()
const char* helicscpp::Broker::getIdentifier |
( |
| ) |
const |
|
inline |
◆ isConnected()
bool helicscpp::Broker::isConnected |
( |
| ) |
const |
|
inline |
◆ operator HelicsBroker()
cast to the underlying broker
References broker.
◆ operator=()
◆ query()
make a query of the broker
this call is blocking until the value is returned which may take some time depending on the size of the federation and the specific string being queried
- Parameters
-
target | the target of the query can be "federation", "federate", "broker", "core", or a specific name of a federate, core, or broker |
queryStr | a string with the query, see other documentation for specific properties to query, can be defined by the federate |
mode | the ordering mode to use for the query (fast for priority channels, ordered for normal channels ordered with all other messages) |
- Returns
- a string with the value requested. this is either going to be a vector of strings value or a JSON string stored in the first element of the vector. The string "#invalid" is returned if the query was not valid
References broker, HELICS_SEQUENCING_MODE_FAST, helicsCreateQuery(), helicsQueryBrokerExecute(), helicsQueryFree(), and helicsQuerySetOrdering().
◆ sendCommand()
void helicscpp::Broker::sendCommand |
( |
const std::string & |
target, |
|
|
const std::string & |
command |
|
) |
| |
|
inline |
send an asynchronous command to another object
- Parameters
-
target | the name of the target of the command |
command | the command message to send |
References broker, and helicsBrokerSendCommand().
◆ setGlobal()
void helicscpp::Broker::setGlobal |
( |
const std::string & |
valueName, |
|
|
const std::string & |
value |
|
) |
| |
|
inline |
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 "global_value" will return the string directly. "global" will return the value and name in a JSON structure
- Parameters
-
valueName | the name of the global to set |
value | the value of the global |
References broker, and helicsBrokerSetGlobal().
◆ waitForDisconnect()
bool helicscpp::Broker::waitForDisconnect |
( |
int |
msToWait = -1 | ) |
|
|
inline |
waits in the current thread until the broker is disconnected
- Parameters
-
msToWait | the timeout to wait for disconnect (-1) implies no timeout |
- Returns
- true if the disconnect was successful false if it timed out
References broker, HELICS_FALSE, and helicsBrokerWaitForDisconnect().
The documentation for this class was generated from the following file: