Generic hardware access library
|
00001 #ifndef __ASCIIFileModuleMapper 00002 #define __ASCIIFileModuleMapper 00003 00004 #include <map> 00005 #include <string> 00006 00007 #include "hal/ModuleMapperInterface.hh" 00008 #include "hal/NoSuchFileException.hh" 00009 00010 namespace HAL { 00011 00048 class ASCIIFileModuleMapper : public ModuleMapperInterface { 00049 00050 public: 00051 00055 ASCIIFileModuleMapper( std::string mapFile ) 00056 throw( NoSuchFileException ); 00057 00058 virtual ~ASCIIFileModuleMapper() { }; 00059 00064 std::string getTypeId( std::string serialNumber ) 00065 throw( IllegalValueException ); 00066 00070 uint32_t getBaseaddress( std::string serialNumber ) 00071 throw( IllegalValueException ); 00072 00073 private: 00074 std::string mapFile_; 00075 std::map<std::string,std::string> typeIdMap_; 00076 std::map<std::string,uint32_t> baseaddressMap_; 00077 }; 00078 00079 } /* namespace HAL */ 00080 00081 #endif /* __DatabaseModuleMapper */