SLikeNet 0.1.3

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
SLNet::StatisticsHistory Class Reference

Input numerical values over time. Get sum, average, highest, lowest, standard deviation on recent or all-time values. More...

`#include <slikenet/StatisticsHistory.h>`

## Classes

struct | TimeAndValue
struct | TimeAndValueQueue
struct | TrackedObject
struct | TrackedObjectData

## Public Types

enum | SHErrorCode { SH_OK, SH_UKNOWN_OBJECT, SH_UKNOWN_KEY, SH_INVALID_PARAMETER }

enum

SHSortOperation {
SH_DO_NOT_SORT, SH_SORT_BY_RECENT_SUM_ASCENDING, SH_SORT_BY_RECENT_SUM_DESCENDING, SH_SORT_BY_LONG_TERM_SUM_ASCENDING,
SH_SORT_BY_LONG_TERM_SUM_DESCENDING, SH_SORT_BY_RECENT_SUM_OF_SQUARES_ASCENDING, SH_SORT_BY_RECENT_SUM_OF_SQUARES_DESCENDING, SH_SORT_BY_RECENT_AVERAGE_ASCENDING,
SH_SORT_BY_RECENT_AVERAGE_DESCENDING, SH_SORT_BY_LONG_TERM_AVERAGE_ASCENDING, SH_SORT_BY_LONG_TERM_AVERAGE_DESCENDING, SH_SORT_BY_RECENT_HIGHEST_ASCENDING,
SH_SORT_BY_RECENT_HIGHEST_DESCENDING, SH_SORT_BY_RECENT_LOWEST_ASCENDING, SH_SORT_BY_RECENT_LOWEST_DESCENDING, SH_SORT_BY_LONG_TERM_HIGHEST_ASCENDING,
SH_SORT_BY_LONG_TERM_HIGHEST_DESCENDING, SH_SORT_BY_LONG_TERM_LOWEST_ASCENDING, SH_SORT_BY_LONG_TERM_LOWEST_DESCENDING
}

enum | SHDataCategory { DC_DISCRETE, DC_CONTINUOUS }

## Public Member Functions

| StatisticsHistory ()
virtual | ~StatisticsHistory ()
void | SetDefaultTimeToTrack (Time defaultTimeToTrack)
Time | GetDefaultTimeToTrack (void) const
bool | AddObject (TrackedObjectData tod)
bool | RemoveObject (uint64_t objectId, void **userData)
void | RemoveObjectAtIndex (unsigned int index)
void | Clear (void)
unsigned int | GetObjectCount (void) const
StatisticsHistory::TrackedObjectData * | GetObjectAtIndex (unsigned int index) const
unsigned int | GetObjectIndex (uint64_t objectId) const
bool | AddValueByObjectID (uint64_t objectId, RakString key, SHValueType val, Time curTime, bool combineEqualTimes)
void | AddValueByIndex (unsigned int index, RakString key, SHValueType val, Time curTime, bool combineEqualTimes)
SHErrorCode | GetHistoryForKey (uint64_t objectId, RakString key, TimeAndValueQueue **values, Time curTime) const
bool | GetHistorySorted (uint64_t objectId, SHSortOperation sortType, DataStructures::List< TimeAndValueQueue * > &values) const
void | MergeAllObjectsOnKey (RakString key, TimeAndValueQueue *tavqOutput, SHDataCategory dataCategory) const
void | GetUniqueKeyList (DataStructures::List< RakString > &keys)

## Static Public Member Functions

static int | TrackedObjectComp (const uint64_t &key, TrackedObject *const &data)

## Protected Attributes

DataStructures::OrderedList < uint64_t, TrackedObject *, TrackedObjectComp > | objects
Time | timeToTrack

## Detailed Description

Input numerical values over time. Get sum, average, highest, lowest, standard deviation on recent or all-time values.

Definition at line 47 of file StatisticsHistory.h.

## Class Documentation

struct SLNet::StatisticsHistory::TimeAndValue

Definition at line 129 of file StatisticsHistory.h.

Class Members
Time | time |
SHValueType | val |

## Member Enumeration Documentation

enum SLNet::StatisticsHistory::SHDataCategory

Enumerator:

  DC_DISCRETE | Insert values from one set into the other set, in time order Values at the same time end up in the final set twice Use when you have additional data points to add to a graph
  DC_CONTINUOUS | Add values from one set to values from the other set, at corresponding times If value at time t does not exist in the other set, linearly extrapolate value for other set based on nearest two data points longTerm* values are unknown using this method Use to add two graphs together

Definition at line 85 of file StatisticsHistory.h.

enum SLNet::StatisticsHistory::SHErrorCode

Enumerator:

  SH_OK |
  SH_UKNOWN_OBJECT |
  SH_UKNOWN_KEY |
  SH_INVALID_PARAMETER |

Definition at line 53 of file StatisticsHistory.h.

enum SLNet::StatisticsHistory::SHSortOperation

Enumerator:

  SH_DO_NOT_SORT |
  SH_SORT_BY_RECENT_SUM_ASCENDING |
  SH_SORT_BY_RECENT_SUM_DESCENDING |
  SH_SORT_BY_LONG_TERM_SUM_ASCENDING |
  SH_SORT_BY_LONG_TERM_SUM_DESCENDING |
  SH_SORT_BY_RECENT_SUM_OF_SQUARES_ASCENDING |
  SH_SORT_BY_RECENT_SUM_OF_SQUARES_DESCENDING |
  SH_SORT_BY_RECENT_AVERAGE_ASCENDING |
  SH_SORT_BY_RECENT_AVERAGE_DESCENDING |
  SH_SORT_BY_LONG_TERM_AVERAGE_ASCENDING |
  SH_SORT_BY_LONG_TERM_AVERAGE_DESCENDING |
  SH_SORT_BY_RECENT_HIGHEST_ASCENDING |
  SH_SORT_BY_RECENT_HIGHEST_DESCENDING |
  SH_SORT_BY_RECENT_LOWEST_ASCENDING |
  SH_SORT_BY_RECENT_LOWEST_DESCENDING |
  SH_SORT_BY_LONG_TERM_HIGHEST_ASCENDING |
  SH_SORT_BY_LONG_TERM_HIGHEST_DESCENDING |
  SH_SORT_BY_LONG_TERM_LOWEST_ASCENDING |
  SH_SORT_BY_LONG_TERM_LOWEST_DESCENDING |

Definition at line 61 of file StatisticsHistory.h.

## Constructor & Destructor Documentation

SLNet::StatisticsHistory::StatisticsHistory | ( |  | ) |

virtual SLNet::StatisticsHistory::~StatisticsHistory | ( |  | ) |

virtual

## Member Function Documentation

bool SLNet::StatisticsHistory::AddObject | ( | TrackedObjectData | tod | ) |

void SLNet::StatisticsHistory::AddValueByIndex | ( | unsigned int | index,
|  | RakString | key,
|  | SHValueType | val,
|  | Time | curTime,
|  | bool | combineEqualTimes
| ) |  |

bool SLNet::StatisticsHistory::AddValueByObjectID | ( | uint64_t | objectId,
|  | RakString | key,
|  | SHValueType | val,
|  | Time | curTime,
|  | bool | combineEqualTimes
| ) |  |

void SLNet::StatisticsHistory::Clear | ( | void |  | ) |

Time SLNet::StatisticsHistory::GetDefaultTimeToTrack | ( | void |  | ) | const

SHErrorCode SLNet::StatisticsHistory::GetHistoryForKey | ( | uint64_t | objectId,
|  | RakString | key,
|  | TimeAndValueQueue ** | values,
|  | Time | curTime
| ) |  | const

bool SLNet::StatisticsHistory::GetHistorySorted | ( | uint64_t | objectId,
|  | SHSortOperation | sortType,
|  | DataStructures::List< TimeAndValueQueue * > & | values
| ) |  | const

StatisticsHistory::TrackedObjectData* SLNet::StatisticsHistory::GetObjectAtIndex | ( | unsigned int | index | ) | const

unsigned int SLNet::StatisticsHistory::GetObjectCount | ( | void |  | ) | const

unsigned int SLNet::StatisticsHistory::GetObjectIndex | ( | uint64_t | objectId | ) | const

void SLNet::StatisticsHistory::GetUniqueKeyList | ( | DataStructures::List< RakString > & | keys | ) |

void SLNet::StatisticsHistory::MergeAllObjectsOnKey | ( | RakString | key,
|  | TimeAndValueQueue * | tavqOutput,
|  | SHDataCategory | dataCategory
| ) |  | const

bool SLNet::StatisticsHistory::RemoveObject | ( | uint64_t | objectId,
|  | void ** | userData
| ) |  |

void SLNet::StatisticsHistory::RemoveObjectAtIndex | ( | unsigned int | index | ) |

void SLNet::StatisticsHistory::SetDefaultTimeToTrack | ( | Time | defaultTimeToTrack | ) |

static int SLNet::StatisticsHistory::TrackedObjectComp | ( | const uint64_t & | key,
|  | TrackedObject *const & | data
| ) |  |

static

## Member Data Documentation

DataStructures::OrderedList<uint64_t, TrackedObject*,TrackedObjectComp> SLNet::StatisticsHistory::objects

protected

Definition at line 201 of file StatisticsHistory.h.

Time SLNet::StatisticsHistory::timeToTrack

protected

Definition at line 203 of file StatisticsHistory.h.

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

- Source/include/slikenet/StatisticsHistory.h