42 #ifndef _uhal_ProtocolPCIe_hpp_
43 #define _uhal_ProtocolPCIe_hpp_
53 #include <boost/chrono/system_clocks.hpp>
54 #include <boost/function.hpp>
55 #include <boost/interprocess/managed_shared_memory.hpp>
56 #include <boost/noncopyable.hpp>
57 #include <boost/scoped_ptr.hpp>
58 #include <boost/thread/locks.hpp>
67 template <
class Y>
class shared_ptr;
80 UHAL_DEFINE_DERIVED_EXCEPTION_CLASS ( PCIeInitialisationError , TransportLayerError , "Exception class to handle a failure to read from the specified device files during initialisation." )
93 PacketFmt(
const uint8_t*
const,
const size_t);
94 PacketFmt(
const std::vector< std::pair<const uint8_t*, size_t> >& aData);
97 const std::vector< std::pair<const uint8_t*, size_t> >
mData;
102 File(
const std::string& aPath,
int aFlags);
105 const std::string& getPath()
const;
106 void setPath(
const std::string& aPath);
111 void createBuffer(
const size_t aNrBytes);
113 void read(
const uint32_t aAddr,
const uint32_t aNrWords, std::vector<uint32_t>& aValues);
115 void write(
const uint32_t aAddr,
const std::vector<uint32_t>& aValues);
117 void write(
const uint32_t aAddr,
const uint8_t*
const aPtr,
const size_t aNrBytes);
119 void write(
const uint32_t aAddr,
const std::vector<std::pair<const uint8_t*, size_t> >& aData);
121 bool haveLock()
const;
147 uint64_t getCounter()
const;
149 bool isActive()
const;
179 static std::string getSharedMemName(
const std::string& );
190 PCIe (
const std::string& aId,
const URI& aUri );
209 virtual void Flush( );
212 virtual void dispatchExceptionHandler();
222 uint32_t getMaxSendSize();
228 uint32_t getMaxReplySize();
264 uint32_t mNumberOfPages, mMaxInFlight, mPageSize, mMaxPacketSize, mIndexNextPage, mPublishedReplyPageCount,
mReadReplyPageCount;