42 #ifndef _uhal_ProtocolMmap_hpp_ 43 #define _uhal_ProtocolMmap_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 ( MmapInitialisationError , 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 read(
const uint32_t aAddr,
const uint32_t aNrWords, std::vector<uint32_t>& aValues);
107 void write(
const uint32_t aAddr,
const std::vector<std::pair<const uint8_t*, size_t> >& aData);
118 Mmap& operator= (
const Mmap& aMmap );
126 Mmap (
const std::string& aId,
const URI& aUri );
143 virtual void Flush( );
147 virtual void dispatchExceptionHandler();
158 uint32_t getMaxSendSize();
164 uint32_t getMaxReplySize();
A class which provides the version-specific functionality for IPbus.
Transport protocol to transfer an IPbus buffer via device file, using mmap.
IPbus< 2, 0 > InnerProtocol
#define UHAL_DEFINE_DERIVED_EXCEPTION_CLASS(ClassName, BaseClassName, ClassDescription)
Macro for simplifying the declaration and definition of derived exception types.
An abstract base exception class providing an interface to a throw/ThrowAsDerivedType mechanism which...
std::deque< boost::shared_ptr< Buffers > > mReplyQueue
The list of buffers still awaiting a reply.
boost::chrono::steady_clock SteadyClock_t
uhal::exception::exception * mAsynchronousException
A pointer to an exception object for passing exceptions from the worker thread to the main thread...
boost::chrono::microseconds mSleepDuration
const std::vector< std::pair< const uint8_t *, size_t > > mData
uint32_t mReadReplyPageCount
Struct to store a URI when parsed by boost spirit.