![]() |
helics
2.8.1
|
#include <Tracer.hpp>
Inheritance diagram for helics::apps::Tracer:Public Member Functions | |
| Tracer (const std::string &name, FederateInfo &fi) | |
| Tracer (std::vector< std::string > args) | |
| Tracer (int argc, char *argv[]) | |
| Tracer (const std::string &name, const std::shared_ptr< Core > &core, const FederateInfo &fi) | |
| Tracer (const std::string &name, CoreApp &core, const FederateInfo &fi) | |
| Tracer (const std::string &name, const std::string &file) | |
| Tracer (Tracer &&other_tracer)=default | |
| Tracer & | operator= (Tracer &&tracer)=default |
| ~Tracer () | |
| virtual void | runTo (Time runToTime) override |
| void | addSubscription (const std::string &key) |
| void | addEndpoint (const std::string &endpoint) |
| void | addSourceEndpointClone (const std::string &sourceEndpoint) |
| void | addDestEndpointClone (const std::string &destEndpoint) |
| void | addCapture (const std::string &captureDesc) |
| void | setClonedMessageCallback (std::function< void(Time, std::unique_ptr< Message >)> callback) |
| void | setEndpointMessageCallback (std::function< void(Time, const std::string &, std::unique_ptr< Message >)> callback) |
| void | setValueCallback (std::function< void(Time, const std::string &, const std::string &)> callback) |
| void | enableTextOutput () |
| void | disableTextOutput () |
Public Member Functions inherited from helics::apps::App | |
| App ()=default | |
| App (const std::string &defaultAppName, std::vector< std::string > args) | |
| App (const std::string &defaultAppName, int argc, char *argv[]) | |
| App (const std::string &appName, const FederateInfo &fi) | |
| App (const std::string &appName, const std::shared_ptr< Core > &core, const FederateInfo &fi) | |
| App (const std::string &appName, CoreApp &core, const FederateInfo &fi) | |
| App (const std::string &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 | run () |
| virtual void | finalize () |
| bool | isActive () const |
| const CombinationFederate & | accessUnderlyingFederate () const |
Protected Attributes | |
| bool | printMessage = false |
| bool | allow_iteration |
| flag to allow iteration of the federate for time requests More... | |
| bool | skiplog = false |
| skip the log function and print directly to cout | |
| std::unique_ptr< CloningFilter > | cFilt |
| a pointer to a clone filter | |
| std::vector< Input > | subscriptions |
| the actual subscription objects | |
| std::map< std::string, int > | subkeys |
| translate subscription names to an index | |
| std::vector< Endpoint > | endpoints |
| the actual endpoint objects | |
| std::map< std::string, int > | eptNames |
| translate endpoint name to index | |
| std::unique_ptr< Endpoint > | cloneEndpoint |
| the endpoint for cloned message delivery | |
| std::vector< std::string > | captureInterfaces |
| storage for the interfaces to capture | |
| std::function< void(Time, std::unique_ptr< Message >)> | clonedMessageCallback |
| std::function< void(Time, const std::string &, std::unique_ptr< Message >)> | endpointMessageCallback |
| std::function< void(Time, const std::string &, const std::string &)> | valueCallback |
Protected Attributes inherited from helics::apps::App | |
| 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 |
Additional Inherited Members | |
Protected Member Functions inherited from helics::apps::App | |
| void | loadJsonFileConfiguration (const std::string &appName, const std::string &jsonString) |
class designed to capture data points from a set of subscriptions or endpoints
|
explicit |
construct from a FederateInfo structure
References helics::apps::App::fed, and helics_flag_observer.
|
explicit |
construct from command line arguments in a vector
| args | the command line arguments to pass in a reverse vector |
| helics::apps::Tracer::Tracer | ( | int | argc, |
| char * | argv[] | ||
| ) |
construct from command line arguments
| helics::apps::Tracer::Tracer | ( | const std::string & | 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 tracer object, if empty it tries to figure it out from fi |
| core | a pointer to core object which the federate can join |
| fi | a federate information structure |
References helics::apps::App::fed, and helics_flag_observer.
| helics::apps::Tracer::Tracer | ( | const std::string & | 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_observer.
| helics::apps::Tracer::Tracer | ( | const std::string & | name, |
| const std::string & | file | ||
| ) |
constructor taking a file with the required information
| name | the name of the app may be empty to pull name from the file |
| file | a file defining the federate information |
References helics::apps::App::fed, and helics_flag_observer.
|
default |
move construction
|
default |
destructor
| void helics::apps::Tracer::addCapture | ( | const std::string & | captureDesc | ) |
add a capture interface
| captureDesc | describes a federate to capture all the interfaces for |
References captureInterfaces.
| void helics::apps::Tracer::addDestEndpointClone | ( | const std::string & | destEndpoint | ) |
copy all messages that are going to a specific endpoint
References cFilt, cloneEndpoint, and helics::apps::App::fed.
| void helics::apps::Tracer::addEndpoint | ( | const std::string & | endpoint | ) |
add an endpoint
References endpoints, eptNames, and helics::apps::App::fed.
| void helics::apps::Tracer::addSourceEndpointClone | ( | const std::string & | sourceEndpoint | ) |
copy all messages that come from a specified endpoint
References cFilt, cloneEndpoint, and helics::apps::App::fed.
| void helics::apps::Tracer::addSubscription | ( | const std::string & | key | ) |
add a subscription to capture
add a subscription to record
References helics::apps::App::fed, helics::make_subscription(), subkeys, and subscriptions.
|
inline |
turn the screen display off for values and messages
|
inline |
turn the screen display on for values and messages
|
overridevirtual |
run the Player until the specified time
Implements helics::apps::App.
References allow_iteration, helics::apps::App::fed, helics::Federate::initializing, helics::iterate_if_needed, helics::next_step, and helics::Federate::startup.
|
inline |
set the callback for a message received through cloned interfaces
the function signature will take the time in the Tracer a unique_ptr to the message
|
inline |
set the callback for a message received through endpoints
the function signature will take the time in the Tracer, the endpoint name as a string, and a unique_ptr to the message
|
inline |
set the callback for a value published
the function signature will take the time in the Tracer, the publication key as a string, and the value as a string
|
protected |
flag to allow iteration of the federate for time requests
Referenced by runTo().
1.8.17