#ifndef MOVING_AVERATE_H
#define MOVING_AVERATE_H

/*!
  \file
  \brief 移動平均
  
  \author Satofumi KAMIMURA
  
  $Id: movingAverage.h 286 2008-10-20 09:40:22Z satofumi $
*/


/*!
  \brief 移動平均の情報管理
*/
typedef struct {
  int size;
  int size_shift;
  int index;
  int *buffer;
  int total;
} movingAverage_t;


#include "cpp_extern_macro.h"
BEGIN_C_DECLS;

extern void initMovingAverage(movingAverage_t *ma,
			      int *buffer, int size_shift);
extern void setMovingAverage(movingAverage_t *ma, int value);
extern int getAverageValue(movingAverage_t *ma);

END_C_DECLS;
#endif /* !MOVING_AVERATE_H */
