42#ifndef _uhal_ProtocolMmap_hpp_
43#define _uhal_ProtocolMmap_hpp_
85 File(
const std::string& aPath,
int aFlags);
88 const std::string& getPath()
const;
89 void setPath(
const std::string& aPath);
91 void setOffset(
size_t aOffset);
96 void read(
const uint32_t aAddr,
const uint32_t aNrWords, std::vector<uint32_t>& aValues);
98 void write(
const uint32_t aAddr,
const std::vector<std::pair<const uint8_t*, size_t> >& aData);
100 bool haveLock()
const;
116 template <
typename T>
119 operator T()
const {
return value;}
122 in >> std::hex >> out.
value;
131 static std::string getSharedMemName(
const std::string& );
139 Mmap (
const std::string& aId,
const URI& aUri );
151 void implementDispatch ( std::shared_ptr< Buffers > aBuffers );
154 virtual void Flush();
157 virtual void dispatchExceptionHandler();
167 uint32_t getMaxSendSize();
173 uint32_t getMaxReplySize();
185 void write(
const std::shared_ptr<Buffers>& aBuffers);
200 uint32_t mNumberOfPages, mMaxInFlight, mPageSize, mMaxPacketSize,
mIndexNextPage, mPublishedReplyPageCount, mReadReplyPageCount;
Wrapper to generate a new Python exception type.
\rst Holds a reference to a Python object (no reference counting)
A class which provides the version-specific functionality for IPbus.
Transport protocol to transfer an IPbus buffer via device file, using mmap.
std::chrono::microseconds mSleepDuration
std::deque< std::shared_ptr< Buffers > > mReplyQueue
The list of buffers still awaiting a reply.
uint64_t mIPCSessionCount
bool mIPCExternalSessionActive
IPbus< 2, 0 > InnerProtocol
std::chrono::steady_clock SteadyClock_t
detail::SharedObject< detail::RobustSessionMutex > mIPCMutex
Wrapper for C++ object that's placed in shared memory.
#define UHAL_DEFINE_DERIVED_EXCEPTION_CLASS(ClassName, BaseClassName, ClassDescription)
Macro for simplifying the declaration and definition of derived exception types.
std::unique_lock< RobustSessionMutex > ScopedSessionLock
friend std::istream & operator>>(std::istream &in, HexTo &out)
Struct to store a URI when parsed by boost spirit.