30template <
typename T,
unsigned int Size>
42 for (
size_t i = 0; i < buffer.
count(); i++)
43 average += buffer.
get(i);
45 return average / buffer.
getSize();
55 CircularBuffer<float, Size> buffer;
T & put(const T &elem)
Puts a copy of the element in the buffer.
size_t getSize() const
Returns the maximum number of elements that can be stored in the buffer.
size_t count() const
Counts the elements in the buffer.
const T & pop()
Pops the first element in the buffer.
T & get(unsigned int i=0)
Gets an element from the buffer, without removing it.
This file includes all the types the logdecoder script will decode.