![]() |
helics
2.8.1
|
#include <Recorder.hpp>
Inheritance diagram for helics::apps::Recorder:Classes | |
| class | ValueCapture |
| class | ValueStats |
Public Member Functions | |
| Recorder (const std::string &name, FederateInfo &fi) | |
| Recorder (std::vector< std::string > args) | |
| Recorder (int argc, char *argv[]) | |
| Recorder (const std::string &name, const std::shared_ptr< Core > &core, const FederateInfo &fi) | |
| Recorder (const std::string &name, CoreApp &core, const FederateInfo &fi) | |
| Recorder (const std::string &name, const std::string &jsonString) | |
| Recorder (Recorder &&other_recorder)=default | |
| Recorder & | operator= (Recorder &&other_recorder)=default |
| ~Recorder () | |
| 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 | saveFile (const std::string &filename) |
| auto | pointCount () const |
| auto | messageCount () const |
| std::tuple< Time, std::string, std::string > | getValue (int index) const |
| std::unique_ptr< Message > | getMessage (int index) const |
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 | allow_iteration {false} |
| trigger to allow Iteration | |
| bool | verbose {false} |
| print all captured values to the screen | |
| Time | nextPrintTimeStep |
| the time advancement period for printing markers More... | |
| std::unique_ptr< CloningFilter > | cFilt |
| a pointer to a clone filter | |
| std::vector< ValueCapture > | points |
| lists of points that were captured | |
| std::vector< Input > | subscriptions |
| the actual subscription objects | |
| std::vector< Endpoint > | endpoints |
| the actual endpoint objects | |
| std::unique_ptr< Endpoint > | cloneEndpoint |
| the endpoint for cloned message delivery | |
| std::vector< std::unique_ptr< Message > > | messages |
| list of messages | |
| std::map< helics::interface_handle, int > | subids |
| map of the subscription ids | |
| std::map< std::string, int > | subkeys |
| translate subscription names to an index | |
| std::map< helics::interface_handle, int > | eptids |
| std::map< std::string, int > | eptNames |
| translate endpoint name to index | |
| std::vector< ValueStats > | vStat |
| storage for statistics capture | |
| std::vector< std::string > | captureInterfaces |
| storage for the interfaces to capture | |
| std::string | mapfile |
| file name for the on-line file updater | |
| std::string | outFileName {"out.txt"} |
| the final output file | |
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
| helics::apps::Recorder::Recorder | ( | const std::string & | name, |
| FederateInfo & | fi | ||
| ) |
construct from a FederateInfo structure
| name | the name of the Recorder, can be left empty for the default or to pull from the federateInfo object |
| fi | a federate information 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::Recorder::Recorder | ( | int | argc, |
| char * | argv[] | ||
| ) |
construct from command line arguments
| helics::apps::Recorder::Recorder | ( | 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 Recorder, can be left empty for the default or to pull from the federateInfo object |
| 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::Recorder::Recorder | ( | 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::Recorder::Recorder | ( | const std::string & | name, |
| const std::string & | jsonString | ||
| ) |
constructor taking a file with the required information
| name | the name of the app |
| jsonString | a file or JSON string defining the federate information in JSON |
References helics::apps::App::fed, and helics_flag_observer.
|
default |
move construction
| helics::apps::Recorder::~Recorder | ( | ) |
destructor
References outFileName, and saveFile().
| void helics::apps::Recorder::addCapture | ( | const std::string & | captureDesc | ) |
add a capture interface
| captureDesc | describes a federate to capture all the interfaces for |
References captureInterfaces.
| void helics::apps::Recorder::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::Recorder::addEndpoint | ( | const std::string & | endpoint | ) |
add an endpoint
References endpoints, eptNames, and helics::apps::App::fed.
| void helics::apps::Recorder::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::Recorder::addSubscription | ( | const std::string & | key | ) |
add a subscription to capture
add a subscription to record
References helics::apps::App::fed, subids, subkeys, and subscriptions.
| std::unique_ptr< Message > helics::apps::Recorder::getMessage | ( | int | index | ) | const |
get a message
makes a copy of a message and returns it in a unique_ptr
| index | the number of the message to retrieve |
References helics::isValidIndex(), and messages.
| std::tuple< Time, std::string, std::string > helics::apps::Recorder::getValue | ( | int | index | ) | const |
get a string with the value of point index
| index | the number of the point to retrieve |
References helics::isValidIndex(), points, and subscriptions.
|
inline |
get the number of captured messages
|
inline |
get the number of captured points
|
overridevirtual |
run the Player until the specified time
Implements helics::apps::App.
References allow_iteration, helics::apps::App::fed, helics::iterate_if_needed, mapfile, helics::next_step, nextPrintTimeStep, helics::Federate::startup, helics::timeZero, and vStat.
| void helics::apps::Recorder::saveFile | ( | const std::string & | filename | ) |
save the data to a file
Referenced by ~Recorder().
|
protected |
the time advancement period for printing markers
Referenced by runTo().
1.8.17