40#ifndef WOSS_PROGRAM_DEFINITIONS_H
41#define WOSS_PROGRAM_DEFINITIONS_H
53#ifdef WOSS_MULTITHREAD
73 typedef FreqSet::iterator FreqSIt;
74 typedef FreqSet::const_iterator FreqSCIt;
75 typedef FreqSet::reverse_iterator FreqSRIt;
76 typedef FreqSet::const_reverse_iterator FreqSCRIt;
79 static const int WOSS_MIN_DEPTH = 0;
81 static const int WOSS_MAX_DEPTH = INT_MAX;
83 static const int WOSS_MIN_RANGE = -INT_MAX;
85 static const int WOSS_MAX_RANGE = INT_MAX;
115 Woss(
const CoordZ& tx,
const CoordZ& rx,
const Time& start_t,
const Time& end_t,
double start_freq,
double end_freq,
double freq_step ) ;
160 virtual Pressure*
getAvgPressure(
double frequency,
double tx_depth,
double start_rx_depth = WOSS_MIN_DEPTH,
double start_rx_range = WOSS_MIN_RANGE,
double end_rx_depth = WOSS_MAX_DEPTH ,
double end_rx_range = WOSS_MAX_RANGE )
const = 0;
170 virtual Pressure*
getPressure(
double frequency,
double tx_depth,
double rx_depth,
double rx_range )
const = 0;
181 virtual TimeArr*
getTimeArr(
double frequency,
double tx_depth,
double rx_depth,
double rx_range )
const = 0;
443 #ifdef WOSS_MULTITHREAD
564 virtual bool mkWorkDir(
double curr_frequency,
int curr_run = 0 );
572 virtual bool rmWorkDir(
double curr_frequency,
int curr_run = 0 );
580 #ifdef WOSS_MULTITHREAD
594 typedef ResReaderMap::iterator RRMIter;
595 typedef ResReaderMap::reverse_iterator RRMRIter;
596 typedef ResReaderMap::const_iterator RRMCIter;
597 typedef ResReaderMap::const_reverse_iterator RRMCRIter;
598 typedef ::std::pair< RRMIter, bool > RRMPair;
629 double start_freq,
double end_freq,
double freq_step )
630 :
Woss( tx, rx, start_t, end_t, start_freq, end_freq, freq_step ) { }
3D-Coordinates (lat, long, depth) class definitions and functions library
Definition coordinates-definitions.h:403
Complex attenuated pressure class.
Definition pressure-definitions.h:59
Channel power delay profile class.
Definition time-arrival-definitions.h:82
a class for time date manipulation
Definition time-definitions.h:95
Abstraction layer for database and data manipulation.
Definition woss-db-manager.h:84
Woss class with ResReader objects for reading simulated results.
Definition woss.h:607
WossResReader()
Definition woss.h:616
ResReaderMap res_reader_map
Definition woss.h:650
void clearResReaderMap()
Definition woss.cpp:256
virtual bool initResReader(double curr_frequency)=0
WossResReader(const CoordZ &tx, const CoordZ &rx, const Time &start_t, const Time &end_t, double start_freq, double end_freq, double freq_step)
Definition woss.h:628
Abstract class that provides the interface for initializing and running a channel simulator.
Definition woss.h:94
Woss & setWorkDirPath(const ::std::string &path)
Definition woss.h:204
Woss & setStartTime(const Time &start_t)
Definition woss.h:278
virtual bool mkWorkDir(double curr_frequency, int curr_run=0)
Definition woss.cpp:188
CoordZ getRxCoordZ() const
Definition woss.h:383
Time getStartTime() const
Definition woss.h:390
double getDistance() const
Definition woss.h:421
Woss & insertFrequencies(double freq_start, double freq_end, double freq_step)
Definition woss.cpp:160
double evolution_time_quantum
Definition woss.h:496
FreqSCRIt freq_rbegin() const
Definition woss.h:343
Woss & setCleanWorkDir(bool flag)
Definition woss.h:196
double bearing
Definition woss.h:519
CoordZ tx_coordz
Definition woss.h:501
static int woss_counter
Definition woss.h:456
int getWossId() const
Definition woss.h:299
FreqSCRIt freq_rend() const
Definition woss.h:349
virtual Pressure * getPressure(double frequency, double tx_depth, double rx_depth, double rx_range) const =0
Woss & setRxCoordZ(const CoordZ &coordz)
Definition woss.h:270
Woss & setFrequencies(const FreqSet &freq_set)
Definition woss.h:235
Woss & setTxCoordZ(const CoordZ &coordz)
Definition woss.h:263
CoordZ getTxCoordZ() const
Definition woss.h:377
int getTotalRuns() const
Definition woss.h:370
const FreqSet & getFrequencies() const
Definition woss.h:312
Woss & setEndTime(const Time &end_t)
Definition woss.h:285
::std::string getWorkDirPath() const
Definition woss.h:305
virtual bool isRunning() const
Definition woss.cpp:239
virtual Pressure * getAvgPressure(double frequency, double tx_depth, double start_rx_depth=WOSS_MIN_DEPTH, double start_rx_range=WOSS_MIN_RANGE, double end_rx_depth=WOSS_MAX_DEPTH, double end_rx_range=WOSS_MAX_RANGE) const =0
double getMaxFrequency() const
Definition woss.h:324
bool debug
Definition woss.h:542
FreqSCIt freq_begin() const
Definition woss.h:331
Woss & clearFrequencies()
Definition woss.h:248
virtual bool initialize()=0
Definition woss.cpp:226
Woss & insertFrequency(double freq)
Definition woss.h:219
Woss()
Definition woss.cpp:75
Time current_time
Definition woss.h:484
FreqSCIt freq_upper_bound(double frequency) const
Definition woss.h:363
FreqSet frequencies
Definition woss.h:512
Time end_time
Definition woss.h:489
Time start_time
Definition woss.h:479
volatile bool is_running
Definition woss.h:551
double total_great_circle_distance
Definition woss.h:525
FreqSCIt freq_end() const
Definition woss.h:337
double getMinFrequency() const
Definition woss.h:318
Woss & setDebug(bool flag)
Definition woss.h:189
Woss & setEvolutionTimeQuantum(double value)
Definition woss.h:292
const WossDbManager * db_manager
Definition woss.h:473
double getGreatCircleDistance() const
Definition woss.h:415
int total_runs
Definition woss.h:536
bool usingDebug() const
Definition woss.h:432
friend void destroyWossSpinlock()
Definition woss.cpp:56
bool clean_workdir
Definition woss.h:556
static pthread_spinlock_t woss_mutex
Definition woss.h:447
::std::string work_dir_path
Definition woss.h:467
Woss & setTotalRuns(int runs)
Definition woss.h:256
virtual TimeArr * getTimeArr(double frequency, double tx_depth, double rx_depth, double rx_range) const =0
Time getEndTime() const
Definition woss.h:402
double getBearing() const
Definition woss.h:427
int woss_id
Definition woss.h:461
Woss & setWossDbManager(const WossDbManager *const ptr)
Definition woss.h:211
virtual bool rmWorkDir(double curr_frequency, int curr_run=0)
Definition woss.cpp:209
CoordZ rx_coordz
Definition woss.h:506
virtual bool isValid() const =0
double total_distance
Definition woss.h:531
virtual bool timeEvolve(const Time &time_value)=0
Woss & eraseFrequency(double freq)
Definition woss.h:242
double getEvolutionTimeQuantum() const
Definition woss.h:408
Time getCurrentTime() const
Definition woss.h:396
FreqSCIt freq_lower_bound(double frequency) const
Definition woss.h:356
Provides the interface for the woss::Coord and woss::CoordZ classes.
Provides the interface for woss::ResReader class.
Definitions and library for woss::Time, woss::SimTime, woss::TimeReference and woss::TimeReferenceTcl...
void destroyWossSpinlock()
Definition woss.cpp:56
::std::set< double > FreqSet
Definition woss.h:72
::std::map< double, ResReader * > ResReaderMap
Definition woss.h:593
::std::vector< double > RangeVector
Definition woss.h:66