dynamic-graph  4.1.0-8-gdab7-dirty
Dynamic graph library
Tracer Class Reference

Tracer plug-in main class. More...

#include <dynamic-graph/tracer.h>

Inheritance diagram for Tracer:
Collaboration diagram for Tracer:

Public Types

typedef std::list< std::ostream * > FileList
 
typedef std::list< std::string > NameList
 
enum  TraceStyle { WHEN_SAID, EACH_TIME, FREQUENTLY }
 
- Public Types inherited from Entity
typedef std::map< const std::string, command::Command * > CommandMap_t
 
typedef std::map< std::string, SignalBase< int > * > SignalMap
 

Public Member Functions

 Tracer (const std::string n)
 
void addSignalToTrace (const SignalBase< int > &sig, const std::string &filename="")
 
void addSignalToTraceByName (const std::string &signame, const std::string &filename="")
 
void clearSignalToTrace ()
 
virtual void closeFiles ()
 
void display (std::ostream &os) const
 Display information on the entity inside the output stream os.
 
double getFrequency ()
 
TraceStyle getTraceStyle ()
 
void openFiles (const std::string &rootdir, const std::string &basename, const std::string &suffix)
 
void record ()
 
virtual void recordSignal (std::ostream &os, const SignalBase< int > &sig)
 
int & recordTrigger (int &dummy, const int &time)
 
void setFrenquency (const double &frqu)
 
void setTraceStyle (const TraceStyle &style)
 
void start ()
 
void stop ()
 
virtual void trace ()
 
- Public Member Functions inherited from Entity
 Entity (const std::string &name)
 
std::ostream & displaySignalList (std::ostream &os) const
 Display the list of signals of this entity in output stream os. More...
 
virtual const std::string & getClassName () const
 
const std::string & getCommandList () const
 
virtual std::string getDocString () const
 Returns the Entity documentation. More...
 
const std::string & getName () const
 
command::CommandgetNewStyleCommand (const std::string &cmdName)
 Provides the pointer towards the Command object cmdName. More...
 
CommandMap_t getNewStyleCommandMap ()
 Provides the std::map where all the commands are registered. More...
 
SignalBase< int > & getSignal (const std::string &signalName)
 Provides a reference to the signal named signalName. More...
 
const SignalBase< int > & getSignal (const std::string &signalName) const
 Provides a const reference to the signal named signalName. More...
 
SignalMap getSignalMap () const
 Provides a map of all the signals. More...
 
bool hasSignal (const std::string &signame) const
 Test if a signal of name signame is present. More...
 
virtual SignalBase< int > * test ()
 
virtual void test2 (SignalBase< int > *)
 
virtual std::ostream & writeCompletionList (std::ostream &os) const
 This method is used write in the output stream os the signals names and the commands of the entity. More...
 
virtual std::ostream & writeGraph (std::ostream &os) const
 This method is used to write down in os the edges of the graph by calling the signals writeGraph method. More...
 
Loggerlogger ()
 
Logger const & logger () const
 
void sendMsg (const std::string &msg, MsgType t=MSG_TYPE_INFO, const std::string &lineId="")
 Send messages msg with level t. Add string file and line to message.
 
void setLoggerVerbosityLevel (LoggerVerbosity lv)
 Specify the verbosity level of the logger.
 
LoggerVerbosity getLoggerVerbosityLevel ()
 Get the logger's verbosity level.
 
bool setTimeSample (double t)
 Set the time sample.
 
double getTimeSample ()
 Get the time sample.
 
bool setStreamPrintPeriod (double t)
 Set the period of the stream period.
 
double getStreamPrintPeriod ()
 Get the period of the stream period.
 

Public Attributes

std::string basename
 
FileList files
 
double frequency
 
NameList names
 
bool namesSet
 
bool play
 
std::string rootdir
 
std::string suffix
 
int timeStart
 
TraceStyle traceStyle
 
SignalTimeDependent< int, int > triger
 

Static Public Attributes

static const TraceStyle TRACE_STYLE_DEFAULT = EACH_TIME
 

Protected Types

typedef std::list< const SignalBase< int > * > SignalList
 

Protected Member Functions

virtual void openFile (const SignalBase< int > &sig, const std::string &filename)
 
- Protected Member Functions inherited from Entity
void addCommand (const std::string &name, command::Command *command)
 
void entityDeregistration ()
 
void entityRegistration ()
 
void signalDeregistration (const std::string &name)
 
void signalRegistration (const SignalArray< int > &signals)
 

Protected Attributes

SignalList toTraceSignals
 
- Protected Attributes inherited from Entity
CommandMap_t commandMap
 
Logger logger_
 
std::string name
 
SignalMap signalMap
 

Friends

DG_TRACER_DLLAPI friend std::ostream & operator<< (std::ostream &os, const Tracer &t)
 

Detailed Description

Tracer plug-in main class.

Definition at line 24 of file tracer.h.

Member Enumeration Documentation

◆ TraceStyle

enum TraceStyle
Enumerator
WHEN_SAID 

Record, then trace to file only when said to.

EACH_TIME 

Record and trace to file immediately.

FREQUENTLY 

Record X time then trace (X is tuned by setFrenquence () ).

Definition at line 32 of file tracer.h.


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