cRingBuffer Class Reference

#include <ringbuffer.h>

Inheritance diagram for cRingBuffer:

Inheritance graph
[legend]
Collaboration diagram for cRingBuffer:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 cRingBuffer (int Size, bool Statistics=false)
virtual ~cRingBuffer ()
void SetTimeouts (int PutTimeout, int GetTimeout)
void ReportOverflow (int Bytes)

Protected Member Functions

void UpdatePercentage (int Fill)
void WaitForPut (void)
void WaitForGet (void)
void EnablePut (void)
void EnableGet (void)
virtual void Clear (void)=0
virtual int Available (void)=0
virtual int Free (void)
int Size (void)

Protected Attributes

tThreadId getThreadTid
int maxFill
int lastPercent
bool statistics

Private Attributes

cCondWait readyForPut
cCondWait readyForGet
int putTimeout
int getTimeout
int size
time_t lastOverflowReport
int overflowCount
int overflowBytes


Detailed Description

Definition at line 16 of file ringbuffer.h.


Constructor & Destructor Documentation

cRingBuffer::cRingBuffer ( int  Size,
bool  Statistics = false 
)

Definition at line 24 of file ringbuffer.c.

References getThreadTid, getTimeout, lastOverflowReport, lastPercent, maxFill, overflowBytes, overflowCount, putTimeout, size, and statistics.

cRingBuffer::~cRingBuffer (  )  [virtual]

Definition at line 36 of file ringbuffer.c.

References dsyslog, maxFill, size, and statistics.


Member Function Documentation

void cRingBuffer::UpdatePercentage ( int  Fill  )  [protected]

Definition at line 42 of file ringbuffer.c.

References dsyslog, getThreadTid, lastPercent, maxFill, PERCENTAGEDELTA, PERCENTAGETHRESHOLD, and Size().

Referenced by cRingBufferLinear::Put(), and cRingBufferLinear::Read().

Here is the call graph for this function:

void cRingBuffer::WaitForPut ( void   )  [protected]

Definition at line 55 of file ringbuffer.c.

References putTimeout, readyForPut, and cCondWait::Wait().

Referenced by cRingBufferLinear::Put(), and cRingBufferLinear::Read().

Here is the call graph for this function:

void cRingBuffer::WaitForGet ( void   )  [protected]

Definition at line 61 of file ringbuffer.c.

References getTimeout, readyForGet, and cCondWait::Wait().

Referenced by cRingBufferLinear::Get().

Here is the call graph for this function:

void cRingBuffer::EnablePut ( void   )  [protected]

Definition at line 67 of file ringbuffer.c.

References Free(), putTimeout, readyForPut, cCondWait::Signal(), and Size().

Referenced by cRingBufferFrame::Clear(), cRingBufferLinear::Clear(), cRingBufferLinear::Del(), and cRingBufferFrame::Drop().

Here is the call graph for this function:

void cRingBuffer::EnableGet ( void   )  [protected]

Definition at line 73 of file ringbuffer.c.

References Available(), getTimeout, readyForGet, cCondWait::Signal(), and Size().

Referenced by cRingBufferFrame::Clear(), cRingBufferFrame::Put(), cRingBufferLinear::Put(), and cRingBufferLinear::Read().

Here is the call graph for this function:

virtual void cRingBuffer::Clear ( void   )  [protected, pure virtual]

Implemented in cRingBufferLinear, and cRingBufferFrame.

virtual int cRingBuffer::Available ( void   )  [protected, pure virtual]

Implemented in cRingBufferLinear, and cRingBufferFrame.

Referenced by EnableGet(), and Free().

virtual int cRingBuffer::Free ( void   )  [inline, protected, virtual]

Reimplemented in cRingBufferLinear.

Definition at line 37 of file ringbuffer.h.

References Available(), and Size().

Referenced by EnablePut(), and cRingBufferFrame::Put().

Here is the call graph for this function:

int cRingBuffer::Size ( void   )  [inline, protected]

Definition at line 38 of file ringbuffer.h.

References size.

Referenced by cRingBufferLinear::Available(), cRingBufferLinear::Del(), EnableGet(), EnablePut(), cRingBufferLinear::Free(), Free(), cRingBufferLinear::Get(), cRingBufferLinear::Put(), cRingBufferLinear::Read(), and UpdatePercentage().

void cRingBuffer::SetTimeouts ( int  PutTimeout,
int  GetTimeout 
)

Definition at line 79 of file ringbuffer.c.

References getTimeout, and putTimeout.

Referenced by cRecorder::cRecorder(), cRemux::cRemux(), cTSBuffer::cTSBuffer(), and cRemux::SetTimeouts().

void cRingBuffer::ReportOverflow ( int  Bytes  ) 

Definition at line 85 of file ringbuffer.c.

References esyslog, lastOverflowReport, overflowBytes, overflowCount, and OVERFLOWREPORTDELTA.

Referenced by cTransfer::Receive(), and cRecorder::Receive().


Member Data Documentation

cCondWait cRingBuffer::readyForPut [private]

Definition at line 18 of file ringbuffer.h.

Referenced by EnablePut(), and WaitForPut().

cCondWait cRingBuffer::readyForGet [private]

Definition at line 18 of file ringbuffer.h.

Referenced by EnableGet(), and WaitForGet().

int cRingBuffer::putTimeout [private]

Definition at line 19 of file ringbuffer.h.

Referenced by cRingBuffer(), EnablePut(), SetTimeouts(), and WaitForPut().

int cRingBuffer::getTimeout [private]

Definition at line 20 of file ringbuffer.h.

Referenced by cRingBuffer(), EnableGet(), SetTimeouts(), and WaitForGet().

int cRingBuffer::size [private]

Definition at line 21 of file ringbuffer.h.

Referenced by cRingBuffer(), Size(), and ~cRingBuffer().

time_t cRingBuffer::lastOverflowReport [private]

Definition at line 22 of file ringbuffer.h.

Referenced by cRingBuffer(), and ReportOverflow().

int cRingBuffer::overflowCount [private]

Definition at line 23 of file ringbuffer.h.

Referenced by cRingBuffer(), and ReportOverflow().

int cRingBuffer::overflowBytes [private]

Definition at line 24 of file ringbuffer.h.

Referenced by cRingBuffer(), and ReportOverflow().

tThreadId cRingBuffer::getThreadTid [protected]

Definition at line 26 of file ringbuffer.h.

Referenced by cRingBuffer(), cRingBufferLinear::Get(), and UpdatePercentage().

int cRingBuffer::maxFill [protected]

Definition at line 27 of file ringbuffer.h.

Referenced by cRingBufferLinear::Clear(), cRingBuffer(), UpdatePercentage(), and ~cRingBuffer().

int cRingBuffer::lastPercent [protected]

Definition at line 28 of file ringbuffer.h.

Referenced by cRingBuffer(), and UpdatePercentage().

bool cRingBuffer::statistics [protected]

Definition at line 29 of file ringbuffer.h.

Referenced by cRingBuffer(), cRingBufferLinear::Put(), cRingBufferLinear::Read(), and ~cRingBuffer().


The documentation for this class was generated from the following files:
Generated on Tue Nov 6 20:25:28 2007 for VDR by  doxygen 1.5.3-20071008