| helics 3.6.1

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
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
std::shared_ptr< CombinationFederate > | getUnderlyingFederatePointer ()

## 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
std::string | outFileName
| the name of any output 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

  args | The 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

  argc | the number of arguments
  argv | the 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

  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

## ◆ 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

  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

## ◆ 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

  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

## ◆ Probe() [7/8]

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

constructor taking a file with the required information

Parameters

  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

## ◆ 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 | ( |  | ) |
| override virtual

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().

## ◆ operator=()

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

move assignment

## ◆ runTo()

void helics::apps::Probe::runTo | ( | Time | stopTime_input | ) |
| override virtual

run the source until the specified time

Parameters

  stopTime_input | the 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:

- Probe.hpp
- Probe.cpp