profile_lock Class Reference
[Ocean Profiles]

Collaboration diagram for profile_lock:
Collaboration graph
[legend]

Detailed Description

A wrapper for a USML profile model that provides each instantiation with its own set of mutex's for the sound_speed() and attenuation() methods.

Examples:

ocean/test/profile_lock_test.cc.


Constructor & Destructor Documentation

profile_lock ( profile_model other  )  [inline]

Constructor Takes control of a profile_model and creates mutex's fpr each public method and for each instantiation of the class and when done destroys both.

virtual ~profile_lock (  )  [inline, virtual]

Destructor.


Member Function Documentation

virtual void attenuation ( const usml::types::wposition location,
const seq_vector frequencies,
const boost::numeric::ublas::matrix< double > &  distance,
boost::numeric::ublas::matrix< boost::numeric::ublas::vector< double > > *  attenuation 
) [inline, virtual]

Computes the broadband absorption loss of sea water with a mutex lock.

Parameters:
location Location at which to compute attenuation.
frequencies Frequencies over which to compute loss. (Hz)
distance Distance traveled through the water (meters).
attenuation Absorption loss of sea water in dB (output).
virtual void sound_speed ( const wposition location,
matrix< double > *  speed,
wvector gradient = NULL 
) [inline, virtual]

Compute the speed of sound and it's first derivatives at a series of locations with a mutex lock.

Parameters:
location Location at which to compute attenuation.
speed Speed of sound (m/s) at each location (output).
gradient Sound speed gradient at each location (output).

Implements profile_model.


Member Data Documentation

boost::mutex* _attenuationMutex [private]
profile_model* _other [private]

The "has a" object to prevent simultaneous access.

boost::mutex* _sound_speedMutex [private]

Mutex to prevent simultaneous access/update by multiple threads.


Generated on 4 May 2015 for USML by  doxygen 1.6.1