Project: engagement_recognition

License: BSD

Dependencies:

Used by: None

All Packages

Timeline Class Reference

#include <timeline.h>

List of all members.

Public Member Functions

void addEvent (std::string type, bool success, unsigned long start, unsigned long delay, unsigned long duration, std::string data)
int getFailureRate ()
unsigned long getMaxDelay ()
unsigned long getMaxDuration ()
unsigned long getMaxTBCE ()
unsigned long getMeanDelay ()
unsigned long getMeanDuration ()
unsigned long getMeanTBCE ()
int getRecentFailureRate ()
unsigned long getRecentMaxDelay ()
unsigned long getRecentMaxDuration ()
unsigned long getRecentMaxTBCE ()
unsigned long getRecentMeanDelay ()
unsigned long getRecentMeanDuration ()
unsigned long getRecentMeanTBCE ()
double getWindowSize ()
void setWindowSize (double window_size)
 Timeline ()

Private Member Functions

void updateWindow ()

Private Attributes

Window all_events_
Duration between_time_
Duration delay_time_
Duration duration_time_
unsigned long interaction_start_time_
int num_failures_
Window success_events_
double window_size_

Detailed Description

This class encapsulates the concept of a sliding window for the engagement module. It keeps track of a recent window of connection events as well as every connection event that has occurred. The window size is adjustable from the most recent connection event. It also keeps track of the recent and overall mean delay of connection events as well as the recent and overall mean time between connection events.

Author:
Brett Ponsler (bponsler (at) wpi (dot) edu)

Definition at line 55 of file timeline.h.


Constructor & Destructor Documentation

Timeline::Timeline (  ) 

Default constructor for the Timeline class.

Definition at line 39 of file timeline.cpp.


Member Function Documentation

void Timeline::addEvent ( std::string  type,
bool  success,
unsigned long  start,
unsigned long  delay,
unsigned long  duration,
std::string  data 
)

An event has occurred, keep track of it.

Parameters:
type The type of connection event
success The success of the connection event
start The start time for the connection event
delay The delay for the connection event
duration The duration of the connection event
data The additional data

Definition at line 78 of file timeline.cpp.

int Timeline::getFailureRate (  ) 

Return the rate of failed events.

Returns:
The rate of failed connection events.

Definition at line 186 of file timeline.cpp.

unsigned long Timeline::getMaxDelay (  ) 

Return the max delay for all connection events.

Returns:
The max delay for all connection events

Definition at line 126 of file timeline.cpp.

unsigned long Timeline::getMaxDuration (  ) 

Return the max duration for all connection events.

Returns:
The max duration for all connection events

Definition at line 148 of file timeline.cpp.

unsigned long Timeline::getMaxTBCE (  ) 

Return the max time between all connection events.

Returns:
The max time between all connection events.

Definition at line 170 of file timeline.cpp.

unsigned long Timeline::getMeanDelay (  ) 

Return the mean delay for all connection events.

Returns:
The mean delay for all connection events

Definition at line 120 of file timeline.cpp.

unsigned long Timeline::getMeanDuration (  ) 

Return the mean duration for all connection events.

Returns:
The mean duration for all connection events

Definition at line 142 of file timeline.cpp.

unsigned long Timeline::getMeanTBCE (  ) 

Return the mean time between all connection events.

Returns:
The mean time between all connection events.

Definition at line 164 of file timeline.cpp.

int Timeline::getRecentFailureRate (  ) 

Return the rate of recently failed events..

Returns:
The rate of recently failed connection events.

Definition at line 205 of file timeline.cpp.

unsigned long Timeline::getRecentMaxDelay (  ) 

Return the max delay for recent connection events.

Returns:
The max delay for recent connection events

Definition at line 137 of file timeline.cpp.

unsigned long Timeline::getRecentMaxDuration (  ) 

Return the max duration for recent connection events.

Returns:
The max duration for recent connection events

Definition at line 159 of file timeline.cpp.

unsigned long Timeline::getRecentMaxTBCE (  ) 

Return the max time between recent connection events.

Returns:
The max time between recent connection events.

Definition at line 181 of file timeline.cpp.

unsigned long Timeline::getRecentMeanDelay (  ) 

Return the mean delay for recent connection events.

Returns:
The mean delay for recent connection events

Definition at line 132 of file timeline.cpp.

unsigned long Timeline::getRecentMeanDuration (  ) 

Return the mean duration for recent connection events.

Returns:
The mean duration for recent connection events

Definition at line 154 of file timeline.cpp.

unsigned long Timeline::getRecentMeanTBCE (  ) 

Return the mean time between recent connection events.

Returns:
The mean time between recent connection events.

Definition at line 176 of file timeline.cpp.

double Timeline::getWindowSize (  ) 

Get the window size for this Timeline.

Returns:
The window size

Definition at line 67 of file timeline.cpp.

void Timeline::setWindowSize ( double  window_size  ) 

Set the window size for this Timeline object.

Parameters:
window_size The new window size

Definition at line 59 of file timeline.cpp.

void Timeline::updateWindow (  )  [private]

Update the window.

Definition at line 72 of file timeline.cpp.


Member Data Documentation

The vector of connection events that have occurred.

Definition at line 54 of file timeline.h.

The mean time between connection events.

Definition at line 62 of file timeline.h.

The mean delay time for connection events.

Definition at line 58 of file timeline.h.

The mean duration time for connection events.

Definition at line 60 of file timeline.h.

unsigned long Timeline::interaction_start_time_ [private]

Store the start time of the interaction.

Definition at line 45 of file timeline.h.

int Timeline::num_failures_ [private]

Keep track of the number of failed events.

Definition at line 51 of file timeline.h.

Definition at line 55 of file timeline.h.

double Timeline::window_size_ [private]

Size of the recent window (in seconds).

Definition at line 48 of file timeline.h.


The documentation for this class was generated from the following files:
  • engagement_recognition/src/recognition/statistics/timeline.h
  • engagement_recognition/src/recognition/statistics/timeline.cpp

engagement_recognition
Author(s): Brett Ponsler (bponsler (at) wpi (dot) edu)
autogenerated on Fri Sep 9 10:35:49 2011