40#ifndef WOSS_MANAGER_DEFINITIONS_H
41#define WOSS_MANAGER_DEFINITIONS_H
67 typedef ::std::pair< double, double >
SimFreq;
240 void setTimeEvolutionActiveFlag(
bool flag ) { is_time_evolution_active = flag; }
242 void setDebugFlag(
bool flag ) {
debug = flag; }
245 const WossCreator*
const getWossCreator() {
return woss_creator; }
247 bool getTimeEvolutionActiveFlag() {
return (
bool)is_time_evolution_active; }
249 bool getDebugFlag() {
return (
bool)
debug; }
255 static const Time NO_EVOLUTION_TIME;
270 bool is_time_evolution_active;
437 #ifdef WOSS_MULTITHREAD
446 #define MAX_TOTAL_PTHREAD 32
638 ThreadCondSignal() { pthread_mutex_init( &mutex, NULL ); pthread_cond_init( &condition, NULL ); }
640 ~ThreadCondSignal() { pthread_mutex_destroy( &mutex ); pthread_cond_destroy( &condition ); }
643 pthread_mutex_t mutex;
645 pthread_cond_t condition;
651 typedef ::std::map< Woss*, ThreadCondSignal* > ActiveWoss;
652 typedef ActiveWoss::iterator AWIter;
653 typedef ActiveWoss::reverse_iterator AWRIter;
654 typedef ActiveWoss::const_iterator AWCIter;
655 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:334
virtual Pressure * getPressure(const CoordZ &coord_tx, const CoordZ &coord_rx, const double frequency, const Time &time_value) const
Definition woss-db-manager.cpp:339
virtual TimeArr * getTimeArr(const CoordZ &coord_tx, const CoordZ &coord_rx, const double frequency, const Time &time_value) const
Definition woss-db-manager.cpp:328
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:345
Multi-threaded extension of WossManagerResDb.
Definition woss-manager.h:458
int max_thread_number
Definition woss-manager.h:661
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:682
ThreadQuery thread_query
Definition woss-manager.h:710
PressureVector thread_pressure_reply
Definition woss-manager.h:721
int concurrent_threads
Definition woss-manager.h:671
::std::pair< int, ThreadParam > ThreadParamIndex
Definition woss-manager.h:632
ActiveWoss active_woss
Definition woss-manager.h:726
WossManagerResDbMT()
Definition woss-manager.cpp:417
TimeArrVector thread_time_arr_reply
Definition woss-manager.h:716
void setConcurrentThreads(int number)
Definition woss-manager.h:563
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:704
volatile int total_thread_created
Definition woss-manager.h:677
pthread_t thread_arr[MAX_TOTAL_PTHREAD]
Definition woss-manager.h:693
ThreadParamIndex popThreadParamIndex()
Definition woss-manager.cpp:459
pthread_t thread_controller
Definition woss-manager.h:688
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:666
int getConcurrentThreads()
Definition woss-manager.h:569
void initThreadVars()
Definition woss-manager.cpp:677
pthread_spinlock_t mutex
Definition woss-manager.h:699
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:293
void dbInsertTimeArr(const CoordZ &tx, const CoordZ &rx, double frequency, const Time &time_value, const TimeArr &channel) const
Definition woss-manager.h:415
const WossDbManager * woss_db_manager
Definition woss-manager.h:363
void dbInsertPressure(const CoordZ &tx, const CoordZ &rx, double frequency, const Time &time_value, const Pressure &press) const
Definition woss-manager.h:426
Pressure * dbGetPressure(const CoordZ &tx, const CoordZ &rx, double frequency, const Time &time_value) const
Definition woss-manager.h:431
TimeArr * dbGetTimeArr(const CoordZ &tx, const CoordZ &rx, double frequency, const Time &time_value) const
Definition woss-manager.h:420
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:354
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:267
const WossCreator * woss_creator
Definition woss-manager.h:261
WossManager & setWossCreator(const WossCreator *const ptr)
Definition woss-manager.h:238
virtual WossManager & eraseAllWoss()=0
Abstract class that provides the interface for initializing and running a channel simulator.
Definition woss.h:94
Provides the interface for woss::DefHandler class.
Definition woss-manager.h:635
Definition woss-manager.h:609
Definition woss-manager.h:584
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