sot-torque-control  1.5.2
TracePlayer Class Reference

Entity to play data saved using a Tracer. More...

#include <sot/torque_control/trace-player.hh>

Inheritance diagram for TracePlayer:
[legend]
Collaboration diagram for TracePlayer:
[legend]

Public Types

typedef dynamicgraph::Signal< dynamicgraph::Vector, int > OutputSignalType
 

Public Member Functions

 TracePlayer (const std::string &name)
 
void addOutputSignal (const std::string &fileName, const std::string &signalName)
 
void clear ()
 
 DECLARE_SIGNAL_OUT (trigger, int)
 
virtual void display (std::ostream &os) const
 
void init (const double &dt)
 
void playNext ()
 
void rewind ()
 
void sendMsg (const std::string &msg, MsgType t=MSG_TYPE_INFO, const char *="", int=0)
 

Public Attributes

std::map< std::string, OutputSignalType * > m_outputSignals
 

Protected Types

typedef std::list< DataTypeDataHistoryType
 
typedef DataHistoryType::const_iterator DataPointerType
 
typedef dynamicgraph::Vector DataType
 

Protected Attributes

std::map< std::string, DataHistoryTypem_data
 
std::map< std::string, DataPointerTypem_dataPointers
 

Detailed Description

Entity to play data saved using a Tracer.

A typical use of this entity would be to call the command addOutputSignal for every file you previously saved with the Tracer. Then you can either call the command playNext, or you can call recompute on the output signal "trigger".

Definition at line 53 of file trace-player.hh.

Member Typedef Documentation

◆ DataHistoryType

typedef std::list<DataType> DataHistoryType
protected

Definition at line 83 of file trace-player.hh.

◆ DataPointerType

typedef DataHistoryType::const_iterator DataPointerType
protected

Definition at line 84 of file trace-player.hh.

◆ DataType

typedef dynamicgraph::Vector DataType
protected

Definition at line 82 of file trace-player.hh.

◆ OutputSignalType

typedef dynamicgraph::Signal<dynamicgraph::Vector, int> OutputSignalType

Definition at line 64 of file trace-player.hh.

Constructor & Destructor Documentation

◆ TracePlayer()

TracePlayer ( const std::string &  name)

Member Function Documentation

◆ addOutputSignal()

void addOutputSignal ( const std::string &  fileName,
const std::string &  signalName 
)

◆ clear()

void clear ( )

◆ DECLARE_SIGNAL_OUT()

DECLARE_SIGNAL_OUT ( trigger  ,
int   
)

◆ display()

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

Definition at line 160 of file trace-player.cpp.

◆ init()

void init ( const double &  dt)

◆ playNext()

void playNext ( )

◆ rewind()

void rewind ( )

Definition at line 138 of file trace-player.cpp.

References TracePlayer::m_data, and TracePlayer::m_dataPointers.

Referenced by TracePlayer::TracePlayer().

◆ sendMsg()

void sendMsg ( const std::string &  msg,
MsgType  t = MSG_TYPE_INFO,
const char *  = "",
int  = 0 
)
inline

Definition at line 77 of file trace-player.hh.

Member Data Documentation

◆ m_data

std::map<std::string, DataHistoryType> m_data
protected

◆ m_dataPointers

std::map<std::string, DataPointerType> m_dataPointers
protected

◆ m_outputSignals

std::map<std::string, OutputSignalType*> m_outputSignals

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