fdhwlib  2.0.25
/home/kopmann/git-mirror/fdhwlib/fdhwlib/Pbus/pbustemplate.h
Go to the documentation of this file.
00001 /***************************************************************************
00002     pbustemplate.h  -  description
00003 
00004     begin                : Wed Jan 16 2008
00005     copyright            : (C) 2008 by A Kopmann
00006     email                : kopmann@ipe.fzk.de
00007     status               :
00008     test                 :
00009     history              :
00010  ***************************************************************************/
00011 
00012 #ifndef PBUSTEMPLATE_H
00013 #define PBUSTEMPLATE_H
00014 
00015 #include "pbusimp.h"
00016 
00017 // === Add this define in Pbus.h ===
00018 #ifdef PBUS_TEMPLATE
00019 
00020 
00021 // === Remove this documentation ===
00022 
00099 class semaphore;
00100 
00101 
00102 // === Add documentation for the access type ===
00103 
00119 class PbusTemplate : public PbusImp
00120 {
00121 
00122 public:
00123   PbusTemplate();
00124 
00125   ~PbusTemplate();
00126 
00127   const char *getMode();
00128 
00129   int getModeId();
00130 
00131   const char *getLibName();
00132 
00133   int get(std::string item, std::string *value);
00134 
00135   int init(char *inifile, int host=0);
00136 
00137   int free(int host=0);
00138 
00139   void reset();
00140 
00141   unsigned long rawRead(unsigned long addr);
00142 
00143   void rawWrite(unsigned long addr, unsigned long data);
00144 
00145   void readBlock(unsigned long addr, unsigned long * data,
00146                unsigned long n, unsigned long incr=1);
00147 
00148 private:
00149 
00150   // === Add private helper functions here ===
00151   
00152 private:
00153   // === Add private members here ===  
00154   static int handle; 
00155   
00156   
00157 };
00158 
00159 #endif  // of PBUS_TEMPLATE
00160 
00161 #endif
00162 
00163