cmlabs::MediaConnection Class Reference

#include <MediaConnection.h>

Inheritance diagram for cmlabs::MediaConnection:

Inheritance graph
[legend]
Collaboration diagram for cmlabs::MediaConnection:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 MediaConnection (const JString &name, const TCPLocation &serverlocation, long hardBufferMaxSize=-1, long softBufferMaxSize=-1)
virtual ~MediaConnection ()
Objectclone () const
bool init ()
bool initWithTraining ()
bool reinit (const JString &name, const TCPLocation &serverlocation, long hardBufferMaxSize=-1, long softBufferMaxSize=-1)
bool reinitWithTraining (const JString &name, const TCPLocation &serverlocation, long hardBufferMaxSize=-1, long softBufferMaxSize=-1)
void run ()
JString getServerName ()
JString getName ()
MessagenetObjectReceive (Message *msg, NetworkConnection *con)
bool isConnected ()
bool reset ()
bool allowMessageDropping (bool allow)
bool handleMultipleWriters (bool allow)
bool isInSameExecutable (const TCPLocation &loc)
JTime getOldestTimestamp ()
JTime getNewestTimestamp ()
long getCount ()
long getSize ()
ObjectCollectiongetDataSampleList ()
InfoItemgetInfo ()
InfoItemgetInfoAllStats ()
DataSamplegetOldestDataSample ()
 Either from local buffer or from remote.
DataSamplegetNewestDataSample ()
DataSamplegetDataSample (const JTime &time)
 Either from local buffer or from remote.
ObjectCollectiongetDataSamples (const JTime &t1, const JTime &t2)
 Either from local buffer or from remote.
bool prefetchDataSamples (const JTime &t1, const JTime &t2)
 Start a retrieve to local buffer.
bool prefetchDataSample (const JTime &t)
 Start a retrieve to local buffer.
bool prefetchLastDataSampleAter (const JTime &t)
bool prefetchFirstDataSampleAter (const JTime &t)
bool hasRequestBeenRequested (PreFetchRequest *req)
 Ask the request queue.
bool isRequestPending (PreFetchRequest *req)
bool hasRequestBeenExecuted (PreFetchRequest *req)
bool didRequestSucceed (PreFetchRequest *req)
bool didRequestFail (PreFetchRequest *req)
DataSamplewaitForRequestToComplete (PreFetchRequest *req, long ms)
DataSamplewaitForFirstSampleAfter (const JTime &time, long ms)
DataSamplewaitForLastSampleAfter (const JTime &time, long ms)
DataSamplewaitForDataSample (const JTime &time, long ms)
DataSamplegetDataSample (const JString &id)
DataSamplewaitForFirstSampleAfter (const JString &id, long ms)
DataSamplewaitForLastSampleAfter (const JString &id, long ms)
JTime getOldestBufferTimestamp ()
JTime getNewestBufferTimestamp ()
long getBufferCount ()
bool addDataSample (DataSample *sample)
 Add one sample.
bool addDataSamples (ObjectCollection *samples)
 Add many samples.
ObjectCollectionaskRemoteServerForDataCollection (const JString &question, Object *obj, int timeout=-1)
DataSampleaskRemoteServerForData (const JString &question, Object *obj, int timeout=-1)
bool sendSampleToRemoteServer (const JString &question, DataSample *sample)
bool sendSamplesToRemoteServer (const JString &question, ObjectCollection *samples)
JString askRemoteServerForType (const JString &question, int timeout=-1)
JString askRemoteServerForString (const JString &question, int timeout=-1)
ObjectaskRemoteServerForObject (const JString &question, int timeout=-1)
MessageaskRemoteServer (Message *msg, int timeout=-1)
long pingServer ()
bool startContinuousBackgroundReceive ()
bool stopContinuousBackgroundReceive ()
bool isInContinuousReceive ()
ConnectionProfile getConnectionProfile ()
ConnectionProfile getServerConnectionProfile ()
bool createChannel (const JString &name, const JString &fieldname)
bool destroyChannel (const JString &name)
ObjectCollectionsearchChannel (const JString &name, double val1, double val2)
bool subscribeChannel (const JString &channel, double val1, double val2)
bool unsubscribeChannel (const JString &channel, double val1, double val2)
bool unsubscribeAllChannels ()
bool addSubscriptionEvent (DataSample *sample)
DataSamplewaitForSubscriptionEvent (int timeout)
int getSubscriptionEventQueueSize ()

Public Attributes

CommunicationRecordercomRecorder

Protected Attributes

NetworkConnectionserverCon
NetworkConnectioncontinuousCon
JString myName
MediaServermediaServer
bool shouldContinue
MediaStreammediaStream
TCPLocation server
JSemaphore newDataAvailable
JMutex connectionAccess
ObjectQueue requests
ObjectCollection pendingRequests
ObjectCollection successRequests
ObjectCollection failedRequests
ObjectQueueeventQueue
Collection subscriptions
bool allowMessageDrop


Detailed Description

Definition at line 52 of file MediaConnection.h.


Constructor & Destructor Documentation

cmlabs::MediaConnection::MediaConnection ( const JString name,
const TCPLocation serverlocation,
long  hardBufferMaxSize = -1,
long  softBufferMaxSize = -1 
)

Definition at line 77 of file MediaConnection.cpp.

cmlabs::MediaConnection::~MediaConnection (  )  [virtual]

Definition at line 103 of file MediaConnection.cpp.


Member Function Documentation

Object * cmlabs::MediaConnection::clone (  )  const [virtual]

Implements cmlabs::Object.

Definition at line 400 of file MediaConnection.cpp.

bool cmlabs::MediaConnection::init (  ) 

Definition at line 229 of file MediaConnection.cpp.

bool cmlabs::MediaConnection::initWithTraining (  ) 

Definition at line 250 of file MediaConnection.cpp.

bool cmlabs::MediaConnection::reinit ( const JString name,
const TCPLocation serverlocation,
long  hardBufferMaxSize = -1,
long  softBufferMaxSize = -1 
)

Definition at line 135 of file MediaConnection.cpp.

bool cmlabs::MediaConnection::reinitWithTraining ( const JString name,
const TCPLocation serverlocation,
long  hardBufferMaxSize = -1,
long  softBufferMaxSize = -1 
)

Definition at line 182 of file MediaConnection.cpp.

void cmlabs::MediaConnection::run (  )  [virtual]

Reimplemented from cmlabs::JThread.

Definition at line 280 of file MediaConnection.cpp.

JString cmlabs::MediaConnection::getServerName (  ) 

Definition at line 485 of file MediaConnection.cpp.

JString cmlabs::MediaConnection::getName (  )  [virtual]

Implements cmlabs::TCPReceiver.

Definition at line 461 of file MediaConnection.cpp.

Message * cmlabs::MediaConnection::netObjectReceive ( Message msg,
NetworkConnection con 
) [virtual]

Reimplemented from cmlabs::TCPReceiver.

Definition at line 404 of file MediaConnection.cpp.

bool cmlabs::MediaConnection::isConnected (  ) 

Definition at line 271 of file MediaConnection.cpp.

bool cmlabs::MediaConnection::reset (  ) 

Definition at line 389 of file MediaConnection.cpp.

bool cmlabs::MediaConnection::allowMessageDropping ( bool  allow  ) 

Definition at line 465 of file MediaConnection.cpp.

bool cmlabs::MediaConnection::handleMultipleWriters ( bool  allow  ) 

Definition at line 472 of file MediaConnection.cpp.

bool cmlabs::MediaConnection::isInSameExecutable ( const TCPLocation loc  ) 

Definition at line 513 of file MediaConnection.cpp.

JTime cmlabs::MediaConnection::getOldestTimestamp (  ) 

Definition at line 540 of file MediaConnection.cpp.

JTime cmlabs::MediaConnection::getNewestTimestamp (  ) 

Definition at line 557 of file MediaConnection.cpp.

long cmlabs::MediaConnection::getCount (  ) 

Definition at line 608 of file MediaConnection.cpp.

long cmlabs::MediaConnection::getSize (  ) 

Definition at line 619 of file MediaConnection.cpp.

ObjectCollection * cmlabs::MediaConnection::getDataSampleList (  ) 

Definition at line 630 of file MediaConnection.cpp.

InfoItem * cmlabs::MediaConnection::getInfo (  ) 

Definition at line 494 of file MediaConnection.cpp.

InfoItem * cmlabs::MediaConnection::getInfoAllStats (  ) 

Definition at line 503 of file MediaConnection.cpp.

DataSample * cmlabs::MediaConnection::getOldestDataSample (  ) 

Either from local buffer or from remote.

Definition at line 574 of file MediaConnection.cpp.

DataSample * cmlabs::MediaConnection::getNewestDataSample (  ) 

Definition at line 591 of file MediaConnection.cpp.

DataSample * cmlabs::MediaConnection::getDataSample ( const JTime time  ) 

Either from local buffer or from remote.

Definition at line 657 of file MediaConnection.cpp.

ObjectCollection * cmlabs::MediaConnection::getDataSamples ( const JTime t1,
const JTime t2 
)

Either from local buffer or from remote.

Definition at line 676 of file MediaConnection.cpp.

bool cmlabs::MediaConnection::prefetchDataSamples ( const JTime t1,
const JTime t2 
)

Start a retrieve to local buffer.

Definition at line 1027 of file MediaConnection.cpp.

bool cmlabs::MediaConnection::prefetchDataSample ( const JTime t  ) 

Start a retrieve to local buffer.

Definition at line 1046 of file MediaConnection.cpp.

bool cmlabs::MediaConnection::prefetchLastDataSampleAter ( const JTime t  ) 

Definition at line 988 of file MediaConnection.cpp.

bool cmlabs::MediaConnection::prefetchFirstDataSampleAter ( const JTime t  ) 

Definition at line 1005 of file MediaConnection.cpp.

bool cmlabs::MediaConnection::hasRequestBeenRequested ( PreFetchRequest req  ) 

Ask the request queue.

Definition at line 1068 of file MediaConnection.cpp.

bool cmlabs::MediaConnection::isRequestPending ( PreFetchRequest req  ) 

Definition at line 1079 of file MediaConnection.cpp.

bool cmlabs::MediaConnection::hasRequestBeenExecuted ( PreFetchRequest req  ) 

Definition at line 1083 of file MediaConnection.cpp.

bool cmlabs::MediaConnection::didRequestSucceed ( PreFetchRequest req  ) 

Definition at line 1092 of file MediaConnection.cpp.

bool cmlabs::MediaConnection::didRequestFail ( PreFetchRequest req  ) 

Definition at line 1096 of file MediaConnection.cpp.

DataSample * cmlabs::MediaConnection::waitForRequestToComplete ( PreFetchRequest req,
long  ms 
)

Definition at line 958 of file MediaConnection.cpp.

DataSample * cmlabs::MediaConnection::waitForFirstSampleAfter ( const JTime time,
long  ms 
)

Definition at line 854 of file MediaConnection.cpp.

DataSample * cmlabs::MediaConnection::waitForLastSampleAfter ( const JTime time,
long  ms 
)

Definition at line 885 of file MediaConnection.cpp.

DataSample * cmlabs::MediaConnection::waitForDataSample ( const JTime time,
long  ms 
)

Definition at line 917 of file MediaConnection.cpp.

DataSample * cmlabs::MediaConnection::getDataSample ( const JString id  ) 

Definition at line 646 of file MediaConnection.cpp.

DataSample * cmlabs::MediaConnection::waitForFirstSampleAfter ( const JString id,
long  ms 
)

Definition at line 792 of file MediaConnection.cpp.

DataSample * cmlabs::MediaConnection::waitForLastSampleAfter ( const JString id,
long  ms 
)

Definition at line 822 of file MediaConnection.cpp.

JTime cmlabs::MediaConnection::getOldestBufferTimestamp (  ) 

Definition at line 739 of file MediaConnection.cpp.

JTime cmlabs::MediaConnection::getNewestBufferTimestamp (  ) 

Definition at line 754 of file MediaConnection.cpp.

long cmlabs::MediaConnection::getBufferCount (  ) 

Definition at line 769 of file MediaConnection.cpp.

bool cmlabs::MediaConnection::addDataSample ( DataSample sample  ) 

Add one sample.

Definition at line 703 of file MediaConnection.cpp.

bool cmlabs::MediaConnection::addDataSamples ( ObjectCollection samples  ) 

Add many samples.

Definition at line 717 of file MediaConnection.cpp.

ObjectCollection * cmlabs::MediaConnection::askRemoteServerForDataCollection ( const JString question,
Object obj,
int  timeout = -1 
)

Definition at line 1188 of file MediaConnection.cpp.

DataSample * cmlabs::MediaConnection::askRemoteServerForData ( const JString question,
Object obj,
int  timeout = -1 
)

Definition at line 1214 of file MediaConnection.cpp.

bool cmlabs::MediaConnection::sendSampleToRemoteServer ( const JString question,
DataSample sample 
)

Definition at line 1240 of file MediaConnection.cpp.

bool cmlabs::MediaConnection::sendSamplesToRemoteServer ( const JString question,
ObjectCollection samples 
)

Definition at line 1253 of file MediaConnection.cpp.

JString cmlabs::MediaConnection::askRemoteServerForType ( const JString question,
int  timeout = -1 
)

Definition at line 1296 of file MediaConnection.cpp.

JString cmlabs::MediaConnection::askRemoteServerForString ( const JString question,
int  timeout = -1 
)

Definition at line 1282 of file MediaConnection.cpp.

Object * cmlabs::MediaConnection::askRemoteServerForObject ( const JString question,
int  timeout = -1 
)

Definition at line 1269 of file MediaConnection.cpp.

Message * cmlabs::MediaConnection::askRemoteServer ( Message msg,
int  timeout = -1 
)

Definition at line 1310 of file MediaConnection.cpp.

long cmlabs::MediaConnection::pingServer (  ) 

Definition at line 1401 of file MediaConnection.cpp.

bool cmlabs::MediaConnection::startContinuousBackgroundReceive (  ) 

Definition at line 1110 of file MediaConnection.cpp.

bool cmlabs::MediaConnection::stopContinuousBackgroundReceive (  ) 

Definition at line 1148 of file MediaConnection.cpp.

bool cmlabs::MediaConnection::isInContinuousReceive (  ) 

Definition at line 1473 of file MediaConnection.cpp.

ConnectionProfile cmlabs::MediaConnection::getConnectionProfile (  ) 

Definition at line 1389 of file MediaConnection.cpp.

ConnectionProfile cmlabs::MediaConnection::getServerConnectionProfile (  ) 

Definition at line 1371 of file MediaConnection.cpp.

bool cmlabs::MediaConnection::createChannel ( const JString name,
const JString fieldname 
)

Definition at line 1582 of file MediaConnection.cpp.

bool cmlabs::MediaConnection::destroyChannel ( const JString name  ) 

Definition at line 1599 of file MediaConnection.cpp.

ObjectCollection * cmlabs::MediaConnection::searchChannel ( const JString name,
double  val1,
double  val2 
)

Definition at line 1615 of file MediaConnection.cpp.

bool cmlabs::MediaConnection::subscribeChannel ( const JString channel,
double  val1,
double  val2 
)

Definition at line 1630 of file MediaConnection.cpp.

bool cmlabs::MediaConnection::unsubscribeChannel ( const JString channel,
double  val1,
double  val2 
)

Definition at line 1653 of file MediaConnection.cpp.

bool cmlabs::MediaConnection::unsubscribeAllChannels (  ) 

Definition at line 1678 of file MediaConnection.cpp.

bool cmlabs::MediaConnection::addSubscriptionEvent ( DataSample sample  ) 

Definition at line 440 of file MediaConnection.cpp.

DataSample * cmlabs::MediaConnection::waitForSubscriptionEvent ( int  timeout  ) 

Definition at line 452 of file MediaConnection.cpp.

int cmlabs::MediaConnection::getSubscriptionEventQueueSize (  ) 

Definition at line 434 of file MediaConnection.cpp.


Member Data Documentation

Definition at line 165 of file MediaConnection.h.

Definition at line 169 of file MediaConnection.h.

Definition at line 170 of file MediaConnection.h.

Definition at line 172 of file MediaConnection.h.

Definition at line 173 of file MediaConnection.h.

Definition at line 175 of file MediaConnection.h.

Definition at line 176 of file MediaConnection.h.

Definition at line 177 of file MediaConnection.h.

Definition at line 179 of file MediaConnection.h.

Definition at line 180 of file MediaConnection.h.

Definition at line 182 of file MediaConnection.h.

Definition at line 183 of file MediaConnection.h.

Definition at line 184 of file MediaConnection.h.

Definition at line 185 of file MediaConnection.h.

Definition at line 187 of file MediaConnection.h.

Definition at line 188 of file MediaConnection.h.

Definition at line 189 of file MediaConnection.h.


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

Generated on Tue Jul 7 16:23:10 2009 for CoreLibrary by  doxygen 1.5.6