Main Page | Class Hierarchy | Compound List | File List | Compound Members | File Members

cosyFifo Class Reference

#include <cosyfifo.h>

Inheritance diagram for cosyFifo:

rteFifo List of all members.

Public Member Functions

 cosyFifo (FifoImpl &f, cosyRte &r)
void read (void *p, unsigned int nitems)
void write (const void *p, unsigned int nitems)
unsigned int size () const
unsigned int data () const
unsigned int room () const

Private Member Functions

unsigned int getMetricValue (FifoMetric m)
unsigned int calcSize (unsigned int lo, unsigned int hi, unsigned int s)
bool grow ()

Static Private Member Functions

const char * getMetricName (FifoMetric m)

Private Attributes

cosyRterte
unsigned int minSize
unsigned int maxSize
unsigned int countw
unsigned int countr
unsigned int wcount
unsigned int rcount
bqueue q
char * wp
char * rp
unsigned int wn
unsigned int rn
unsigned int ws
unsigned int rs
bool block
Semaphore sema
cosySelectsel

Static Private Attributes

unsigned int defaultMinSize = 1
unsigned int defaultMaxSize = 2*1024
unsigned int defaultBytes = 512

Friends

class cosySelect
class cosyNetwork

Constructor & Destructor Documentation

cosyFifo::cosyFifo FifoImpl f,
cosyRte r
 

Definition at line 38 of file cosyfifo.cc.


Member Function Documentation

unsigned int cosyFifo::calcSize unsigned int  lo,
unsigned int  hi,
unsigned int  s
[private]
 

Definition at line 27 of file cosyfifo.cc.

References cosyRte::cerr(), and rte.

unsigned int cosyFifo::data  )  const
 

Definition at line 54 of file cosyfifo.cc.

References bqueue::data(), and q.

Referenced by getMetricValue().

const char * cosyFifo::getMetricName FifoMetric  m  )  [static, private]
 

Definition at line 212 of file cosyfifo.cc.

References BytesRead, BytesWritten, Data, MaxSize, MinSize, NeededReadTokens, NeededWriteTokens, PendingReadTokens, PendingWriteTokens, ReadCalls, Room, Size, TokenSize, TokensPerRead, TokensPerWrite, TokensRead, TokensWritten, and WriteCalls.

Referenced by cosyNetwork::printFifoMetrics().

unsigned int cosyFifo::getMetricValue FifoMetric  m  )  [private]
 

Definition at line 237 of file cosyfifo.cc.

References rteFifo::api(), BytesRead, BytesWritten, countr, countw, data(), Data, maxSize, MaxSize, minSize, MinSize, NeededReadTokens, NeededWriteTokens, PendingReadTokens, PendingWriteTokens, rcount, ReadCalls, rn, room(), Room, rs, size(), Size, FifoImpl::tokenSize(), TokenSize, TokensPerRead, TokensPerWrite, TokensRead, TokensWritten, wcount, wn, WriteCalls, and ws.

Referenced by cosyNetwork::printFifoMetrics().

bool cosyFifo::grow  )  [private]
 

Definition at line 190 of file cosyfifo.cc.

References block, countw, bqueue::data(), lock, maxSize, bqueue::put(), q, bqueue::resize(), sema, Semaphore::signal(), wn, and wp.

Referenced by cosyNetwork::growFifo().

void cosyFifo::read void *  p,
unsigned int  nitems
[virtual]
 

Implements rteFifo.

Definition at line 76 of file cosyfifo.cc.

References rteFifo::api(), block, countr, bqueue::data(), bqueue::get(), lock, q, rcount, rn, bqueue::room(), rp, rs, sel, sema, Semaphore::signal(), cosySelect::signal(), FifoImpl::tokenSize(), Semaphore::wait(), and wn.

unsigned int cosyFifo::room  )  const
 

Definition at line 59 of file cosyfifo.cc.

References q, and bqueue::room().

Referenced by getMetricValue().

unsigned int cosyFifo::size  )  const
 

Definition at line 49 of file cosyfifo.cc.

References q, and bqueue::size().

Referenced by getMetricValue().

void cosyFifo::write const void *  p,
unsigned int  nitems
[virtual]
 

Implements rteFifo.

Definition at line 133 of file cosyfifo.cc.

References rteFifo::api(), block, countw, bqueue::data(), lock, bqueue::put(), q, rn, bqueue::room(), sel, sema, Semaphore::signal(), cosySelect::signal(), FifoImpl::tokenSize(), Semaphore::wait(), wcount, wn, wp, and ws.


Friends And Related Function Documentation

friend class cosyNetwork [friend]
 

Definition at line 94 of file cosyfifo.h.

friend class cosySelect [friend]
 

Definition at line 85 of file cosyfifo.h.


Member Data Documentation

bool cosyFifo::block [private]
 

Definition at line 82 of file cosyfifo.h.

Referenced by grow(), cosyNetwork::printProcessStatus(), read(), and write().

unsigned int cosyFifo::countr [private]
 

Definition at line 57 of file cosyfifo.h.

Referenced by getMetricValue(), and read().

unsigned int cosyFifo::countw [private]
 

Definition at line 56 of file cosyfifo.h.

Referenced by getMetricValue(), grow(), and write().

unsigned int cosyFifo::defaultBytes = 512 [static, private]
 

Definition at line 25 of file cosyfifo.cc.

unsigned int cosyFifo::defaultMaxSize = 2*1024 [static, private]
 

Definition at line 24 of file cosyfifo.cc.

unsigned int cosyFifo::defaultMinSize = 1 [static, private]
 

Definition at line 23 of file cosyfifo.cc.

unsigned int cosyFifo::maxSize [private]
 

Definition at line 54 of file cosyfifo.h.

Referenced by getMetricValue(), and grow().

unsigned int cosyFifo::minSize [private]
 

Definition at line 53 of file cosyfifo.h.

Referenced by getMetricValue().

bqueue cosyFifo::q [private]
 

Definition at line 72 of file cosyfifo.h.

Referenced by data(), grow(), read(), room(), size(), and write().

unsigned int cosyFifo::rcount [private]
 

Definition at line 59 of file cosyfifo.h.

Referenced by getMetricValue(), and read().

unsigned int cosyFifo::rn [private]
 

Definition at line 77 of file cosyfifo.h.

Referenced by getMetricValue(), cosyNetwork::printProcessStatus(), read(), and write().

char* cosyFifo::rp [private]
 

Definition at line 74 of file cosyfifo.h.

Referenced by read().

unsigned int cosyFifo::rs [private]
 

Definition at line 80 of file cosyfifo.h.

Referenced by getMetricValue(), cosyNetwork::printProcessStatus(), and read().

cosyRte* cosyFifo::rte [private]
 

Definition at line 51 of file cosyfifo.h.

Referenced by calcSize().

cosySelect* cosyFifo::sel [private]
 

Definition at line 86 of file cosyfifo.h.

Referenced by cosyNetwork::printProcessStatus(), read(), and write().

Semaphore cosyFifo::sema [private]
 

Definition at line 83 of file cosyfifo.h.

Referenced by grow(), read(), and write().

unsigned int cosyFifo::wcount [private]
 

Definition at line 58 of file cosyfifo.h.

Referenced by getMetricValue(), and write().

unsigned int cosyFifo::wn [private]
 

Definition at line 76 of file cosyfifo.h.

Referenced by getMetricValue(), grow(), cosyNetwork::printProcessStatus(), read(), and write().

char* cosyFifo::wp [private]
 

Definition at line 73 of file cosyfifo.h.

Referenced by grow(), and write().

unsigned int cosyFifo::ws [private]
 

Definition at line 79 of file cosyfifo.h.

Referenced by getMetricValue(), cosyNetwork::printProcessStatus(), and write().


The documentation for this class was generated from the following files:
Generated on Wed Feb 15 14:52:40 2006 for yapi by doxygen 1.3.2