fdhwlib  2.0.25
/home/kopmann/git-mirror/fdhwlib/fdhwlib/katrinhw4/fltkatrinhitratecontrol.h
Go to the documentation of this file.
00001 /***************************************************************************
00002     fltkatrinhitratecontrol.h  -  description
00003 
00004     begin                : Sep 21 2009
00005     copyright            : (C) 2000 by Till Bergmann
00006     email                : bergmann@ipe.fzk.de
00007  ***************************************************************************/
00008 
00009 
00010 #ifndef _HW4_FLTKATRINHITRATECONTROL_H_INCLUDED
00011 #define _HW4_FLTKATRINHITRATECONTROL_H_INCLUDED
00012 
00013 
00014 #include <hw4/fltdef.h>
00015 #include <hw4/baseregister.h>
00016 
00017 
00018 namespace hw4 {
00019 
00020 // --- forward declaration(s)
00021 
00022 class BaseRegisterItem;
00023 
00037 class FltKatrinHitrateControl : public BaseRegister {
00038 public:
00039   FltKatrinHitrateControl(const char *name, int slotID, int regID, int r, int w);
00040   ~FltKatrinHitrateControl();
00041 
00042   // TODO: Implement a special register item class for the coding of the sampling
00043   BaseRegisterItem *time;
00045   BaseRegisterItem *window;
00046   
00048   static int convertRegisterValueToSamplingTime(int);
00049   
00051   static int convertSamplingTimeToRegisterValue(int);
00052   
00054   enum HitrateSamplingTimes {
00055     kFLT_HITRATE_1HZ  = 0,
00056     kFLT_HITRATE_2HZ  = 1,
00057     kFLT_HITRATE_4HZ  = 2,
00058     kFLT_HITRATE_8HZ  = 3,
00059     kFLT_HITRATE_16HZ = 4,
00060     kFLT_HITRATE_32HZ = 5,
00061   };
00062 };
00063         
00064 } // namespace hw4
00065 
00066 #endif // _HW4_FLTKATRINHITRATECONTROL_H_INCLUDED
00067