42 #ifndef _uhal_ProtocolMmap_hpp_
43 #define _uhal_ProtocolMmap_hpp_
54 #include <boost/chrono/system_clocks.hpp>
55 #include <boost/function.hpp>
64 template <
class Y>
class shared_ptr;
77 UHAL_DEFINE_DERIVED_EXCEPTION_CLASS ( MmapInitialisationError , TransportLayerError , "Exception class to handle a failure to read from the specified device files during initialisation." )
88 PacketFmt(
const uint8_t*
const,
const size_t);
89 PacketFmt(
const std::vector< std::pair<const uint8_t*, size_t> >& aData);
92 const std::vector< std::pair<const uint8_t*, size_t> >
mData;
98 File(
const std::string& aPath,
int aFlags);
101 const std::string& getPath()
const;
102 void setPath(
const std::string& aPath);
104 void setOffset(
size_t aOffset);
109 void read(
const uint32_t aAddr,
const uint32_t aNrWords, std::vector<uint32_t>& aValues);
111 void write(
const uint32_t aAddr,
const std::vector<std::pair<const uint8_t*, size_t> >& aData);
122 template <
typename T>
125 operator T()
const {
return value;}
143 Mmap (
const std::string& aId,
const URI& aUri );
158 virtual void Flush( );
162 virtual void dispatchExceptionHandler();
173 uint32_t getMaxSendSize();
179 uint32_t getMaxReplySize();