Timer< T > Class Template Reference

#include <sot/core/timer.hh>

Inheritance diagram for Timer< T >:
[legend]

Public Member Functions

virtual const std::string & getClassName (void) const
 
 Timer (const std::string &name)
 
virtual void display (std::ostream &os) const
 
- Public Member Functions inherited from dynamicgraph::Entity
 Entity (const std::string &name)
 
virtual ~Entity ()
 
const std::string & getName () const
 
virtual std::string getDocString () const
 
bool hasSignal (const std::string &signame) const
 
SignalBase< int > & getSignal (const std::string &signalName)
 
const SignalBase< int > & getSignal (const std::string &signalName) const
 
std::ostream & displaySignalList (std::ostream &os) const
 
virtual std::ostream & writeGraph (std::ostream &os) const
 
virtual std::ostream & writeCompletionList (std::ostream &os) const
 
virtual SignalBase< int > * test ()
 
virtual void test2 (SignalBase< int > *)
 
const std::string & getCommandList () const
 
CommandMap_t getNewStyleCommandMap ()
 
command::CommandgetNewStyleCommand (const std::string &cmdName)
 
SignalMap getSignalMap () const
 
void sendMsg (const std::string &msg, MsgType t=MSG_TYPE_INFO, const char *file="", int line=0)
 
void setLoggerVerbosityLevel (LoggerVerbosity lv)
 
LoggerVerbosity getLoggerVerbosityLevel ()
 

Public Attributes

dg::SignalPtr< T, int > sigSIN
 
dg::SignalTimeDependent< T, int > sigSOUT
 
dg::SignalTimeDependent< T, int > sigClockSOUT
 
dg::Signal< double, int > timerSOUT
 

Static Public Attributes

static const std::string CLASS_NAME
 

Protected Member Functions

void plug (dg::Signal< T, int > &sig)
 
template<bool UseClock>
T & compute (T &t, const int &time)
 
double & getDt (double &res, const int &)
 
- Protected Member Functions inherited from dynamicgraph::Entity
void addCommand (const std::string &name, command::Command *command)
 
void entityRegistration ()
 
void entityDeregistration ()
 
void signalRegistration (const SignalArray< int > &signals)
 
void signalDeregistration (const std::string &name)
 

Protected Attributes

struct timeval t0 t1
 
clock_t c0
 
clock_t c1
 
double dt
 
- Protected Attributes inherited from dynamicgraph::Entity
std::string name
 
SignalMap signalMap
 
CommandMap_t commandMap
 
Logger logger_
 

Friends

Timer_EXPORT friend std::ostream & operator<< (std::ostream &os, const Timer< T > &timer)
 

Additional Inherited Members

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

Constructor & Destructor Documentation

Member Function Documentation

template<class T >
template<bool UseClock>
T& Timer< T >::compute ( T &  t,
const int &  time 
)
inlineprotected
template<class T >
void Timer< T >::display ( std::ostream &  os) const
virtual

Reimplemented from dynamicgraph::Entity.

References Timer< T >::dt, and Timer< T >::sigSIN.

Referenced by Timer< T >::Timer().

template<class T >
virtual const std::string& Timer< T >::getClassName ( void  ) const
inlinevirtual

Reimplemented from dynamicgraph::Entity.

template<class T >
double& Timer< T >::getDt ( double &  res,
const int &   
)
inlineprotected

References cmdChrono(), and Timer< T >::Timer().

Referenced by Timer< T >::Timer().

template<class T >
void Timer< T >::plug ( dg::Signal< T, int > &  sig)
inlineprotected

Friends And Related Function Documentation

template<class T >
Timer_EXPORT friend std::ostream& operator<< ( std::ostream &  os,
const Timer< T > &  timer 
)
friend

Member Data Documentation

template<class T >
clock_t Timer< T >::c0
protected
template<class T >
clock_t Timer< T >::c1
protected
template<class T >
const std::string Timer< T >::CLASS_NAME
static
template<class T >
double Timer< T >::dt
protected

Referenced by Timer< T >::display().

template<class T >
dg::SignalTimeDependent<T,int> Timer< T >::sigClockSOUT

Referenced by Timer< T >::Timer().

template<class T >
dg::SignalPtr<T,int> Timer< T >::sigSIN
template<class T >
dg::SignalTimeDependent<T,int> Timer< T >::sigSOUT

Referenced by Timer< T >::Timer().

template<class T >
struct timeval t0 Timer< T >::t1
protected
template<class T >
dg::Signal<double,int> Timer< T >::timerSOUT

Referenced by Timer< T >::Timer().