Library of Bus-Adapters
/home/cschwick/hal/busAdapter/pci/include/hal/PCILinuxDeviceIdentifier.hh
Go to the documentation of this file.
00001 #ifndef __PCILinuxDeviceIdentifier
00002 #define __PCILinuxDeviceIdentifier
00003 
00004 #include <string>
00005 #include "hal/PCIDeviceIdentifier.hh"
00006 #include "hal/BusAdapterException.hh"
00007 #include "xpci/Bus.h"
00008 #include "xpci/Address.h"
00009 
00010 namespace HAL {
00011 
00033 class PCILinuxDeviceIdentifier : public PCIDeviceIdentifier {
00034 public :
00035 
00036   PCILinuxDeviceIdentifier( xpci::Address deviceConfigAddress,
00037                            bool swapFlag = false);
00038 
00044   virtual ~PCILinuxDeviceIdentifier();
00045 
00046   xpci::Address getConfigAddress();
00047 
00048 //  /**
00049 //   * Sets the internal data array "maps[]". 
00050 //   * @throws HardwareAccessException is thrown if the index ix is 
00051 //   *         out of range. 
00052 //   */
00053 //  void setMap( int iMap, xdsh_Pmap* map ) 
00054 //    throw (BusAdapterException);
00055 
00056 //  /**
00057 //   * Returns the bus-addresses for a given BAR.
00058 //   * This function is useful if the busAddress must be given to a 
00059 //   * DMA engine.
00060 //   *
00061 //   */
00062 
00063   uint32_t getPCIBusAddress( uint32_t iBar ) const 
00064     throw (BusAdapterException);
00065 
00069   bool doSwap() const;
00070 
00071   std::string printString() const;
00072 
00073 
00074 private:
00075   xpci::Address deviceConfigAddress;
00076   bool swapFlag;
00077 };
00078 
00079 } /* namespace HAL */
00080 
00081 #endif /* __PCILinuxDeviceIdentifier */