EPICS ARCHIVER V4
|
In-Memory buffer for values. More...
#include <CircularBuffer.h>
Public Member Functions | |
void | allocate (DbrType type, DbrCount count, size_t num) |
Allocate buffer for num*(type,count) values. More... | |
DbrType | getDbrType () const |
DbrCount | getDbrCount () const |
size_t | getCapacity () const |
size_t | getCount () const |
Number of values in the buffer, 0...(capacity-1) | |
void | reset () |
Keep memory as is, but reset to have 0 entries. | |
size_t | getOverwrites () const |
Number of samples that had to be dropped. | |
RawValue::Data * | getNextElement () |
Advance pointer to the next element and return it. More... | |
void | addRawValue (const RawValue::Data *raw_value) |
Copy a raw value into the buffer. | |
const RawValue::Data * | getRawValue (size_t i) const |
Get a pointer to value number i without removing it. More... | |
const RawValue::Data * | removeRawValue () |
Return pointer to the oldest value in the buffer and remove it. More... | |
void | dump () const |
dump | |
In-Memory buffer for values.
Each SampleMechanism has one to buffer the incoming values until they are written to the disk.
Allocate buffer for num*(type,count) values.
|
inline |
That is: max. number of elements.
|
inline |
|
inline |
RawValue::Data* CircularBuffer::getNextElement | ( | ) |
Advance pointer to the next element and return it.
This allows you to fiddle with that element yourself, otherwise see addRawValue.
const RawValue::Data* CircularBuffer::getRawValue | ( | size_t | i | ) | const |
Get a pointer to value number i without removing it.
const RawValue::Data* CircularBuffer::removeRawValue | ( | ) |
Return pointer to the oldest value in the buffer and remove it.