![]() |
helics
3.3.0
|
#include <Echo.hpp>
Public Member Functions | |
Echo ()=default | |
Echo (std::vector< std::string > args) | |
Echo (int argc, char *argv[]) | |
Echo (std::string_view name, const FederateInfo &fi) | |
Echo (std::string_view name, const std::shared_ptr< Core > &core, const FederateInfo &fi) | |
Echo (std::string_view name, CoreApp &core, const FederateInfo &fi) | |
Echo (std::string_view name, const std::string &jsonString) | |
Echo (Echo &&other_echo) noexcept | |
Echo & | operator= (Echo &&other_echo) noexcept |
virtual void | runTo (Time stopTime_input) override |
void | addEndpoint (std::string_view endpointName, std::string_view endpointType="") |
auto | echoCount () const |
void | setEchoDelay (Time delay) |
auto | endpointCount () const |
![]() | |
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 &fi) | |
App (std::string_view appName, const std::shared_ptr< Core > &core, const FederateInfo &fi) | |
App (std::string_view appName, CoreApp &core, const FederateInfo &fi) | |
App (std::string_view appName, const std::string &jsonString) | |
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) |
virtual void | initialize () |
virtual void | run () |
virtual void | finalize () |
bool | isActive () const |
const CombinationFederate & | accessUnderlyingFederate () const |
Additional Inherited Members | |
![]() | |
void | loadJsonFileConfiguration (const std::string &appName, const std::string &jsonString) |
virtual void | loadTextFile (const std::string &textFile) |
![]() | |
std::shared_ptr< CombinationFederate > | fed |
the federate created for the Player | |
Time | stopTime = Time::maxVal() |
the time the Player should stop | |
std::string | masterFileName |
the name of the master file used to do the construction | |
bool | useLocal {false} |
bool | fileLoaded {false} |
bool | deactivated {false} |
bool | quietMode {false} |
bool | helpMode {false} |
std::vector< std::string > | remArgs |
class implementing an Echo object, which will generate endpoint interfaces and send a data message back to the source at the with a specified delay
the Echo class is NOT threadsafe in general, don't try to use it from multiple threads without external protection, that will result in undefined behavior. One exception is the setEchoDelay function is threadsafe, and const methods will not cause problems but may not give consistent answers if used from multiple threads unless protected.
|
default |
default constructor
|
explicit |
construct from command line arguments
args | a vector of command line arguments |
helics::apps::Echo::Echo | ( | int | argc, |
char * | argv[] | ||
) |
construct from command line arguments
argc | the number of arguments |
argv | the strings in the input |
|
explicit |
construct from a federate info object
name | the name of the echo app, can be empty to get name from fi or default |
fi | a pointer info object containing information on the desired federate configuration |
References helics::apps::App::fed, and HELICS_FLAG_EVENT_TRIGGERED.
helics::apps::Echo::Echo | ( | std::string_view | name, |
const std::shared_ptr< Core > & | core, | ||
const FederateInfo & | fi | ||
) |
constructor taking a federate information structure and using the given core
name | the name of the echo app, can be empty to get name from fi or default |
core | a pointer to core object which the federate can join |
fi | a federate information structure |
References helics::apps::App::fed, and HELICS_FLAG_EVENT_TRIGGERED.
helics::apps::Echo::Echo | ( | std::string_view | name, |
CoreApp & | core, | ||
const FederateInfo & | fi | ||
) |
constructor taking a federate information structure and using the given core
name | the name of the federate (can be empty to use defaults from fi) |
core | a coreApp object that can be joined |
fi | a federate information structure |
References helics::apps::App::fed, and HELICS_FLAG_EVENT_TRIGGERED.
helics::apps::Echo::Echo | ( | std::string_view | name, |
const std::string & | jsonString | ||
) |
constructor taking a file with the required information
name | the name of the echo app, can be empty to get name from fi or default |
jsonString | file or JSON string defining the federate information and other configuration |
References helics::apps::App::fed, and HELICS_FLAG_EVENT_TRIGGERED.
|
noexcept |
move construction
void helics::apps::Echo::addEndpoint | ( | std::string_view | endpointName, |
std::string_view | endpointType = "" |
||
) |
add an endpoint to the Player
endpointName | the name of the endpoint |
endpointType | the named type of the endpoint |
References helics::apps::App::fed.
|
inline |
get the number of points loaded
|
inline |
get the number of endpoints
move assignment
References helics::apps::App::operator=().
|
overridevirtual |
run the Echo federate until the specified time
stopTime_input | the desired stop time |
Implements helics::apps::App.
References helics::Federate::EXECUTING, helics::apps::App::fed, helics::Federate::FINALIZE, helics::apps::App::initialize(), and helics::Federate::STARTUP.
void helics::apps::Echo::setEchoDelay | ( | Time | delay | ) |
set the delay time Function is threadsafe