logentry.cc
Go to the documentation of this file.
1 #include "stage.hh"
2 using namespace Stg;
3 
4 // static data members
5 std::vector<LogEntry> LogEntry::log;
6 
7 LogEntry::LogEntry( usec_t timestamp, Model* mod ) :
8  timestamp( timestamp ),
9  mod( mod ),
10  pose( mod->GetPose() )
11 {
12  // all log entries are added to the static vector history
13  log.push_back( *this );
14 }
15 
16 
17 
19 {
20  for( size_t i=0; i<log.size(); i++ )
21  {
22  LogEntry* e = &log[i];
23 
24  printf( "%.3f\t%u\t%s\n",
25  (double)e->timestamp / 1e6,
26  e->mod->GetId(),
27  e->mod->PoseString().c_str() );
28  }
29 }
Model class
Definition: stage.hh:1742
static void Print()
Definition: logentry.cc:18
usec_t timestamp
Definition: stage.hh:782
The Stage library uses its own namespace.
Definition: canvas.hh:8
std::string PoseString()
Definition: stage.hh:2202
uint64_t usec_t
Definition: stage.hh:186
LogEntry(usec_t timestamp, Model *mod)
Definition: logentry.cc:7
static std::vector< LogEntry > log
Definition: stage.hh:790
Model * mod
Definition: stage.hh:783
uint32_t GetId() const
Definition: stage.hh:2365


stage
Author(s): Richard Vaughan , Brian Gerkey , Reed Hedges , Andrew Howard , Toby Collett , Pooya Karimian , Jeremy Asher , Alex Couture-Beil , Geoff Biggs , Rich Mattes , Abbas Sadat
autogenerated on Mon Jun 10 2019 15:06:09