40#ifndef WOSS_MANAGER_DEFINITIONS_H
41#define WOSS_MANAGER_DEFINITIONS_H
67 typedef ::std::pair< double, double >
SimFreq;
234 void setTimeEvolutionActiveFlag(
bool flag ) { is_time_evolution_active = flag; }
236 void setDebugFlag(
bool flag ) {
debug = flag; }
239 const WossCreator*
const getWossCreator() {
return woss_creator; }
241 bool getTimeEvolutionActiveFlag() {
return (
bool)is_time_evolution_active; }
243 bool getDebugFlag() {
return (
bool)
debug; }
249 static const Time NO_EVOLUTION_TIME;
264 bool is_time_evolution_active;
431 #ifdef WOSS_MULTITHREAD
440 #define MAX_TOTAL_PTHREAD 32
632 ThreadCondSignal() { pthread_mutex_init( &mutex, NULL ); pthread_cond_init( &condition, NULL ); }
634 ~ThreadCondSignal() { pthread_mutex_destroy( &mutex ); pthread_cond_destroy( &condition ); }
637 pthread_mutex_t mutex;
639 pthread_cond_t condition;
645 typedef ::std::map< Woss*, ThreadCondSignal* > ActiveWoss;
646 typedef ActiveWoss::iterator AWIter;
647 typedef ActiveWoss::reverse_iterator AWRIter;
648 typedef ActiveWoss::const_iterator AWCIter;
649 typedef ActiveWoss::const_reverse_iterator AWCRIter;
3D-Coordinates (lat, long, depth) class definitions and functions library
Definition coordinates-definitions.h:403
Complex attenuated pressure class.
Definition pressure-definitions.h:59
static const ::std::complex< double > createNotValid()
Definition pressure-definitions.h:148
static T * instance()
Definition singleton-definitions.h:99
Channel power delay profile class.
Definition time-arrival-definitions.h:82
static TimeArrMap & createNotValid()
Definition time-arrival-definitions.h:588
a class for time date manipulation
Definition time-definitions.h:95
Abstract class that provides correctly initialized Woss objects.
Definition woss-creator.h:65
Abstraction layer for database and data manipulation.
Definition woss-db-manager.h:84
virtual void insertTimeArr(const CoordZ &coord_tx, const CoordZ &coord_rx, const double frequency, const Time &time_value, const TimeArr &channel) const
Definition woss-db-manager.cpp:345
virtual Pressure * getPressure(const CoordZ &coord_tx, const CoordZ &coord_rx, const double frequency, const Time &time_value) const
Definition woss-db-manager.cpp:350
virtual TimeArr * getTimeArr(const CoordZ &coord_tx, const CoordZ &coord_rx, const double frequency, const Time &time_value) const
Definition woss-db-manager.cpp:339
virtual void insertPressure(const CoordZ &coord_tx, const CoordZ &coord_rx, const double frequency, const Time &time_value, const Pressure &pressure) const
Definition woss-db-manager.cpp:356
Multi-threaded extension of WossManagerResDb.
Definition woss-manager.h:452
int max_thread_number
Definition woss-manager.h:655
virtual TimeArr * getWossTimeArr(const CoordZ &tx_coordz, const CoordZ &rx_coordz, double start_frequency, double end_frequency, const Time &time_value)
Definition woss-manager.cpp:784
friend void * WMSMTcreateThreadTimeArr(void *ptr)
volatile int total_thread_ended
Definition woss-manager.h:676
ThreadQuery thread_query
Definition woss-manager.h:704
PressureVector thread_pressure_reply
Definition woss-manager.h:715
int concurrent_threads
Definition woss-manager.h:665
::std::pair< int, ThreadParam > ThreadParamIndex
Definition woss-manager.h:626
ActiveWoss active_woss
Definition woss-manager.h:720
WossManagerResDbMT()
Definition woss-manager.cpp:417
TimeArrVector thread_time_arr_reply
Definition woss-manager.h:710
void setConcurrentThreads(int number)
Definition woss-manager.h:557
void insertThreadReplyTimeArr(int index, woss::TimeArr *time_arr)
Definition woss-manager.cpp:770
friend void * WMSMTcreateThreadPressure(void *ptr)
pthread_spinlock_t request_mutex
Definition woss-manager.h:698
volatile int total_thread_created
Definition woss-manager.h:671
pthread_t thread_arr[MAX_TOTAL_PTHREAD]
Definition woss-manager.h:687
ThreadParamIndex popThreadParamIndex()
Definition woss-manager.cpp:459
pthread_t thread_controller
Definition woss-manager.h:682
virtual Pressure * getWossPressure(const CoordZ &tx_coordz, const CoordZ &rx_coordz, double start_frequency, double end_frequency, const Time &time_value)
Definition woss-manager.cpp:941
void checkConcurrentThreads()
Definition woss-manager.cpp:448
int total_queries
Definition woss-manager.h:660
int getConcurrentThreads()
Definition woss-manager.h:563
void initThreadVars()
Definition woss-manager.cpp:677
pthread_spinlock_t mutex
Definition woss-manager.h:693
void insertThreadReplyPressure(int index, woss::Pressure *pressure)
Definition woss-manager.cpp:777
Abstract class that implements WossManager. It adds computed results dbs control.
Definition woss-manager.h:287
void dbInsertTimeArr(const CoordZ &tx, const CoordZ &rx, double frequency, const Time &time_value, const TimeArr &channel) const
Definition woss-manager.h:409
const WossDbManager * woss_db_manager
Definition woss-manager.h:357
void dbInsertPressure(const CoordZ &tx, const CoordZ &rx, double frequency, const Time &time_value, const Pressure &press) const
Definition woss-manager.h:420
Pressure * dbGetPressure(const CoordZ &tx, const CoordZ &rx, double frequency, const Time &time_value) const
Definition woss-manager.h:425
TimeArr * dbGetTimeArr(const CoordZ &tx, const CoordZ &rx, double frequency, const Time &time_value) const
Definition woss-manager.h:414
virtual TimeArr * getWossTimeArr(const CoordZ &tx_coordz, const CoordZ &rx_coordz, double start_frequency, double end_frequency, const Time &time_value)
Definition woss-manager.cpp:264
WossManagerResDb & setWossDbManager(const WossDbManager *const ptr)
Definition woss-manager.h:348
virtual Pressure * getWossPressure(const CoordZ &tx_coordz, const CoordZ &rx_coordz, double start_frequency, double end_frequency, const Time &time_value)
Definition woss-manager.cpp:337
Abstract class that interfaces Pressure or TimeArr requests from user layer.
Definition woss-manager.h:93
virtual WossManager & eraseActiveWoss(const CoordZ &tx, const CoordZ &rx, double start_frequency, double end_frequency)=0
WossManager()
Definition woss-manager.cpp:57
virtual Pressure * getWossPressure(const CoordZ &tx_coordz, const CoordZ &rx_coordz, double start_frequency, double end_frequency, const Time &time_value)=0
Definition woss-manager.cpp:122
virtual const Woss & getActiveWoss(const CoordZ &tx, const CoordZ &rx, double start_frequency, double end_frequency) const
Definition woss-manager.cpp:248
virtual bool timeEvolve(const Time &time_value)=0
virtual TimeArr * getWossTimeArr(const CoordZ &tx_coordz, const CoordZ &rx_coordz, double start_frequency, double end_frequency, const Time &time_value)=0
Definition woss-manager.cpp:70
virtual Woss *const getWoss(const CoordZ &tx, const CoordZ &rx, double start_frequency, double end_frequency)=0
bool debug
Definition woss-manager.h:261
const WossCreator * woss_creator
Definition woss-manager.h:255
WossManager & setWossCreator(const WossCreator *const ptr)
Definition woss-manager.h:232
Abstract class that provides the interface for initializing and running a channel simulator.
Definition woss.h:89
Provides the interface for woss::DefHandler class.
Definition woss-manager.h:629
Definition woss-manager.h:603
Definition woss-manager.h:578
Definitions and library for woss::TimeArr class.
Provides the interface for woss::WossCreator class.
Provides the interface for woss::WossDbManager class.
::std::vector< CoordZPair > CoordZPairVect
Definition woss-manager.h:61
::std::vector< TimeArr * > TimeArrVector
Definition woss-manager.h:83
::std::pair< CoordZ, CoordZ > CoordZPair
Definition woss-manager.h:56
::std::pair< double, double > SimFreq
Definition woss-manager.h:67
::std::vector< SimFreq > SimFreqVector
Definition woss-manager.h:72
void * WMSMTcreateThreadTimeArr(void *ptr)
Definition woss-manager.cpp:690
::std::vector< Pressure * > PressureVector
Definition woss-manager.h:78
void * WMSMTcreateThreadPressure(void *ptr)
Definition woss-manager.cpp:732