FireSync API
 All Classes Files Functions Variables Typedefs Friends Macros Modules Pages
kMovingAvg.h
Go to the documentation of this file.
1 
8 #ifndef K_FIRESYNC_MOVING_AVG_H
9 #define K_FIRESYNC_MOVING_AVG_H
10 
11 #include <kFireSync/kFsDef.h>
12 
19 //typedef kObject kMovingAvg; --forward-declared in kFsDef.x.h
20 
30 kFsFx(kStatus) kMovingAvg_Construct(kMovingAvg* stat, kSize window, kAlloc allocator);
31 
40 kFsFx(kStatus) kMovingAvg_Add(kMovingAvg stat, k64s value);
41 
49 kFsFx(k64s) kMovingAvg_Value(kMovingAvg stat);
50 
58 kFsFx(kSize) kMovingAvg_Window(kMovingAvg stat);
59 
67 kFsFx(kSize) kMovingAvg_Count(kMovingAvg stat);
68 
69 #include <kFireSync/Data/kMovingAvg.x.h>
70 
71 #endif
kStatus kMovingAvg_Construct(kMovingAvg *stat, kSize window, kAlloc allocator)
Constructs a kMovingAvg object.
k64s kMovingAvg_Value(kMovingAvg stat)
Reports the current result of the running average calculation.
Represents a runinng average calculation.
Essential API declarations for the kFireSync library.
kSize kMovingAvg_Count(kMovingAvg stat)
Reports the current count of samples contributing to the average.
kSize kMovingAvg_Window(kMovingAvg stat)
Reports the window size for the average calculation.
kStatus kMovingAvg_Add(kMovingAvg stat, k64s value)
Adds a sample value to the average.