Generic hardware access library
/home/cschwick/hal/generic/include/hal/VMEAddressTable.hh
Go to the documentation of this file.
00001 #ifndef __VMEAddressTable
00002 #define __VMEAddressTable
00003 
00004 #include <string>
00005 #include <vector>
00006 #include <iostream>
00007 
00008 #include "hal/AddressTable.hh"
00009 #include "hal/AddressTableItem.hh"
00010 #include "hal/VMEHardwareAddress.hh"
00011 #include "hal/AddressTableReader.hh"
00012 #include "hal/AddressOutOfLimitsException.hh"
00013 
00014 namespace HAL {
00015 
00044 class VMEAddressTable : public AddressTable {
00045 
00046 public :
00053   VMEAddressTable( std::string name, AddressTableReader& tableReader );
00054 
00055   virtual ~VMEAddressTable();
00056   
00065   void getAddressBoundaries( std::vector<uint32_t>& minAddresses,
00066                              std::vector<uint32_t>& maxAddresses ) const;
00067 
00071   void checkAddressLimits( std::string item, uint32_t offset ) const
00072     throw( NoSuchItemException,
00073            AddressOutOfLimitsException );
00074 
00078   void checkAddressLimits( const GeneralHardwareAddress& hardwareAddress,
00079                            uint32_t offset ) const
00080     throw( AddressOutOfLimitsException );
00081   
00085   void print( std::ostream& os = std::cout ) const;
00086 
00094   void determineAddressBoundaries();
00095 private:
00096   std::vector< uint32_t > maxAddresses_;
00097   std::vector< uint32_t > minAddresses_;
00098 };
00099 
00100 } /* namespace HAL */
00101 
00102 #endif /* __VMEAddressTable */