Library of Bus-Adapters
|
00001 #ifndef __PCIDummyDeviceIdentifier 00002 #define __PCIDummyDeviceIdentifier 00003 00004 #include <stdint.h> 00005 #include <vector> 00006 #include <string> 00007 #include "hal/PCIDeviceIdentifier.hh" 00008 00009 namespace HAL { 00010 00011 class PCIDummyDeviceIdentifier : public PCIDeviceIdentifier { 00012 public: 00013 PCIDummyDeviceIdentifier( uint32_t deviceNumber, 00014 std::vector<char *>&memorySpacePtr, 00015 char *configSpacePtr, 00016 std::vector<uint32_t> baseaddresses, 00017 std::vector<uint32_t> mapsizes, 00018 bool swapFlag = false); 00019 00020 ~PCIDummyDeviceIdentifier(); 00021 00022 std::string printString() const; 00023 00024 char* getConfigSpacePtr() const; 00025 00026 char* remap( uint32_t address ) const throw( BusAdapterException ); 00027 00028 bool doSwap() const; 00029 00030 uint32_t getPCIBusAddress( uint32_t bar ) const 00031 throw(); 00032 00033 private : 00034 uint32_t deviceNumber; 00035 std::vector<char *>memorySpacePtr_; 00036 char *configSpacePtr_; 00037 std::vector<uint32_t> baseaddresses_; 00038 std::vector<uint32_t> mapsizes_; 00039 bool swapFlag_; 00040 }; 00041 00042 } /* namespace HAL */ 00043 00044 #endif /* __PCIDummyDeviceIdentifier */ 00045