42 #ifndef _uhal_ProtocolPCIe_hpp_ 43 #define _uhal_ProtocolPCIe_hpp_ 52 #include <boost/chrono/system_clocks.hpp> 53 #include <boost/function.hpp> 62 template <
class Y>
class shared_ptr;
75 UHAL_DEFINE_DERIVED_EXCEPTION_CLASS ( PCIeInitialisationError , TransportLayerError , "Exception class to handle a failure to read from the specified device files during initialisation." )
86 PacketFmt(
const uint8_t*
const,
const size_t);
87 PacketFmt(
const std::vector< std::pair<const uint8_t*, size_t> >& aData);
90 const std::vector< std::pair<const uint8_t*, size_t> >
mData;
96 File(
const std::string& aPath,
int aFlags);
99 const std::string& getPath()
const;
100 void setPath(
const std::string& aPath);
105 void createBuffer(
const size_t aNrBytes);
107 void read(
const uint32_t aAddr,
const uint32_t aNrWords, std::vector<uint32_t>& aValues);
109 void write(
const uint32_t aAddr,
const std::vector<uint32_t>& aValues);
111 void write(
const uint32_t aAddr,
const uint8_t*
const aPtr,
const size_t aNrBytes);
113 void write(
const uint32_t aAddr,
const std::vector<std::pair<const uint8_t*, size_t> >& aData);
125 PCIe& operator= (
const PCIe& aPCIe );
133 PCIe (
const std::string& aId,
const URI& aUri );
150 virtual void Flush( );
154 virtual void dispatchExceptionHandler();
165 uint32_t getMaxSendSize();
171 uint32_t getMaxReplySize();
200 uint32_t mNumberOfPages, mMaxInFlight, mPageSize, mMaxPacketSize, mIndexNextPage, mPublishedReplyPageCount,
mReadReplyPageCount;
A class which provides the version-specific functionality for IPbus.
std::ostream & operator<<(std::ostream &aStream, const PCIe::PacketFmt &aPacket)
uint32_t mReadReplyPageCount
const std::vector< std::pair< const uint8_t *, size_t > > mData
#define UHAL_DEFINE_DERIVED_EXCEPTION_CLASS(ClassName, BaseClassName, ClassDescription)
Macro for simplifying the declaration and definition of derived exception types.
File mDeviceFileFPGAToHost
FPGA-to-host device file.
An abstract base exception class providing an interface to a throw/ThrowAsDerivedType mechanism which...
uhal::exception::exception * mAsynchronousException
A pointer to an exception object for passing exceptions from the worker thread to the main thread...
boost::chrono::steady_clock SteadyClock_t
IPbus< 2, 0 > InnerProtocol
File mDeviceFileHostToFPGA
Host-to-FPGA device file.
bool mXdma7seriesWorkaround
File mDeviceFileFPGAEvent
FPGA-to-host interrupt (event) file.
Transport protocol to transfer an IPbus buffer via PCIe.
Struct to store a URI when parsed by boost spirit.
boost::chrono::microseconds mSleepDuration
std::deque< boost::shared_ptr< Buffers > > mReplyQueue
The list of buffers still awaiting a reply.