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 
13 kBeginHeader()
14 
15 
21 //typedef kObject kMovingAvg; --forward-declared in kFsDef.x.h
22 
23 
32 kFsFx(kStatus) kMovingAvg_Construct(kMovingAvg* stat, kSize window, kAlloc allocator);
33 
42 kFsFx(kStatus) kMovingAvg_Add(kMovingAvg stat, k64s value);
43 
51 kFsFx(k64s) kMovingAvg_Value(kMovingAvg stat);
52 
60 kFsFx(kSize) kMovingAvg_Window(kMovingAvg stat);
61 
69 kFsFx(kSize) kMovingAvg_Count(kMovingAvg stat);
70 
71 kEndHeader()
72 
73 #include <kFireSync/Data/kMovingAvg.x.h>
74 
75 #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.