Public Types | Public Member Functions | Public Attributes | Static Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions | Friends | List of all members
dynamicgraph::Tracer Class Reference

Tracer plug-in main class. More...

#include <tracer.h>

Inheritance diagram for dynamicgraph::Tracer:
Inheritance graph

Public Types

typedef std::list< std::ostream * > FileList
typedef std::list< std::string > NameList
- Public Types inherited from dynamicgraph::Entity
typedef std::map< const std::string, command::Command * > CommandMap_t
typedef std::map< std::string, SignalBase< int > * > SignalMap

Public Member Functions

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. More...
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 ()
 Tracer (const std::string n)
virtual ~Tracer ()
- Public Member Functions inherited from dynamicgraph::Entity
std::ostream & displaySignalList (std::ostream &os) const
 Display the list of signals of this entity in output stream os. More...
 Entity (const std::string &name)
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...
virtual ~Entity ()
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. More...
void setLoggerVerbosityLevel (LoggerVerbosity lv)
 Specify the verbosity level of the logger. More...
LoggerVerbosity getLoggerVerbosityLevel ()
 Get the logger's verbosity level. More...
bool setTimeSample (double t)
 Set the time sample. More...
double getTimeSample ()
 Get the time sample. More...
bool setStreamPrintPeriod (double t)
 Set the period of the stream period. More...
double getStreamPrintPeriod ()
 Get the period of the stream period. More...

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 dynamicgraph::Entity
void addCommand (const std::string &name, command::Command *command)
 Add a command to Entity. More...
void entityDeregistration ()
void entityRegistration ()
void signalDeregistration (const std::string &name)
void signalRegistration (const SignalArray< int > &signals)

Protected Attributes

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

Private Member Functions



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 Typedef Documentation

◆ FileList

typedef std::list<std::ostream *> dynamicgraph::Tracer::FileList

Definition at line 51 of file tracer.h.

◆ NameList

typedef std::list<std::string> dynamicgraph::Tracer::NameList

Definition at line 53 of file tracer.h.

◆ SignalList

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

Definition at line 28 of file tracer.h.

Member Enumeration Documentation

◆ TraceStyle


Record, then trace to file only when said to.


Record and trace to file immediately.


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

Definition at line 33 of file tracer.h.

Constructor & Destructor Documentation

◆ Tracer()

Tracer::Tracer ( const std::string  n)

Definition at line 34 of file tracer.cpp.

◆ ~Tracer()

virtual dynamicgraph::Tracer::~Tracer ( )

Definition at line 60 of file tracer.h.

Member Function Documentation

◆ addSignalToTrace()

void Tracer::addSignalToTrace ( const SignalBase< int > &  sig,
const std::string &  filename = "" 

Definition at line 99 of file tracer.cpp.

◆ addSignalToTraceByName()

void Tracer::addSignalToTraceByName ( const std::string &  signame,
const std::string &  filename = "" 

Definition at line 111 of file tracer.cpp.

◆ clearSignalToTrace()

void Tracer::clearSignalToTrace ( )

Empty the list of signals to trace. This function does not modify the file list (it does not close the files in particular.

Definition at line 124 of file tracer.cpp.

◆ closeFiles()

void Tracer::closeFiles ( )

Reimplemented in dynamicgraph::TracerRealTime.

Definition at line 180 of file tracer.cpp.

◆ display()

void Tracer::display ( std::ostream &  os) const

Display information on the entity inside the output stream os.

Reimplemented from dynamicgraph::Entity.

Definition at line 263 of file tracer.cpp.


dynamicgraph::Tracer::DYNAMIC_GRAPH_ENTITY_DECL ( )

◆ getFrequency()

double dynamicgraph::Tracer::getFrequency ( )

Definition at line 81 of file tracer.h.

◆ getTraceStyle()

TraceStyle dynamicgraph::Tracer::getTraceStyle ( )

Definition at line 78 of file tracer.h.

◆ openFile()

void Tracer::openFile ( const SignalBase< int > &  sig,
const std::string &  filename 

Reimplemented in dynamicgraph::TracerRealTime.

Definition at line 163 of file tracer.cpp.

◆ openFiles()

void Tracer::openFiles ( const std::string &  rootdir,
const std::string &  basename,
const std::string &  suffix 

Definition at line 136 of file tracer.cpp.

◆ record()

void Tracer::record ( )

Definition at line 197 of file tracer.cpp.

◆ recordSignal()

void Tracer::recordSignal ( std::ostream &  os,
const SignalBase< int > &  sig 

Reimplemented in dynamicgraph::TracerRealTime.

Definition at line 232 of file tracer.cpp.

◆ recordTrigger()

int & Tracer::recordTrigger ( int &  dummy,
const int &  time 

Definition at line 250 of file tracer.cpp.

◆ setFrenquency()

void dynamicgraph::Tracer::setFrenquency ( const double &  frqu)

Definition at line 80 of file tracer.h.

◆ setTraceStyle()

void dynamicgraph::Tracer::setTraceStyle ( const TraceStyle style)

Definition at line 77 of file tracer.h.

◆ start()

void dynamicgraph::Tracer::start ( )

Definition at line 88 of file tracer.h.

◆ stop()

void dynamicgraph::Tracer::stop ( )

Definition at line 89 of file tracer.h.

◆ trace()

void Tracer::trace ( )

Reimplemented in dynamicgraph::TracerRealTime.

Definition at line 257 of file tracer.cpp.

Friends And Related Function Documentation

◆ operator<<

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

Definition at line 273 of file tracer.cpp.

Member Data Documentation

◆ basename

std::string dynamicgraph::Tracer::basename

Definition at line 47 of file tracer.h.

◆ files

FileList dynamicgraph::Tracer::files

Definition at line 52 of file tracer.h.

◆ files_mtx

std::mutex dynamicgraph::Tracer::files_mtx

Definition at line 30 of file tracer.h.

◆ frequency

double dynamicgraph::Tracer::frequency

Definition at line 45 of file tracer.h.

◆ names

NameList dynamicgraph::Tracer::names

Definition at line 54 of file tracer.h.

◆ namesSet

bool dynamicgraph::Tracer::namesSet

Definition at line 50 of file tracer.h.

◆ play

bool dynamicgraph::Tracer::play

Definition at line 55 of file tracer.h.

◆ rootdir

std::string dynamicgraph::Tracer::rootdir

Definition at line 49 of file tracer.h.

◆ suffix

std::string dynamicgraph::Tracer::suffix

Definition at line 48 of file tracer.h.

◆ timeStart

int dynamicgraph::Tracer::timeStart

Definition at line 56 of file tracer.h.

◆ toTraceSignals

SignalList dynamicgraph::Tracer::toTraceSignals

Definition at line 29 of file tracer.h.


const TraceStyle dynamicgraph::Tracer::TRACE_STYLE_DEFAULT = EACH_TIME

Definition at line 44 of file tracer.h.

◆ traceStyle

TraceStyle dynamicgraph::Tracer::traceStyle

Definition at line 43 of file tracer.h.

◆ triger

SignalTimeDependent<int, int> dynamicgraph::Tracer::triger

Definition at line 93 of file tracer.h.

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

Author(s): Nicolas Mansard, Olivier Stasse
autogenerated on Sun Jun 25 2023 02:06:03