Odata Class Reference

Read a segment list sequentially (for Omicron). More...

#include <Odata.h>

Collaboration diagram for Odata:
Collaboration graph
[legend]

List of all members.

Public Member Functions

int GetChunkTimeEnd (void)
 Returns the GPS ending time of current chunk.
int GetChunkTimeStart (void)
 Returns the GPS starting time of current chunk.
int GetNSegments (void)
 Returns number of subsegments per chunk.
int GetSegmentTimeEnd (const int aNseg)
 Returns the GPS ending time of segment aNseg.
int GetSegmentTimeStart (const int aNseg)
 Returns the GPS starting time of segment aNseg.
bool GetStatus (void)
 Returns current class status.
bool NewChunk (void)
 Loads a new (next) chunk.
bool SetSegments (Segments *aSegments)
 Sets the segments to read.
Constructors and destructors



 Odata (const int aChunkDuration, const int aSegmentDuration, const int aOverlapDuration, const int aVerbosity=0)
 Constructor of the Odata class.
virtual ~Odata (void)
 Destructor of the Odata class.

Detailed Description

Read a segment list sequentially (for Omicron).

A Segments object is segmented with several levels to perform an organized analysis of data segments. The input segments are divided into overlapping chunks. The chunks can be represented in the following way:

 |------------------| chunk i-1
                |------------------| chunk i
                               |------------------| chunk i+1
 
                |---| overlap
 

Chunks are subdivided in subsegments overlaping the same way as chunks:

 |------------------------------------------| chunk i
 |----------| subsegment 0
         |----------| subsegment 1
                 |----------| subsegment 2
                         |----------| subsegment 3
                                 |----------| subsegment 4
				 
                                         |------------------------------------------| chunk i+1
 

The chunk duration is pre-defined. However, if the input segment is not long enough, the chunk size is adjusted to fit the maximum number of subsegments. The segment size cannot be ajusted.

Author:
Florent Robinet

Constructor & Destructor Documentation

Odata::Odata ( const int  aChunkDuration,
const int  aSegmentDuration,
const int  aOverlapDuration,
const int  aVerbosity = 0 
)

Constructor of the Odata class.

Parameters:
aChunkDuration chunk duration [s]
aSegmentDuration subsegment duration [s]
aOverlapDuration overlap duration [s]
averbose verbosity level
Odata::~Odata ( void   )  [virtual]

Destructor of the Odata class.


Member Function Documentation

int Odata::GetChunkTimeEnd ( void   )  [inline]

Returns the GPS ending time of current chunk.

int Odata::GetChunkTimeStart ( void   )  [inline]

Returns the GPS starting time of current chunk.

int Odata::GetNSegments ( void   )  [inline]

Returns number of subsegments per chunk.

int Odata::GetSegmentTimeEnd ( const int  aNseg  ) 

Returns the GPS ending time of segment aNseg.

Returns -1 if this function fails.

Parameters:
aNseg segment number
int Odata::GetSegmentTimeStart ( const int  aNseg  ) 

Returns the GPS starting time of segment aNseg.

Returns -1 if this function fails.

Parameters:
aNseg segment number
bool Odata::GetStatus ( void   )  [inline]

Returns current class status.

bool Odata::NewChunk ( void   ) 

Loads a new (next) chunk.

The chunks are loaded following the structure defined for the Odata class and the Segments object defined with SetSegments(). When there is not enough data to fill one chunk (end of a segment), the chunk duration is shortened. This function should be called iteratively to cover the full data set. The returned value indicates the status of this operation:

  • true : a new chunk has been loaded
  • false : no more chunk to load
bool Odata::SetSegments ( Segments aSegments  ) 

Sets the segments to read.

The input Segments structure is loaded and chunks can be called with the NewChunk function.

Parameters:
aSegments input Segments

The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Friends Defines

Generated on 26 Sep 2014 by  doxygen 1.6.1