helics  3.5.2
Public Member Functions | List of all members
helics::apps::Probe Class Reference

#include <Probe.hpp>

+ Inheritance diagram for helics::apps::Probe:

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
 
Probeoperator= (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
 
Appoperator= (App &&app)=default
 
Appoperator= (const App &app)=delete
 
void loadFile (const std::string &filename, bool enableFederateInterfaceRegistration=true)
 
virtual void run ()
 
virtual void finalize ()
 
bool isActive () const
 
const CombinationFederateaccessUnderlyingFederate () 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< CombinationFederatefed
 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
 

Detailed Description

class implementing a probe federate, which will connect with all other probes in the federation and send message back and forth at each timestep

Constructor & Destructor Documentation

◆ Probe() [1/8]

helics::apps::Probe::Probe ( )
default

default constructor

◆ Probe() [2/8]

helics::apps::Probe::Probe ( std::vector< std::string >  args)
explicit

construct from command line arguments in a vector

Parameters
argsThe vector of string, the remaining arguments are returned in the args

◆ Probe() [3/8]

helics::apps::Probe::Probe ( int  argc,
char *  argv[] 
)

construct from command line arguments

Parameters
argcthe number of arguments
argvthe strings in the input

◆ Probe() [4/8]

helics::apps::Probe::Probe ( std::string_view  name,
const FederateInfo fedInfo 
)

construct from a federate info object

Parameters
namethe name of the source object (can be empty to use defaults from fedInfo)
fedInfoa pointer info object containing information on the desired federate configuration

◆ Probe() [5/8]

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

Parameters
namethe name of the source object (can be empty to use defaults from fedInfo)
corea pointer to core object which the federate can join
fedInfoa federate information structure

◆ Probe() [6/8]

helics::apps::Probe::Probe ( std::string_view  name,
CoreApp &  core,
const FederateInfo fedInfo 
)

constructor taking a federate information structure and using the given core

Parameters
namethe name of the federate (can be empty to use defaults from fedInfo)
corea coreApp object that can be joined
fedInfoa federate information structure

◆ Probe() [7/8]

helics::apps::Probe::Probe ( std::string_view  name,
const std::string &  configString 
)

constructor taking a file with the required information

Parameters
namethe name of the source object (can be empty to use defaults from fedInfo)
configStringfile a JSON or TOML file or string containing configuration informatino

◆ Probe() [8/8]

helics::apps::Probe::Probe ( Probe &&  other_source)
default

move construction

Member Function Documentation

◆ getConnections()

int helics::apps::Probe::getConnections ( ) const
inline

get the number of connections made

◆ getMessageCount()

int helics::apps::Probe::getMessageCount ( ) const
inline

get the number of messages received

◆ initialize()

void helics::apps::Probe::initialize ( )
overridevirtual

◆ operator=()

Probe& helics::apps::Probe::operator= ( Probe &&  fed)
default

move assignment

◆ runTo()

void helics::apps::Probe::runTo ( Time  stopTime_input)
overridevirtual

run the source until the specified time

Parameters
stopTime_inputthe desired stop time

Implements helics::apps::App.

References helics::Federate::EXECUTING, helics::apps::App::fed, initialize(), and helics::Federate::STARTUP.


The documentation for this class was generated from the following files: