39#ifndef _uhal_Buffers_hpp_
40#define _uhal_Buffers_hpp_
64 Buffers (
const uint32_t& aMaxSendSize = 65536 );
86 template<
typename T >
87 uint8_t*
send (
const T* aPtr );
94 template<
typename T >
95 uint8_t*
send (
const T& aRef );
103 uint8_t*
send (
const uint8_t* aPtr ,
const uint32_t& aSize );
109 template<
typename T >
116 template<
typename T >
124 void receive ( uint8_t* aPtr ,
const uint32_t& aSize );
A class wrapping the send and recieve buffers that are to be filled and transported and the validated...
void validate()
Helper function to mark all validated memories associated with this buffer as valid.
void add(const ValHeader &aValMem)
Helper function to associate a validated memory with this buffer so that it is guaranteed to exist wh...
std::deque< std::pair< uint8_t *, uint32_t > > mReplyBuffer
The queue of reply destinations.
void clear()
Clear the counters and the reply buffers.
const uint32_t & sendCounter()
Get the number of bytes that are currently in the send buffer.
uint32_t mReplyCounter
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.
const uint32_t & replyCounter()
Get the number of bytes that are currently expected by the reply buffer.
uint8_t * send(const T *aPtr)
Helper function to copy an object to the send 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 > > & getReplyBuffer()
Get a reference to the reply queue.
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.
std::deque< ValHeader > mValHeaders
Deque holding validated memories so that they are guaranteed to exist when the transaction is perform...
std::deque< ValVector< uint32_t > > mUnsignedValVectors
Deque holding validated memories so that they are guaranteed to exist when the transaction is perform...