40#ifndef WOSS_PROGRAM_DEFINITIONS_H
41#define WOSS_PROGRAM_DEFINITIONS_H
53#ifdef WOSS_MULTITHREAD
68 typedef FreqSet::iterator FreqSIt;
69 typedef FreqSet::const_iterator FreqSCIt;
70 typedef FreqSet::reverse_iterator FreqSRIt;
71 typedef FreqSet::const_reverse_iterator FreqSCRIt;
74 static const int WOSS_MIN_DEPTH = 0;
76 static const int WOSS_MAX_DEPTH = INT_MAX;
78 static const int WOSS_MIN_RANGE = -INT_MAX;
80 static const int WOSS_MAX_RANGE = INT_MAX;
110 Woss(
const CoordZ& tx,
const CoordZ& rx,
const Time& start_t,
const Time& end_t,
double start_freq,
double end_freq,
double freq_step ) ;
155 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;
165 virtual Pressure*
getPressure(
double frequency,
double tx_depth,
double rx_depth,
double rx_range )
const = 0;
176 virtual TimeArr*
getTimeArr(
double frequency,
double tx_depth,
double rx_depth,
double rx_range )
const = 0;
438#ifdef WOSS_MULTITHREAD
558 virtual bool mkWorkDir(
double curr_frequency,
int curr_run = 0 );
566 virtual bool rmWorkDir(
double curr_frequency,
int curr_run = 0 );
574#ifdef WOSS_MULTITHREAD
586 typedef ResReaderMap::iterator RRMIter;
587 typedef ResReaderMap::reverse_iterator RRMRIter;
588 typedef ResReaderMap::const_iterator RRMCIter;
589 typedef ResReaderMap::const_reverse_iterator RRMCRIter;
590 typedef ::std::pair< RRMIter, bool > RRMPair;
621 double start_freq,
double end_freq,
double freq_step )
622 :
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:599
WossResReader()
Definition woss.h:608
ResReaderMap res_reader_map
Definition woss.h:642
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:620
Abstract class that provides the interface for initializing and running a channel simulator.
Definition woss.h:89
Woss & setWorkDirPath(const ::std::string &path)
Definition woss.h:199
Woss & setStartTime(const Time &start_t)
Definition woss.h:273
virtual bool mkWorkDir(double curr_frequency, int curr_run=0)
Definition woss.cpp:188
CoordZ getRxCoordZ() const
Definition woss.h:378
Time getStartTime() const
Definition woss.h:385
double getDistance() const
Definition woss.h:416
Woss & insertFrequencies(double freq_start, double freq_end, double freq_step)
Definition woss.cpp:160
double evolution_time_quantum
Definition woss.h:490
FreqSCRIt freq_rbegin() const
Definition woss.h:338
Woss & setCleanWorkDir(bool flag)
Definition woss.h:191
double bearing
Definition woss.h:513
CoordZ tx_coordz
Definition woss.h:495
static int woss_counter
Definition woss.h:450
int getWossId() const
Definition woss.h:294
FreqSCRIt freq_rend() const
Definition woss.h:344
virtual Pressure * getPressure(double frequency, double tx_depth, double rx_depth, double rx_range) const =0
Woss & setRxCoordZ(const CoordZ &coordz)
Definition woss.h:265
Woss & setFrequencies(const FreqSet &freq_set)
Definition woss.h:230
Woss & setTxCoordZ(const CoordZ &coordz)
Definition woss.h:258
CoordZ getTxCoordZ() const
Definition woss.h:372
int getTotalRuns() const
Definition woss.h:365
const FreqSet & getFrequencies() const
Definition woss.h:307
Woss & setEndTime(const Time &end_t)
Definition woss.h:280
::std::string getWorkDirPath() const
Definition woss.h:300
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:319
bool debug
Definition woss.h:536
FreqSCIt freq_begin() const
Definition woss.h:326
Woss & clearFrequencies()
Definition woss.h:243
virtual bool initialize()=0
Definition woss.cpp:226
Woss & insertFrequency(double freq)
Definition woss.h:214
Woss()
Definition woss.cpp:75
Time current_time
Definition woss.h:478
FreqSCIt freq_upper_bound(double frequency) const
Definition woss.h:358
FreqSet frequencies
Definition woss.h:506
Time end_time
Definition woss.h:483
Time start_time
Definition woss.h:473
volatile bool is_running
Definition woss.h:545
double total_great_circle_distance
Definition woss.h:519
FreqSCIt freq_end() const
Definition woss.h:332
double getMinFrequency() const
Definition woss.h:313
Woss & setDebug(bool flag)
Definition woss.h:184
Woss & setEvolutionTimeQuantum(double value)
Definition woss.h:287
const WossDbManager * db_manager
Definition woss.h:467
double getGreatCircleDistance() const
Definition woss.h:410
int total_runs
Definition woss.h:530
bool usingDebug() const
Definition woss.h:427
friend void destroyWossSpinlock()
Definition woss.cpp:56
bool clean_workdir
Definition woss.h:550
static pthread_spinlock_t woss_mutex
Definition woss.h:442
::std::string work_dir_path
Definition woss.h:461
Woss & setTotalRuns(int runs)
Definition woss.h:251
virtual TimeArr * getTimeArr(double frequency, double tx_depth, double rx_depth, double rx_range) const =0
Time getEndTime() const
Definition woss.h:397
double getBearing() const
Definition woss.h:422
int woss_id
Definition woss.h:455
Woss & setWossDbManager(const WossDbManager *const ptr)
Definition woss.h:206
virtual bool rmWorkDir(double curr_frequency, int curr_run=0)
Definition woss.cpp:209
CoordZ rx_coordz
Definition woss.h:500
virtual bool isValid() const =0
double total_distance
Definition woss.h:525
virtual bool timeEvolve(const Time &time_value)=0
Woss & eraseFrequency(double freq)
Definition woss.h:237
double getEvolutionTimeQuantum() const
Definition woss.h:403
Time getCurrentTime() const
Definition woss.h:391
FreqSCIt freq_lower_bound(double frequency) const
Definition woss.h:351
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:67
::std::map< double, ResReader * > ResReaderMap
Definition woss.h:585