RingBuffer Class Reference

Implements a ring buffer. It is not possible to create plane copies of this class. It is not possible to use the default constructor. More...

#include <uamonitoreditem.h>

List of all members.

Public Member Functions

 RingBuffer (OpcUa_UInt32 uSize)
 ~RingBuffer ()
void changeSize (OpcUa_UInt32 newSize)
OpcUa_Void * at (OpcUa_UInt32 index)
OpcUa_UInt32 getSize ()
OpcUa_UInt32 getCount ()
OpcUa_StatusCode pushSafe (OpcUa_Void *pData)
OpcUa_Void * push (OpcUa_Void *pData)
OpcUa_Void * pop ()

Detailed Description

Implements a ring buffer. It is not possible to create plane copies of this class. It is not possible to use the default constructor.

RingBuffer


Constructor & Destructor Documentation

RingBuffer::RingBuffer ( OpcUa_UInt32  uSize )

construction

Parameters:
uSizethe size of the buffer
RingBuffer::~RingBuffer (  )

destruction


Member Function Documentation

OpcUa_Void * RingBuffer::at ( OpcUa_UInt32  index )

Get element at logical index

Parameters:
indexThe 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:
newSizethe 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:
pDataData 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:
pDataData 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