Public Member Functions | Protected Member Functions
RealTimeArrayProcess Class Reference

Brief description of class still missing. More...

#include <RealTimeArrayProcess.h>

Inheritance diagram for RealTimeArrayProcess:
QGpCoreTools::Thread QGpCoreTools::Thread

List of all members.

Public Member Functions

bool isWaiting () const
bool isWaiting () const
 RealTimeArrayProcess (RealTimeArrayManager *manager, ArrayStations *array)
 RealTimeArrayProcess (RealTimeArrayManager *manager, ArrayStations *array)
void setFrequencyBands (const QVector< GaussianFrequencyBand > *bands)
void setFrequencyBands (const QVector< GaussianFrequencyBand > *bands)
void setKmax (double k)
void setKmin (double k)
void setMaximumSlowness (double s)
void setWavenumberRange (double kmin, double kmax)
void terminate ()
void terminate ()
bool terminated () const
bool terminated () const
 ~RealTimeArrayProcess ()
 ~RealTimeArrayProcess ()

Protected Member Functions

virtual void run ()
virtual void run ()

Detailed Description

Brief description of class still missing.

Full description of class still missing


Constructor & Destructor Documentation

RealTimeArrayProcess::RealTimeArrayProcess ( RealTimeArrayManager manager,
ArrayStations *  array 
)

Description of destructor still missing

References TRACE.

{
  TRACE;
}
RealTimeArrayProcess::RealTimeArrayProcess ( RealTimeArrayManager manager,
ArrayStations *  array 
)

Member Function Documentation

bool RealTimeArrayProcess::isWaiting ( ) const [inline]
{return _waiting.testAndSetOrdered(true, true);}
bool RealTimeArrayProcess::isWaiting ( ) const [inline]
{return _waiting.testAndSetOrdered(true, true);}
void RealTimeArrayProcess::run ( ) [protected, virtual]
{
  _manager->_mutex.lock();
  while(true) {
    while(true) {
      if(_terminate.testAndSetOrdered(true, true)) {
        _manager->_mutex.unlock();
        return;
      }
      // Check for new tasks, if nothing to do, the thread goes in sleep mode
      if(_manager->_tasks.isEmpty()) break;
      ArrayTask * t=_manager->takeTask();
      //checkblocks(true, false);
      run(t);
      //checkblocks(true, false);
      delete t;
      _manager->_mutex.lock();
    }
    printf("%s: sleeping, manager %p\n",objectName().toAscii().data(),_manager);
    _waiting.fetchAndStoreOrdered(true);
    _manager->_event.wait(&_manager->_mutex);
    _waiting.fetchAndStoreOrdered(false);
    printf("%s: waking up, manager %p\n",objectName().toAscii().data(),_manager);
  }
}
virtual void RealTimeArrayProcess::run ( ) [protected, virtual]
{_bands=bands;}

Referenced by RealTimeArrayManager::RealTimeArrayManager().

{_bands=bands;}
void RealTimeArrayProcess::setKmax ( double  k)
{
  _gridSize=k;
}
void RealTimeArrayProcess::setKmin ( double  k)
{
  _fkGridStep=0.25*k;
  _hrfkGridStep=0.1*k;
}

References PhaseShifter::setMaximumSlowness().

{
  _phaseShifter.setMaximumSlowness(s);
}
void RealTimeArrayProcess::setWavenumberRange ( double  kmin,
double  kmax 
)

References QGpCoreTools::GridSearch::setGrid().

{
  _fkGrid.setGrid(-kmax, kmax, 0.25*kmin, -kmax, kmax, 0.25*kmin);
  _hrfkGrid.setGrid(-kmax, kmax, 0.1*kmin, -kmax, kmax, 0.1*kmin);
}
{_terminate.fetchAndStoreOrdered(true);}
{_terminate.fetchAndStoreOrdered(true);}
bool RealTimeArrayProcess::terminated ( ) const [inline]
{return _terminate.testAndSetOrdered(true, true);}
bool RealTimeArrayProcess::terminated ( ) const [inline]
{return _terminate.testAndSetOrdered(true, true);}

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines