|
YARP
Yet Another Robot Platform
|
|
Go to the documentation of this file.
9 #ifndef YARP_DEV_IMPL_FIXEDSIZEBUFFERSMANAGER_H
10 #define YARP_DEV_IMPL_FIXEDSIZEBUFFERSMANAGER_H
67 void setValue(uint32_t index, T value);
136 std::vector<T*> m_buffers;
137 std::vector<bool> m_usedBuffers;
138 std::size_t m_numElem;
139 uint32_t m_firstFreeBuff;
149 #endif // YARP_DEV_IMPL_FIXEDSIZEBUFFERSMANAGER_H
FixedSizeBuffersManager(uint32_t sizeOfBuffers, std::size_t initialNumOfBuffers=3)
Constructor.
~Buffer()
Destructor.Note that the memory will not deallocated.
T * getData()
Return the data pointer.
A manager of fixed size buffers in multi-thread environment.
Buffer< T > getBuffer()
Get a buffer and fill its information in @buffer.
T getValue(uint32_t index)
Return the value contained in the buffer at index index.
T & operator[](uint32_t index)
Access specified element.
uint32_t getSize()
Return the number of element of buffer.
std::size_t getBufferSize()
Get the number of elements of a buffer.
Buffer contains info about a buffer of type T and it is used to exchange information with yarp::dev::...
void printBuffers()
Prints info of buffers.
void releaseBuffer(Buffer< T > &buffer)
Release a buffer.
~FixedSizeBuffersManager()
Destructor.
The main, catch-all namespace for YARP.
void setValue(uint32_t index, T value)
Set the value @value in the buffer at index index.