Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

TSStats Struct Reference

#include <TSStats.h>

List of all members.


Detailed Description

This TSStats struct specifies the format of the statistics used in Borealis One TSStats object contain all information of a certain kind of statistics, e.g., stream rate.


Public Types

enum  Error { ID_NOT_FOUND }

Public Member Functions

TimeSec getPrecision ()
 Get the precision of the stats object.
TSStats copy (int32 window_size=0, TimeSec precision=0, TimeStamp time_stamp=0)
 Returns a TSStats that is resampled from the this TSStats.
TSStats copy (IDVect ids, int32 window_size=0, TimeSec precision=0, TimeStamp time_stamp=0)
 Returns a TSStats that is resampled from the this TSStats Only the statistis data of the objects in the given list are returned.
FixLenTimeSeries copyStatistics (IDType id, int32 window_size=0, TimeSec precision=0, TimeStamp time_stamp=0) throw ( Error )
 Returns a FixLenTimeSeries that is resampled from the FixLenTimeSeries with given ID.

Public Attributes

TimeStamp time_stamp
 The time stamp of the last statistics sample.
TimeSec precision
 Each sample of the statistics is the average value over certain period.
int32 window_size
 Each statistics is a timeSeries.
VersionRWLock vlock
 This lock is used to protect this data structur If mutli-threads are used, then the writer thread should use writeLock before updating this data structur and writeUnLock() after updating this data structure The reader should readVersion() first and use the returned version to check whether the data has been updated.


Member Enumeration Documentation

enum TSStats::Error
 

Enumeration values:
ID_NOT_FOUND 


Member Function Documentation

TSStats TSStats::copy IDVect  ids,
int32  window_size = 0,
TimeSec  precision = 0,
TimeStamp  time_stamp = 0
 

Returns a TSStats that is resampled from the this TSStats Only the statistis data of the objects in the given list are returned.

If window_size/precision/time_stamp is zero, then the default value is used. Otherwise, the returned data are resamples according to the given parameters.

Parameters:
ids the ids of the given objects
window_size the window size of the returned statistics
precision the precision of the returned statistics
time_stamp the time stamp of the latest sample

TSStats TSStats::copy int32  window_size = 0,
TimeSec  precision = 0,
TimeStamp  time_stamp = 0
 

Returns a TSStats that is resampled from the this TSStats.

If window_size/precision/time_stamp is zero, then the default value is used. Otherwise, the returned data are resamples according to the given parameters.

Parameters:
window_size the window size of the returned statistics
precision the precision of the returned statistics
time_stamp the time stamp of the latest sample

FixLenTimeSeries TSStats::copyStatistics IDType  id,
int32  window_size = 0,
TimeSec  precision = 0,
TimeStamp  time_stamp = 0
throw ( Error )
 

Returns a FixLenTimeSeries that is resampled from the FixLenTimeSeries with given ID.

If window_size/precision/time_stamp is zero, then the default value is used. Otherwise, the returned data are resamples according to the given parameters.

Parameters:
id the id of the given object
window_size the window size of the returned statistics
precision the precision of the returned statistics
time_stamp the time stamp of the latest sample
Exceptions:
ID_NOT_FOUND if the given id is not valid

TimeSec TSStats::getPrecision  ) 
 

Get the precision of the stats object.

(for update frequency)


Member Data Documentation

TimeSec TSStats::precision
 

Each sample of the statistics is the average value over certain period.

This period is called the precision of the samples in Borealis.

TimeStamp TSStats::time_stamp
 

The time stamp of the last statistics sample.

VersionRWLock TSStats::vlock
 

This lock is used to protect this data structur If mutli-threads are used, then the writer thread should use writeLock before updating this data structur and writeUnLock() after updating this data structure The reader should readVersion() first and use the returned version to check whether the data has been updated.

int32 TSStats::window_size
 

Each statistics is a timeSeries.

The number of Samples in each timeSeries is called the window size of the statistics


The documentation for this struct was generated from the following files:
Generated on Fri Nov 12 15:15:24 2004 for Borealis by doxygen 1.3.8