Generic hardware access library
/home/cschwick/hal/generic/include/hal/VME64xFunction.hh
Go to the documentation of this file.
00001 #ifndef __VME64xFunction
00002 #define __VME64xFunction
00003 
00004 #include <list>
00005 #include "hal/VMEConfigurationSpaceHandler.hh"
00006 #include "hal/VME64xMappedWindow.hh"
00007 #include "hal/UnsupportedException.hh"
00008 #include "hal/IllegalValueException.hh"
00009 
00010 // A function is identified by an address table; if one function 
00011 // has more than one function decoder it means that the same 
00012 // functionality (= address table) is mapped into different windows.
00013 // If a module has different functions it means that in the windows
00014 // corresponding to the functions different addresse tables are valid.
00015 
00016 namespace HAL {
00017 
00018 class VME64xFunction {
00019   
00020 public:
00021   
00022   VME64xFunction( uint32_t slotId,
00023                   uint32_t functionId,
00024                   VMEConfigurationSpaceHandler* vmeAccess )
00025     throw( UnsupportedException, 
00026            IllegalValueException );
00027   
00028   VME64xFunction( uint32_t slotId,
00029                   uint32_t baseAddress,
00030                   uint32_t addressRank );
00031 
00032   virtual ~VME64xFunction();
00033 
00034   uint32_t getNumberOfMappedWindows() const;
00035   bool isImplemented() const;
00036   
00037   uint32_t getAddressRank() const;
00038 
00045   std::list< VME64xMappedWindow* > getMappedWindowPtrList() const;
00046   
00047   
00048 private:
00049   uint32_t slotId_;
00050   uint32_t functionId_; // between 0 and 7
00051   VMEConfigurationSpaceHandler* vmeConfigurationSpaceHandlerRef_; // needed to set the ADER_  
00052   std::list< VME64xMappedWindow* > mappedWindowPtrList_;  // owns the mapped windows
00053 };
00054 
00055 } /* namespace HAL */
00056 
00057 #endif /* __VME64xFunction */
00058