Generic hardware access library
/home/cschwick/hal/generic/include/hal/ASCIIFileAddressTableContainer.hh
Go to the documentation of this file.
00001 #ifndef __ASCIIFileAddressTableContainer
00002 #define __ASCIIFileAddressTableContainer
00003 
00004 #include <map>
00005 #include <string>
00006 
00007 #include "hal/AddressTableContainerInterface.hh"
00008 #include "hal/ASCIIFileModuleMapper.hh"
00009 #include "hal/VMEAddressTableXMLFileReader.hh"
00010 #include "hal/PCIAddressTableXMLFileReader.hh"
00011 #include "hal/VMEAddressTableASCIIReader.hh"
00012 #include "hal/PCIAddressTableASCIIReader.hh"
00013 #include "hal/NoSuchFileException.hh"
00014 #include "hal/IllegalValueException.hh"
00015 #include "hal/XMLProcessingException.hh"
00016 
00017 namespace HAL {
00018 
00062 class ASCIIFileAddressTableContainer : public AddressTableContainerInterface {
00063 public:
00064 
00077   ASCIIFileAddressTableContainer( ASCIIFileModuleMapper& moduleMapper,
00078                                   std::string addressTableMapFile,
00079                                   std::string addressTablePrefix = "")
00080     throw( NoSuchFileException,
00081            IllegalValueException,
00082            XMLProcessingException );
00083   
00084   virtual ~ASCIIFileAddressTableContainer();
00085   
00089   VMEAddressTable& getVMETableFromSerialNumber( std::string serialNumber )
00090     throw( IllegalValueException );
00091 
00092 
00093 private:
00094   ASCIIFileModuleMapper& moduleMapper_;
00095   std::string mappingTable_;
00096   std::map< std::string, VMEAddressTable* > vmeAddressTableMap_;
00097   std::map< std::string, PCIAddressTable* > pciAddressTableMap_;
00098 };
00099 
00100 } /* namespace HAL */
00101 
00102 #endif /* __ASCIIFileAddressTableContainer */