helics
3.5.2
|
#include <Probe.hpp>
Public Member Functions | |
Probe ()=default | |
Probe (std::vector< std::string > args) | |
Probe (int argc, char *argv[]) | |
Probe (std::string_view name, const FederateInfo &fedInfo) | |
Probe (std::string_view name, const std::shared_ptr< Core > &core, const FederateInfo &fedInfo) | |
Probe (std::string_view name, CoreApp &core, const FederateInfo &fedInfo) | |
Probe (std::string_view name, const std::string &configString) | |
Probe (Probe &&other_source)=default | |
Probe & | operator= (Probe &&fed)=default |
virtual void | initialize () override |
virtual void | runTo (Time stopTime_input) override |
int | getConnections () const |
int | getMessageCount () const |
Public Member Functions inherited from helics::apps::App | |
App ()=default | |
App (std::string_view defaultAppName, std::vector< std::string > args) | |
App (std::string_view defaultAppName, int argc, char *argv[]) | |
App (std::string_view appName, const FederateInfo &fedInfo) | |
App (std::string_view appName, const std::shared_ptr< Core > &core, const FederateInfo &fedInfo) | |
App (std::string_view appName, CoreApp &core, const FederateInfo &fedInfo) | |
App (std::string_view appName, const std::string &configString) | |
App (App &&other_app)=default | |
App (const App &other_app)=delete | |
App & | operator= (App &&app)=default |
App & | operator= (const App &app)=delete |
void | loadFile (const std::string &filename, bool enableFederateInterfaceRegistration=true) |
virtual void | run () |
virtual void | finalize () |
bool | isActive () const |
const CombinationFederate & | accessUnderlyingFederate () const |
Additional Inherited Members | |
Protected Member Functions inherited from helics::apps::App | |
virtual void | loadJsonFile (const std::string &jsonString, bool enableFederateInterfaceRegistration) |
void | loadJsonFileConfiguration (const std::string &appName, const std::string &jsonString, bool enableFederateInterfaceRegistration) |
virtual void | loadTextFile (const std::string &textFile) |
void | loadInputFiles () |
void | loadConfigOptions (AppTextParser &aparser) |
Protected Attributes inherited from helics::apps::App | |
std::shared_ptr< CombinationFederate > | fed |
the federate created for the App | |
Time | stopTime = Time::maxVal() |
the time the App should stop | |
std::string | configFileName |
name of the config file used for constructing the federate | |
std::string | inputFileName |
the name of the app input file | |
bool | useLocal {false} |
bool | fileLoaded {false} |
bool | deactivated {false} |
bool | quietMode {false} |
bool | helpMode {false} |
std::vector< std::string > | remArgs |
class implementing a probe federate, which will connect with all other probes in the federation and send message back and forth at each timestep
|
default |
default constructor
|
explicit |
construct from command line arguments in a vector
args | The vector of string, the remaining arguments are returned in the args |
helics::apps::Probe::Probe | ( | int | argc, |
char * | argv[] | ||
) |
construct from command line arguments
argc | the number of arguments |
argv | the strings in the input |
helics::apps::Probe::Probe | ( | std::string_view | name, |
const FederateInfo & | fedInfo | ||
) |
construct from a federate info object
name | the name of the source object (can be empty to use defaults from fedInfo) |
fedInfo | a pointer info object containing information on the desired federate configuration |
helics::apps::Probe::Probe | ( | std::string_view | name, |
const std::shared_ptr< Core > & | core, | ||
const FederateInfo & | fedInfo | ||
) |
constructor taking a federate information structure and using the given core
name | the name of the source object (can be empty to use defaults from fedInfo) |
core | a pointer to core object which the federate can join |
fedInfo | a federate information structure |
helics::apps::Probe::Probe | ( | std::string_view | name, |
CoreApp & | core, | ||
const FederateInfo & | fedInfo | ||
) |
constructor taking a federate information structure and using the given core
name | the name of the federate (can be empty to use defaults from fedInfo) |
core | a coreApp object that can be joined |
fedInfo | a federate information structure |
helics::apps::Probe::Probe | ( | std::string_view | name, |
const std::string & | configString | ||
) |
constructor taking a file with the required information
name | the name of the source object (can be empty to use defaults from fedInfo) |
configString | file a JSON or TOML file or string containing configuration informatino |
|
default |
move construction
|
inline |
get the number of connections made
|
inline |
get the number of messages received
|
overridevirtual |
initialize the source federate
connect all sources with a generator
Reimplemented from helics::apps::App.
References helics::apps::App::fed, helics::Interface::getName(), HELICS_PROPERTY_TIME_DELTA, HELICS_PROPERTY_TIME_PERIOD, helics::Federate::STARTUP, helics::apps::App::stopTime, and helics::vectorizeQueryResult().
Referenced by runTo().
|
overridevirtual |
run the source until the specified time
stopTime_input | the desired stop time |
Implements helics::apps::App.
References helics::Federate::EXECUTING, helics::apps::App::fed, initialize(), and helics::Federate::STARTUP.