RingBuffer.
More...
#include <uamonitoreditem.h>
RingBuffer.
Implements a ring buffer. It is not possible to create shallow copies of this class. It is not possible to use the default constructor.
RingBuffer::RingBuffer |
( |
OpcUa_UInt32 |
uSize | ) |
|
construction
- Parameters
-
uSize | the size of the buffer |
OpcUa_Void * RingBuffer::at |
( |
OpcUa_UInt32 |
index | ) |
|
Get element at logical index.
- Parameters
-
index | The logical index of the element to return. |
- Returns
- Data at index or NULL if no data exists at this index.
void RingBuffer::changeSize |
( |
OpcUa_UInt32 |
newSize | ) |
|
Change size of the buffer.
- Parameters
-
newSize | the new size the buffer will get. |
OpcUa_UInt32 RingBuffer::getCount |
( |
| ) |
|
Get number of data pieces in the buffer.
- Returns
- the count of data pieces
OpcUa_UInt32 RingBuffer::getSize |
( |
| ) |
|
Get size of the buffer.
- Returns
- the size of the buffer
OpcUa_UInt32 RingBuffer::getSpace |
( |
| ) |
|
Get number of free data slots in the buffer.
- Returns
- the count of free slots
OpcUa_Void * RingBuffer::pop |
( |
| ) |
|
Pop the data from the buffer.
OpcUa_Void * RingBuffer::push |
( |
OpcUa_Void * |
pData | ) |
|
Push data to the buffer.
Adds the data and returns the oldest data if the buffer is full.
- Parameters
-
pData | Data to push into the buffer. |
OpcUa_Void * RingBuffer::pushOverwrite |
( |
OpcUa_Void * |
pData | ) |
|
Push data to the buffer.
Adds the data and returns the newest data before add if the buffer is full.
- Parameters
-
pData | Data to push into the buffer. |
The documentation for this class was generated from the following files:
- D:/work/uasdkcpp/src/uaserver/uaservercpp/uamodule/uamonitoreditem.h
- D:/work/uasdkcpp/src/uaserver/uaservercpp/uamodule/uamonitoreditem.cpp