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

Main class of the tracer real-time plug-in. More...

#include <tracer-real-time.h>

Inheritance diagram for dynamicgraph::TracerRealTime:
Inheritance graph
[legend]

Public Member Functions

virtual void closeFiles ()
 
void display (std::ostream &os) const
 Display information on the entity inside the output stream os. More...
 
void emptyBuffers ()
 
const int & getBufferSize ()
 
void setBufferSize (const int &SIZE)
 
virtual void trace ()
 
 TracerRealTime (const std::string &n)
 
virtual ~TracerRealTime ()
 
- Public Member Functions inherited from dynamicgraph::Tracer
void addSignalToTrace (const SignalBase< int > &sig, const std::string &filename="")
 
void addSignalToTraceByName (const std::string &signame, const std::string &filename="")
 
void clearSignalToTrace ()
 
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 ()
 
int & recordTrigger (int &dummy, const int &time)
 
void setFrenquency (const double &frqu)
 
void setTraceStyle (const TraceStyle &style)
 
void start ()
 
void stop ()
 
 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...
 

Protected Types

typedef std::list< std::ofstream * > HardFileList
 
- Protected Types inherited from dynamicgraph::Tracer
typedef std::list< const SignalBase< int > * > SignalList
 

Protected Member Functions

virtual void openFile (const SignalBase< int > &sig, const std::string &filename)
 
virtual void recordSignal (std::ostream &os, const SignalBase< int > &sig)
 
- 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

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

Static Protected Attributes

static const int BUFFER_SIZE_DEFAULT = 1048576
 

Private Member Functions

 DYNAMIC_GRAPH_ENTITY_DECL ()
 

Friends

DG_TRACERREALTIME_DLLAPI friend std::ostream & operator<< (std::ostream &os, const TracerRealTime &t)
 

Additional Inherited Members

- Public Types inherited from dynamicgraph::Tracer
typedef std::list< std::ostream * > FileList
 
typedef std::list< std::string > NameList
 
enum  TraceStyle { WHEN_SAID, EACH_TIME, FREQUENTLY }
 
- 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 Attributes inherited from dynamicgraph::Tracer
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 inherited from dynamicgraph::Tracer
static const TraceStyle TRACE_STYLE_DEFAULT = EACH_TIME
 

Detailed Description

Main class of the tracer real-time plug-in.

Definition at line 39 of file tracer-real-time.h.

Member Typedef Documentation

◆ HardFileList

typedef std::list<std::ofstream *> dynamicgraph::TracerRealTime::HardFileList
protected

Definition at line 65 of file tracer-real-time.h.

Constructor & Destructor Documentation

◆ TracerRealTime()

TracerRealTime::TracerRealTime ( const std::string &  n)

Definition at line 88 of file tracer-real-time.cpp.

◆ ~TracerRealTime()

virtual dynamicgraph::TracerRealTime::~TracerRealTime ( )
inlinevirtual

Definition at line 44 of file tracer-real-time.h.

Member Function Documentation

◆ closeFiles()

void TracerRealTime::closeFiles ( )
virtual

Reimplemented from dynamicgraph::Tracer.

Definition at line 147 of file tracer-real-time.cpp.

◆ display()

void TracerRealTime::display ( std::ostream &  os) const
virtual

Display information on the entity inside the output stream os.

Reimplemented from dynamicgraph::Entity.

Definition at line 261 of file tracer-real-time.cpp.

◆ DYNAMIC_GRAPH_ENTITY_DECL()

dynamicgraph::TracerRealTime::DYNAMIC_GRAPH_ENTITY_DECL ( )
private

◆ emptyBuffers()

void TracerRealTime::emptyBuffers ( )

Definition at line 215 of file tracer-real-time.cpp.

◆ getBufferSize()

const int& dynamicgraph::TracerRealTime::getBufferSize ( )
inline

Definition at line 57 of file tracer-real-time.h.

◆ openFile()

void TracerRealTime::openFile ( const SignalBase< int > &  sig,
const std::string &  filename 
)
protectedvirtual

Reimplemented from dynamicgraph::Tracer.

Definition at line 115 of file tracer-real-time.cpp.

◆ recordSignal()

void TracerRealTime::recordSignal ( std::ostream &  os,
const SignalBase< int > &  sig 
)
protectedvirtual

Reimplemented from dynamicgraph::Tracer.

Definition at line 231 of file tracer-real-time.cpp.

◆ setBufferSize()

void dynamicgraph::TracerRealTime::setBufferSize ( const int &  SIZE)
inline

Definition at line 55 of file tracer-real-time.h.

◆ trace()

void TracerRealTime::trace ( )
virtual

Reimplemented from dynamicgraph::Tracer.

Definition at line 176 of file tracer-real-time.cpp.

Friends And Related Function Documentation

◆ operator<<

DG_TRACERREALTIME_DLLAPI friend std::ostream& operator<< ( std::ostream &  os,
const TracerRealTime t 
)
friend

Definition at line 302 of file tracer-real-time.cpp.

Member Data Documentation

◆ BUFFER_SIZE_DEFAULT

const int dynamicgraph::TracerRealTime::BUFFER_SIZE_DEFAULT = 1048576
staticprotected

Definition at line 66 of file tracer-real-time.h.

◆ bufferSize

int dynamicgraph::TracerRealTime::bufferSize
protected

Definition at line 68 of file tracer-real-time.h.

◆ hardFiles

HardFileList dynamicgraph::TracerRealTime::hardFiles
protected

Definition at line 69 of file tracer-real-time.h.


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


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