Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

# CLogAnalyzerBase Class Reference

`#include <AnalyzerBase.h>`

Collaboration diagram for CLogAnalyzerBase:

[legend]
List of all members.

## Public Member Functions
| CLogAnalyzerBase ()
| ~CLogAnalyzerBase ()
void | openLogfile (const std::string &logfilename)
## Protected Attributes
std::vector< CTimeStampedObjectCollection< RobotPose > > | camRobotPoses
std::vector< CTimeStampedObjectCollection< RobotPose > > | robRobotPoses
std::vector< CTimeStampedObjectCollection< Vector2< double > > > | camBallPositions
std::vector< CTimeStampedObjectCollection< Vector2< double > > > | camBallSpeeds
## Private Member Functions
void | checkExtension (const std::string &filename)
void | reset ()
void | readLogfile ()
void | readRemoteCamWorldState ()
void | readWorldState ()
void | readPercepts ()
void | saveActualDataRows ()
void | synchronize ()
unsigned long | findSmallestTimestamp ()
template<class T> unsigned long | findSmallestTimestamp (std::vector< CTimeStampedObjectCollection< T > > &col)
void | sortCollections ()
template<class T> void | sortCollection (std::vector< CTimeStampedObjectCollection< T > > &col)
void | offsetCamCollections (long offset)
template<class T> void | offsetCollection (std::vector< CTimeStampedObjectCollection< T > > &col, long offset)
template<class T> bool | available (const std::vector< CTimeStampedObjectCollection< T > > &col, unsigned long timestamp) const
template<class T> T | getInterpolatedValue (const std::vector< CTimeStampedObjectCollection< T > > &col, unsigned long timestamp) const
## Static Private Member Functions
RobotPose | interpolate (const CTimeStampedObject< RobotPose > &tso1, const CTimeStampedObject< RobotPose > &tso2, unsigned long timestamp)
Vector2< double > | interpolate (const CTimeStampedObject< Vector2< double > > &tso1, const CTimeStampedObject< Vector2< double > > &tso2, unsigned long timestamp)
## Private Attributes
MessageQueue | nullQueue
LogPlayer | logfile
bool | foundSyncTimestampRemoteCam
bool | foundSyncTimestampRobot
unsigned long | syncTimestampRemoteCam
unsigned long | syncTimestampRobot
int | framesSinceLastError
int | errors
int | drops
RobotPose | lastCamRobotPose
CTimeStampedObjectCollection< RobotPose > | actualCamRobotPoses
CTimeStampedObjectCollection< Vector2< double > > | actualCamBallPositions
CTimeStampedObjectCollection< Vector2< double > > | actualCamBallSpeeds
CTimeStampedObjectCollection< RobotPose > | actualRobRobotPoses

## Constructor & Destructor Documentation

CLogAnalyzerBase::CLogAnalyzerBase | ( |  | ) |

| Definition at line 16 of file AnalyzerBase.cpp. References reset().

Here is the call graph for this function:

CLogAnalyzerBase::~CLogAnalyzerBase | ( |  | ) |

| Definition at line 22 of file AnalyzerBase.cpp.

## Member Function Documentation

void CLogAnalyzerBase::openLogfile | ( | const std::string & | logfilename | ) |

| Definition at line 26 of file AnalyzerBase.cpp. References checkExtension(), logfile, LogPlayer::open(), readLogfile(), reset(), and synchronize().

Here is the call graph for this function:

void CLogAnalyzerBase::checkExtension | ( | const std::string & | filename | ) | `[private]`

| Definition at line 40 of file AnalyzerBase.cpp. References foundSyncTimestampRemoteCam, and foundSyncTimestampRobot. Referenced by openLogfile().

void CLogAnalyzerBase::reset | ( |  | ) | `[private]`

| Definition at line 54 of file AnalyzerBase.cpp. References actualCamBallPositions, actualCamBallSpeeds, actualCamRobotPoses, actualRobRobotPoses, camBallPositions, camBallSpeeds, camRobotPoses, MessageQueue::clear(), drops, errors, foundSyncTimestampRemoteCam, foundSyncTimestampRobot, framesSinceLastError, logfile, nullQueue, CTimeStampedObjectCollection< Vector2< double > >::reset(), CTimeStampedObjectCollection< RobotPose >::reset(), robRobotPoses, syncTimestampRemoteCam, and syncTimestampRobot. Referenced by CLogAnalyzerBase(), and openLogfile().

Here is the call graph for this function:

void CLogAnalyzerBase::readLogfile | ( |  | ) | `[private]`

| Definition at line 79 of file AnalyzerBase.cpp. References InMessage::bin, LogPlayer::currentMessageNumber, foundSyncTimestampRemoteCam, foundSyncTimestampRobot, LogPlayer::getCurrentMessageID(), LogPlayer::getNumberOfMessages(), idPercepts, idRemoteCamWorldState, idSyncTimestampRemoteCam, idSyncTimestampRobot, idWorldState, MessageQueue::in, logfile, MessageQueue::queue, readPercepts(), readRemoteCamWorldState(), readWorldState(), saveActualDataRows(), MessageQueueBase::setSelectedMessageForReading(), syncTimestampRemoteCam, and syncTimestampRobot. Referenced by openLogfile().

Here is the call graph for this function:

void CLogAnalyzerBase::readRemoteCamWorldState | ( |  | ) | `[private]`

| Definition at line 117 of file AnalyzerBase.cpp. References actualCamBallPositions, actualCamBallSpeeds, actualCamRobotPoses, CTimeStampedObjectCollection< Vector2< double > >::add(), CTimeStampedObjectCollection< RobotPose >::add(), BallModel::ballWasSeen, InMessage::bin, camBallPositions, camBallSpeeds, camRobotPoses, drops, errors, framesSinceLastError, CTimeStampedObjectCollection< Vector2< double > >::getCollection(), CTimeStampedObjectCollection< RobotPose >::getCollection(), RobotPose::getValidity(), MessageQueue::in, lastCamRobotPose, logfile, normalize(), BallState::positionField, BallState::positionRobot, RECEIVE_WORLDSTATE, CTimeStampedObjectCollection< Vector2< double > >::reset(), CTimeStampedObjectCollection< RobotPose >::reset(), Pose2D::rotation, BallModel::seen, BallState::setBallDataRelativeToField(), BallState::speedField, BallState::speedRobot, RobotPose::timestamp, SeenBallState::timeWhenLastSeen, Pose2D::translation, Vector2< double >::x, and Vector2< double >::y. Referenced by readLogfile().

Here is the call graph for this function:

void CLogAnalyzerBase::readWorldState | ( |  | ) | `[private]`

| Definition at line 205 of file AnalyzerBase.cpp. References actualRobRobotPoses, CTimeStampedObjectCollection< RobotPose >::add(), InMessage::bin, MessageQueue::in, logfile, RECEIVE_WORLDSTATE, and RobotPose::timestamp. Referenced by readLogfile().

Here is the call graph for this function:

void CLogAnalyzerBase::readPercepts | ( |  | ) | `[private]`

| Definition at line 222 of file AnalyzerBase.cpp. References InMessage::bin, MessageQueue::in, logfile, and RECEIVE_PERCEPTS. Referenced by readLogfile().

void CLogAnalyzerBase::saveActualDataRows | ( |  | ) | `[private]`

| Definition at line 240 of file AnalyzerBase.cpp. References actualCamBallPositions, actualCamBallSpeeds, actualCamRobotPoses, actualRobRobotPoses, camBallPositions, camBallSpeeds, camRobotPoses, CTimeStampedObjectCollection< Vector2< double > >::getCollection(), CTimeStampedObjectCollection< RobotPose >::getCollection(), CTimeStampedObjectCollection< Vector2< double > >::reset(), CTimeStampedObjectCollection< RobotPose >::reset(), and robRobotPoses. Referenced by readLogfile().

Here is the call graph for this function:

void CLogAnalyzerBase::synchronize | ( |  | ) | `[private]`

| Definition at line 264 of file AnalyzerBase.cpp. References foundSyncTimestampRemoteCam, foundSyncTimestampRobot, offsetCamCollections(), sortCollections(), syncTimestampRemoteCam, and syncTimestampRobot. Referenced by openLogfile().

Here is the call graph for this function:

unsigned long CLogAnalyzerBase::findSmallestTimestamp | ( |  | ) | `[private]`

| Definition at line 275 of file AnalyzerBase.cpp. References camBallPositions, camBallSpeeds, camRobotPoses, min, and robRobotPoses.

template<class T>
unsigned long CLogAnalyzerBase::findSmallestTimestamp | ( | std::vector< CTimeStampedObjectCollection< T > > & | col | ) | `[inline, private]`

| Definition at line 120 of file AnalyzerBase.h.

void CLogAnalyzerBase::sortCollections | ( |  | ) | `[private]`

| Definition at line 287 of file AnalyzerBase.cpp. References camBallPositions, camBallSpeeds, camRobotPoses, robRobotPoses, and sortCollection(). Referenced by synchronize().

Here is the call graph for this function:

template<class T>
void CLogAnalyzerBase::sortCollection | ( | std::vector< CTimeStampedObjectCollection< T > > & | col | ) | `[inline, private]`

| Definition at line 136 of file AnalyzerBase.h. Referenced by sortCollections().

void CLogAnalyzerBase::offsetCamCollections | ( | long | offset | ) | `[private]`

| Definition at line 295 of file AnalyzerBase.cpp. References camBallPositions, camBallSpeeds, camRobotPoses, and offsetCollection(). Referenced by synchronize().

Here is the call graph for this function:

template<class T>
void CLogAnalyzerBase::offsetCollection | ( | std::vector< CTimeStampedObjectCollection< T > > & | col,
|  | long | offset
| ) | `[inline, private]`

| Definition at line 146 of file AnalyzerBase.h. Referenced by offsetCamCollections().

template<class T>
bool CLogAnalyzerBase::available | ( | const std::vector< CTimeStampedObjectCollection< T > > & | col,
|  | unsigned long | timestamp
| ) | const`[inline, private]`

| Definition at line 156 of file AnalyzerBase.h.

template<class T>
T CLogAnalyzerBase::getInterpolatedValue | ( | const std::vector< CTimeStampedObjectCollection< T > > & | col,
|  | unsigned long | timestamp
| ) | const`[inline, private]`

| Definition at line 171 of file AnalyzerBase.h. References interpolate().

Here is the call graph for this function:

RobotPose CLogAnalyzerBase::interpolate | ( | const CTimeStampedObject< RobotPose > & | tso1,
|  | const CTimeStampedObject< RobotPose > & | tso2,
|  | unsigned long | timestamp
| ) | `[static, private]`

| Definition at line 302 of file AnalyzerBase.cpp. References CTimeStampedObject< T >::getObject(), CTimeStampedObject< T >::getTime(), pi, Pose2D::rotation, RobotPose::timestamp, Pose2D::translation, Vector2< double >::x, and Vector2< double >::y. Referenced by getInterpolatedValue().

Here is the call graph for this function:

Vector2< double > CLogAnalyzerBase::interpolate | ( | const CTimeStampedObject< Vector2< double > > & | tso1,
|  | const CTimeStampedObject< Vector2< double > > & | tso2,
|  | unsigned long | timestamp
| ) | `[static, private]`

| Definition at line 332 of file AnalyzerBase.cpp. References Vector2< V >::x, and Vector2< V >::y.

## Member Data Documentation

MessageQueue CLogAnalyzerBase::nullQueue`[private]`

| Definition at line 204 of file AnalyzerBase.h. Referenced by reset().

LogPlayer CLogAnalyzerBase::logfile`[private]`

| Definition at line 205 of file AnalyzerBase.h. Referenced by openLogfile(), readLogfile(), readPercepts(), readRemoteCamWorldState(), readWorldState(), and reset().

bool CLogAnalyzerBase::foundSyncTimestampRemoteCam`[private]`

| Definition at line 207 of file AnalyzerBase.h. Referenced by checkExtension(), readLogfile(), reset(), and synchronize().

bool CLogAnalyzerBase::foundSyncTimestampRobot`[private]`

| Definition at line 208 of file AnalyzerBase.h. Referenced by checkExtension(), readLogfile(), reset(), and synchronize().

unsigned long CLogAnalyzerBase::syncTimestampRemoteCam`[private]`

| Definition at line 209 of file AnalyzerBase.h. Referenced by readLogfile(), reset(), and synchronize().

unsigned long CLogAnalyzerBase::syncTimestampRobot`[private]`

| Definition at line 210 of file AnalyzerBase.h. Referenced by readLogfile(), reset(), and synchronize().

int CLogAnalyzerBase::framesSinceLastError`[private]`

| Definition at line 212 of file AnalyzerBase.h. Referenced by readRemoteCamWorldState(), and reset().

int CLogAnalyzerBase::errors`[private]`

| Definition at line 213 of file AnalyzerBase.h. Referenced by readRemoteCamWorldState(), and reset().

int CLogAnalyzerBase::drops`[private]`

| Definition at line 214 of file AnalyzerBase.h. Referenced by readRemoteCamWorldState(), and reset().

RobotPose CLogAnalyzerBase::lastCamRobotPose`[private]`

| Definition at line 216 of file AnalyzerBase.h. Referenced by readRemoteCamWorldState().

CTimeStampedObjectCollection<RobotPose> CLogAnalyzerBase::actualCamRobotPoses`[private]`

| Definition at line 217 of file AnalyzerBase.h. Referenced by readRemoteCamWorldState(), reset(), and saveActualDataRows().

CTimeStampedObjectCollection<Vector2<double > > CLogAnalyzerBase::actualCamBallPositions`[private]`

| Definition at line 218 of file AnalyzerBase.h. Referenced by readRemoteCamWorldState(), reset(), and saveActualDataRows().

CTimeStampedObjectCollection<Vector2<double > > CLogAnalyzerBase::actualCamBallSpeeds`[private]`

| Definition at line 219 of file AnalyzerBase.h. Referenced by readRemoteCamWorldState(), reset(), and saveActualDataRows().

CTimeStampedObjectCollection<RobotPose> CLogAnalyzerBase::actualRobRobotPoses`[private]`

| Definition at line 221 of file AnalyzerBase.h. Referenced by readWorldState(), reset(), and saveActualDataRows().

std::vector<CTimeStampedObjectCollection<RobotPose> > CLogAnalyzerBase::camRobotPoses`[protected]`

| Definition at line 224 of file AnalyzerBase.h. Referenced by findSmallestTimestamp(), offsetCamCollections(), readRemoteCamWorldState(), reset(), saveActualDataRows(), and sortCollections().

std::vector<CTimeStampedObjectCollection<RobotPose> > CLogAnalyzerBase::robRobotPoses`[protected]`

| Definition at line 225 of file AnalyzerBase.h. Referenced by findSmallestTimestamp(), reset(), saveActualDataRows(), and sortCollections().

std::vector<CTimeStampedObjectCollection<Vector2<double> > > CLogAnalyzerBase::camBallPositions`[protected]`

| Definition at line 226 of file AnalyzerBase.h. Referenced by findSmallestTimestamp(), offsetCamCollections(), readRemoteCamWorldState(), reset(), saveActualDataRows(), and sortCollections().

std::vector<CTimeStampedObjectCollection<Vector2<double> > > CLogAnalyzerBase::camBallSpeeds`[protected]`

| Definition at line 227 of file AnalyzerBase.h. Referenced by findSmallestTimestamp(), offsetCamCollections(), readRemoteCamWorldState(), reset(), saveActualDataRows(), and sortCollections().

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

- Tools/LogfileAnalyzing/AnalyzerBase.h
- Tools/LogfileAnalyzing/AnalyzerBase.cpp