RingBuffer.
More...
#include <uamonitoreditem.h>
Public Member Functions |
| RingBuffer (OpcUa_UInt32 uSize) |
| construction
|
| ~RingBuffer () |
| destruction
|
void | changeSize (OpcUa_UInt32 newSize) |
| Change size of the buffer.
|
OpcUa_Void * | at (OpcUa_UInt32 index) |
| Get element at logical index.
|
OpcUa_UInt32 | getSize () |
| Get size of the buffer.
|
OpcUa_UInt32 | getCount () |
| Get number of data pieces in the buffer.
|
OpcUa_StatusCode | pushSafe (OpcUa_Void *pData) |
| Push data to the buffer.
|
OpcUa_Void * | push (OpcUa_Void *pData) |
| Push data to the buffer.
|
OpcUa_Void * | pop () |
| Pop the data from the buffer.
|
Detailed Description
RingBuffer.
Implements a ring buffer. It is not possible to create plane copies of this class. It is not possible to use the default constructor.
Constructor & Destructor Documentation
RingBuffer::RingBuffer |
( |
OpcUa_UInt32 |
uSize | ) |
|
construction
- Parameters
-
uSize | the size of the buffer |
Member Function Documentation
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_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_StatusCode RingBuffer::pushSafe |
( |
OpcUa_Void * |
pData | ) |
|
Push data to the buffer.
Returns an error if the buffer is full.
- Parameters
-
pData | Data to push into the buffer. |
- Returns
- OPC UA status code
The documentation for this class was generated from the following files:
- /home/buildbot/work/uasdkcpp/src/uaserver/uaservercpp/uamodule/uamonitoreditem.h
- /home/buildbot/work/uasdkcpp/src/uaserver/uaservercpp/uamodule/uamonitoreditem.cpp