csl::RemoteStream Class Reference

#include <RemoteStream.h>

Inheritance diagram for csl::RemoteStream:

csl::UnitGenerator csl::Model

List of all members.

Public Member Functions

 RemoteStream (char *clientName, unsigned short clientPort, unsigned ch, unsigned bufSize)
 Constructor.
 ~RemoteStream ()
sample ** ioBuffers ()
 Accessors used by the reader thread.
int socket ()
unsigned short requestSize ()
unsigned bufferSwitch ()
unsigned bufferIndex ()
unsigned bufferSize ()
sem_t * semaphore ()
void nextBuffer (Buffer &outputBuffer) throw (CException)
 Get a buffer of frames.

Protected Member Functions

int initSockets (char *serverName, unsigned short serverPort)
void initPacket ()
virtual int connectToServer ()

Protected Attributes

unsigned mBufferSize
 the size of the input ring buffer (in FRAMES)
samplemIoBuffers [2]
 My IO buffers (2 for dbl-buffering; mBufferSize frames in size).
unsigned mCurrentBuffer
 current IO buffer in use
unsigned mCurrentFrame
 current position in buffer
int mSocket
 The socket I send to.
CSL_RS_MSG mHeader
 The request packet header.
struct sockaddr_in mServerAddr
 Socket addresses for the remote server and for me.
sem_t * mServerSemaphore
 Semaphore to trigger call to server for samples.


Detailed Description

RemoteStream class

Constructor & Destructor Documentation

RemoteStream::RemoteStream ( char *  clientName,
unsigned short  clientPort,
unsigned  ch,
unsigned  bufSize 
)

RemoteStream::~RemoteStream (  ) 

References closesocket, mIoBuffers, and mSocket.


Member Function Documentation

sample** csl::RemoteStream::ioBuffers (  )  [inline]

Accessors used by the reader thread.

References mIoBuffers.

int csl::RemoteStream::socket (  )  [inline]

References mSocket.

Referenced by initSockets().

unsigned short csl::RemoteStream::requestSize (  )  [inline]

unsigned csl::RemoteStream::bufferSwitch (  )  [inline]

References mCurrentBuffer.

unsigned csl::RemoteStream::bufferIndex (  )  [inline]

References mCurrentFrame.

unsigned csl::RemoteStream::bufferSize (  )  [inline]

References mBufferSize.

sem_t* csl::RemoteStream::semaphore (  )  [inline]

References mServerSemaphore.

void RemoteStream::nextBuffer ( Buffer outputBuffer  )  throw (CException) [virtual]

Get a buffer of frames.

Reimplemented from csl::UnitGenerator.

References RS_PACKET_SIZE.

int RemoteStream::initSockets ( char *  serverName,
unsigned short  serverPort 
) [protected]

void RemoteStream::initPacket (  )  [protected]

int RemoteStream::connectToServer (  )  [protected, virtual]


Member Data Documentation

unsigned csl::RemoteStream::mBufferSize [protected]

the size of the input ring buffer (in FRAMES)

Referenced by bufferSize(), initPacket(), initSockets(), and RemoteStream().

My IO buffers (2 for dbl-buffering; mBufferSize frames in size).

Referenced by connectToServer(), initPacket(), ioBuffers(), RemoteStream(), and ~RemoteStream().

unsigned csl::RemoteStream::mCurrentBuffer [protected]

current IO buffer in use

Referenced by bufferSwitch(), and RemoteStream().

unsigned csl::RemoteStream::mCurrentFrame [protected]

current position in buffer

Referenced by bufferIndex(), and RemoteStream().

int csl::RemoteStream::mSocket [protected]

The socket I send to.

Referenced by connectToServer(), initSockets(), RemoteStream(), socket(), and ~RemoteStream().

The request packet header.

Referenced by initPacket().

struct sockaddr_in csl::RemoteStream::mServerAddr [read, protected]

Socket addresses for the remote server and for me.

Referenced by connectToServer(), and initSockets().

Semaphore to trigger call to server for samples.

Referenced by initSockets(), RemoteStream(), and semaphore().


The documentation for this class was generated from the following files:

Generated on Thu Sep 17 23:14:17 2009 for CSL by  doxygen 1.5.8