Tracer plug-in main class. More...
#include <tracer.h>
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 dynamicgraph::Entity | |
typedef std::map< const std::string, command::Command * > | CommandMap_t |
typedef std::map< std::string, SignalBase< sigtime_t > * > | SignalMap |
Public Member Functions | |
void | addSignalToTrace (const SignalBase< sigtime_t > &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< sigtime_t > &sig) |
sigtime_t & | recordTrigger (sigtime_t &dummy, const sigtime_t &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::Command * | getNewStyleCommand (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< sigtime_t > & | getSignal (const std::string &signalName) |
Provides a reference to the signal named signalName. More... | |
const SignalBase< sigtime_t > & | 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< sigtime_t > * | test () |
virtual void | test2 (SignalBase< sigtime_t > *) |
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 () |
Logger & | logger () |
const Logger & | 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 |
sigtime_t | timeStart |
TraceStyle | traceStyle |
SignalTimeDependent< sigtime_t, sigtime_t > | triger |
Static Public Attributes | |
static const TraceStyle | TRACE_STYLE_DEFAULT = EACH_TIME |
Protected Types | |
typedef std::list< const SignalBase< sigtime_t > * > | SignalList |
Protected Member Functions | |
virtual void | openFile (const SignalBase< sigtime_t > &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< sigtime_t > &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 | |
DYNAMIC_GRAPH_ENTITY_DECL () | |
Friends | |
DG_TRACER_DLLAPI friend std::ostream & | operator<< (std::ostream &os, const Tracer &t) |
typedef std::list<std::ostream *> dynamicgraph::Tracer::FileList |
typedef std::list<std::string> dynamicgraph::Tracer::NameList |
|
protected |
Tracer::Tracer | ( | const std::string | n | ) |
Definition at line 34 of file tracer.cpp.
void Tracer::addSignalToTrace | ( | const SignalBase< sigtime_t > & | sig, |
const std::string & | filename = "" |
||
) |
Definition at line 99 of file tracer.cpp.
void Tracer::addSignalToTraceByName | ( | const std::string & | signame, |
const std::string & | filename = "" |
||
) |
Definition at line 111 of file tracer.cpp.
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.
|
virtual |
Reimplemented in dynamicgraph::TracerRealTime.
Definition at line 181 of file tracer.cpp.
|
virtual |
Display information on the entity inside the output stream os.
Reimplemented from dynamicgraph::Entity.
Definition at line 264 of file tracer.cpp.
|
private |
|
inline |
|
protectedvirtual |
Reimplemented in dynamicgraph::TracerRealTime.
Definition at line 163 of file tracer.cpp.
void Tracer::openFiles | ( | const std::string & | rootdir, |
const std::string & | basename, | ||
const std::string & | suffix | ||
) |
Definition at line 136 of file tracer.cpp.
void Tracer::record | ( | ) |
Definition at line 198 of file tracer.cpp.
|
virtual |
Reimplemented in dynamicgraph::TracerRealTime.
Definition at line 233 of file tracer.cpp.
Definition at line 251 of file tracer.cpp.
|
inline |
|
inline |
|
virtual |
Reimplemented in dynamicgraph::TracerRealTime.
Definition at line 258 of file tracer.cpp.
|
friend |
Definition at line 274 of file tracer.cpp.
|
protected |
|
static |
TraceStyle dynamicgraph::Tracer::traceStyle |
SignalTimeDependent<sigtime_t, sigtime_t> dynamicgraph::Tracer::triger |