fdhwlib  2.0.25
/home/kopmann/git-mirror/fdhwlib/fdhwlib/Hw/FltRegister.h
Go to the documentation of this file.
00001 /***************************************************************************
00002     FltRegister.h  -  description
00003 
00004     begin                : Mon Jul 3 2000
00005     copyright            : (C) 2000 by Andreas Kopmann
00006     email                : kopmann@hpe.fzk.de
00007  ***************************************************************************/
00008 
00009 
00010 #if defined (_MSC_VER) && (_MSC_VER >= 1000)
00011 #pragma once
00012 #endif
00013 #ifndef _INC_FLTREGISTER_3916F5E9017B_INCLUDED
00014 #define _INC_FLTREGISTER_3916F5E9017B_INCLUDED
00015 
00016 #include <cstdio>
00017 
00018 #include <Pbus/Pbus.h>
00019 
00020 #include <Hw/FltDef.h>
00021 
00022 
00023 class FEunitData;
00024 
00053 //##ModelId=3991220B0054
00054 class FltRegister : public Pbus {
00055 public:
00056         //##ModelId=3917BA3B0152
00057         //inline FltRegister(unsigned long baseAddr, int chBAddr, int regID);
00058         //##ModelId=3991220B007B
00059         FltRegister(const char * name, int slotID, int regID, int r, int w);
00060 
00061   virtual ~FltRegister();
00062 
00064         unsigned long read();
00065 
00068   unsigned long read(unsigned long addr);    
00069 
00072   void readBlock(unsigned long addr, unsigned long *data, unsigned long n);
00073     
00075         void write(unsigned long data);
00076 
00079   void write(unsigned long addr, unsigned long data);
00080 
00081         
00083         //##ModelId=3991220B0076
00084         void broadcast(unsigned long  data);
00085 
00086 
00096   virtual int writeBitsByName(char *name, unsigned long data);
00097 
00107         //##ModelId=3991220B006D
00108   void writeBits(unsigned long data,unsigned long mask, int shift);
00109 
00117         //##ModelId=3991220B006B
00118   void setBitsToHigh(unsigned long mask);
00119 
00127         //##ModelId=3991220B0069
00128   void setBitsToLow(unsigned long mask);
00129 
00130  
00131   const char *getName();
00132 
00133   bool isReadable();
00134 
00135   bool isWriteable();
00136 
00138   void get(FEunitData **data);
00139   
00141   unsigned long getAddr();
00142   
00143 private:
00144         //##ModelId=3991220B0063
00145         unsigned long addr;
00146 
00147         //##ModelId=3991220B0062
00148   const char * name;
00149 
00150         //##ModelId=3991220B0061
00151   bool readable;
00152 
00153         //##ModelId=3991220B0060
00154   bool writeable;
00155 
00156 
00157 };
00158 
00159 
00160 #endif /* _INC_FLTREGISTER_3916F5E9017B_INCLUDED */
00161