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), mod(mod), pose(mod->GetPose())
9 {
10  // all log entries are added to the static vector history
11  log.push_back(*this);
12 }
13 
15 {
16  for (size_t i = 0; i < log.size(); i++) {
17  LogEntry *e = &log[i];
18 
19  printf("%.3f\t%u\t%s\n", (double)e->timestamp / 1e6, e->mod->GetId(),
20  e->mod->PoseString().c_str());
21  }
22 }
Model class
Definition: stage.hh:1651
static void Print()
Definition: logentry.cc:14
usec_t timestamp
Definition: stage.hh:735
The Stage library uses its own namespace.
Definition: canvas.hh:8
uint32_t GetId() const
Definition: stage.hh:2235
std::string PoseString()
Definition: stage.hh:2089
uint64_t usec_t
Definition: stage.hh:203
LogEntry(usec_t timestamp, Model *mod)
Definition: logentry.cc:7
static std::vector< LogEntry > log
Definition: stage.hh:743
Model * mod
Definition: stage.hh:736


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 Feb 28 2022 23:48:55