39 #ifndef _uhal_Buffers_hpp_ 40 #define _uhal_Buffers_hpp_ 64 Buffers (
const uint32_t& aMaxSendSize = 65536 );
88 template<
typename T >
89 uint8_t*
send (
const T* aPtr );
96 template<
typename T >
97 uint8_t*
send (
const T& aRef );
105 uint8_t*
send (
const uint8_t* aPtr ,
const uint32_t& aSize );
111 template<
typename T >
118 template<
typename T >
126 void receive ( uint8_t* aPtr ,
const uint32_t& aSize );
uint32_t mReplyCounter
The number of bytes that are currently expected by the reply buffer.
void receive(T *aPtr)
Helper function to add a destination object to the reply queue.
virtual ~Buffers()
Destructor.
std::deque< std::pair< uint8_t *, uint32_t > > mReplyBuffer
The queue of reply destinations.
void clear()
Clear the counters and the reply buffers.
void validate()
Helper function to mark all validated memories associated with this buffer as valid.
uint8_t * send(const T *aPtr)
Helper function to copy an object to the send buffer.
A class wrapping the send and recieve buffers that are to be filled and transported and the validated...
std::deque< std::pair< uint8_t *, uint32_t > > & getReplyBuffer()
Get a reference to the reply queue.
void add(const ValHeader &aValMem)
Helper function to associate a validated memory with this buffer so that it is guaranteed to exist wh...
Buffers(const uint32_t &aMaxSendSize=65536)
Constructor.
std::deque< ValHeader > mValHeaders
Deque holding validated memories so that they are guaranteed to exist when the transaction is perform...
std::deque< ValWord< uint32_t > > mUnsignedValWords
Deque holding validated memories so that they are guaranteed to exist when the transaction is perform...
uint32_t mSendCounter
The number of bytes that are currently in the send buffer.
const uint32_t & sendCounter()
Get the number of bytes that are currently in the send buffer.
std::deque< ValVector< uint32_t > > mUnsignedValVectors
Deque holding validated memories so that they are guaranteed to exist when the transaction is perform...
const uint32_t & replyCounter()
Get the number of bytes that are currently expected by the reply buffer.
uint8_t * getSendBuffer()
Get a pointer to the start of the send buffer.
std::vector< uint8_t > mSendBuffer
The start location of the memory buffer.