![]() |
helics
2.8.1
|
#include <CoreApp.hpp>
Public Member Functions | |
CoreApp ()=default | |
CoreApp (std::vector< std::string > args) | |
CoreApp (core_type ctype, std::vector< std::string > args) | |
CoreApp (core_type ctype, const std::string &coreName, std::vector< std::string > args) | |
CoreApp (int argc, char *argv[]) | |
CoreApp (core_type ctype, const std::string &coreName, int argc, char *argv[]) | |
CoreApp (core_type ctype, int argc, char *argv[]) | |
CoreApp (const std::string &argString) | |
CoreApp (core_type ctype, const std::string &argString) | |
CoreApp (core_type ctype, const std::string &coreName, const std::string &argString) | |
CoreApp (std::shared_ptr< Core > cr) | |
bool | isConnected () const |
bool | connect () |
bool | isOpenToNewFederates () const |
void | forceTerminate () |
bool | waitForDisconnect (std::chrono::milliseconds waitTime=std::chrono::milliseconds(0)) |
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, helics_sequencing_mode mode=helics_sequencing_mode_fast) |
void | setGlobal (const std::string &valueName, const std::string &value) |
void | setLogFile (const std::string &logFile) |
void | setLoggingLevel (int loglevel) |
void | setReadyToInit () |
void | haltInit () |
CoreApp * | operator-> () |
const CoreApp * | operator-> () const |
std::shared_ptr< Core > | getCopyofCorePointer () const |
void | reset () |
void | globalError (int32_t errorCode, const std::string &errorString) |
class implementing a Core object. This object is meant to a be a very simple core 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::CoreApp::CoreApp | ( | core_type | ctype, |
std::vector< std::string > | args | ||
) |
construct from command line arguments in a vector
ctype | the type of core to create |
args | the command line arguments to pass in a reverse vector |
helics::CoreApp::CoreApp | ( | core_type | ctype, |
const std::string & | coreName, | ||
std::vector< std::string > | args | ||
) |
construct from command line arguments in a vector
ctype | the type of core to create |
coreName | the name of the core to use |
args | the command line arguments to pass in a reverse vector |
helics::CoreApp::CoreApp | ( | int | argc, |
char * | argv[] | ||
) |
construct from command line arguments
argc | the number of arguments |
argv | the strings in the input |
References helics::DEFAULT.
helics::CoreApp::CoreApp | ( | core_type | ctype, |
const std::string & | coreName, | ||
int | argc, | ||
char * | argv[] | ||
) |
construct from command line arguments
ctype | the type of core to create |
coreName | the name of the core to use |
argc | the number of arguments |
argv | the strings in the input |
helics::CoreApp::CoreApp | ( | core_type | ctype, |
int | argc, | ||
char * | argv[] | ||
) |
construct from command line arguments
ctype | the type of core to create |
argc | the number of arguments |
argv | the strings in the input |
|
explicit |
construct from command line arguments parsed as a single string
argString | a merged string with all the arguments |
References helics::CoreFactory::findCore().
helics::CoreApp::CoreApp | ( | core_type | ctype, |
const std::string & | argString | ||
) |
construct from command line arguments parsed as a single string
ctype | the type of core to create |
argString | a merged string with all the arguments |
helics::CoreApp::CoreApp | ( | core_type | ctype, |
const std::string & | coreName, | ||
const std::string & | argString | ||
) |
construct from command line arguments parsed as a single string
ctype | the type of core to create |
coreName | the name of the core to use or create |
argString | a merged string with all the arguments |
|
explicit |
create a CoreApp from a core pointer
void helics::CoreApp::addDestinationFilterToEndpoint | ( | const std::string & | filter, |
const std::string & | endpoint | ||
) |
add a destination Filter to an endpoint
void helics::CoreApp::addSourceFilterToEndpoint | ( | const std::string & | filter, |
const std::string & | endpoint | ||
) |
add a source Filter to an endpoint
bool helics::CoreApp::connect | ( | ) |
connect the Core to its broker
void helics::CoreApp::dataLink | ( | const std::string & | source, |
const std::string & | target | ||
) |
link a publication and input
void helics::CoreApp::forceTerminate | ( | ) |
forceably disconnect the core
Referenced by helics::CoreKeeper::forceTerminate().
const std::string & helics::CoreApp::getAddress | ( | ) | const |
get the network address of the core
|
inline |
get a copy of the core pointer
Referenced by helics::make_cloning_filter(), and helics::make_filter().
const std::string & helics::CoreApp::getIdentifier | ( | ) | const |
get the identifier of the core
void helics::CoreApp::globalError | ( | int32_t | errorCode, |
const std::string & | errorString | ||
) |
generate a global error on a core
References helics::local_core_id().
void helics::CoreApp::haltInit | ( | ) |
tell the core to pause init even if otherwise ready
References helics_flag_delay_init_entry, and helics::local_core_id().
bool helics::CoreApp::isConnected | ( | ) | const |
check if the Core is running
Referenced by helics::CoreKeeper::isConnected(), and helics::CoreKeeper::~CoreKeeper().
bool helics::CoreApp::isOpenToNewFederates | ( | ) | const |
check if the broker is ready to accept new federates or cores
void helics::CoreApp::makeConnections | ( | const std::string & | file | ) |
make connections from a core using a file
std::string helics::CoreApp::query | ( | const std::string & | target, |
const std::string & | queryStr, | ||
helics_sequencing_mode | mode = helics_sequencing_mode_fast |
||
) |
make a query at the core
target | the target of the query "federation", "parent", "core","broker" or a specific named object |
queryStr | the query to make |
mode | defaults to fast (asynchronous) meaning the query goes into priority channels, ordered (synchronous) means slower queries but has more ordering guarantees |
make a query at the core
void helics::CoreApp::reset | ( | ) |
reset the app to default state
void helics::CoreApp::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" and queryStr of the value to Query
valueName | the name of the global to set |
value | the value of the global |
void helics::CoreApp::setLogFile | ( | const std::string & | logFile | ) |
set the log file to use for the core
void helics::CoreApp::setLoggingLevel | ( | int | loglevel | ) |
set the minimum log level to use in the core
void helics::CoreApp::setReadyToInit | ( | ) |
tell the core that is ready to enter initialization mode
bool helics::CoreApp::waitForDisconnect | ( | std::chrono::milliseconds | waitTime = std::chrono::milliseconds(0) | ) |
wait for the core to normally disconnect for a certain amount of time
Referenced by helics::CoreKeeper::~CoreKeeper().