|
orca-robotics

INTRODUCTION
Overview
Download and Install
Quick Start
Documentation
Publications
REPOSITORY
Interfaces
Components
Libraries
Utilities
Software Map
DEVELOPER
Tutorials
Examples
Dev Guide
Dashboard
Wiki
login/pass: orca/orca
PEOPLE
Contributors
Users

Project
Download
Mailing lists
|
|
|
orcalog::MasterFileReader Class ReferenceKnows how to parse a master file.
More...
#include <masterfilereader.h>
List of all members.
|
Public Member Functions |
void | getLogs (std::vector< std::string > &filenames, std::vector< std::string > &interfaceTypes, std::vector< std::string > &formats, std::vector< bool > &enableds) |
| Get info on all logs from the master file.
|
void | rewindToStart () |
int | getData (int &seconds, int &useconds, int &id, int &index) |
int | getDataAtOrAfterTime (int &seconds, int &useconds, int &id, int &index, int seekSec, int seekUsec=0) |
void | placeCursorBeforeTime (int seekSec, int seekUsec=0) |
| Places the cursor at the item with the greatest time < seekSec:seekUsec.
|
int | placeCursorAtOrAfterTime (int seekSec, int seekUsec=0) |
bool | getCursorTime (int &seconds, int &useconds) |
void | stepBackward () |
Detailed Description
Knows how to parse a master file.
Member Function Documentation
bool MasterFileReader::getCursorTime |
( |
int & |
seconds, |
|
|
int & |
useconds |
|
) |
|
|
|
Gives the time of the item which would be returned if getData() were called. Returns: cursorIsValid (is invalid at end of log) |
int MasterFileReader::getData |
( |
int & |
seconds, |
|
|
int & |
useconds, |
|
|
int & |
id, |
|
|
int & |
index |
|
) |
|
|
|
Read one line of data log. Returns:
- 0 if data read sucessfully.
- 1 if end of file is reached.
|
int MasterFileReader::getDataAtOrAfterTime |
( |
int & |
seconds, |
|
|
int & |
useconds, |
|
|
int & |
id, |
|
|
int & |
index, |
|
|
int |
seekSec, |
|
|
int |
seekUsec = 0 |
|
) |
|
|
|
Steps through the data entries until the time stamp is equal to or is after the one specified. For example, data is logged every second and the last replayed time was t=3. Calling getData(...,5,0) or getData(...,5,1) will return the data at time t=5.
Seeking time after the end of the log will result in fast forwarding to the end.
Returns:
- 0 if data read sucessfully.
- 1 if end of file is reached.
|
int MasterFileReader::placeCursorAtOrAfterTime |
( |
int |
seekSec, |
|
|
int |
seekUsec = 0 |
|
) |
|
|
|
Places the cursor at the item with the smallest time >= seekSec:seekUsec. Returns:
- 0 if sucessful.
- 1 if end of file is reached.
|
void MasterFileReader::rewindToStart |
( |
|
) |
|
|
|
Rewind to the start of the data log. Calling getData() afterwards will return the first data point. |
void MasterFileReader::stepBackward |
( |
|
) |
|
|
|
Steps the cursor backward (unless it's already at the start). Ie interleaved calls to stepBackward() and getData() will move the cursor back and forth between two locations. |
The documentation for this class was generated from the following files:
|
|