WSF
WsfStandardAcousticSignature Class Reference

A collection of one or more acoustic signature tables that represent the acoustic signature of a platform. More...

#include <WsfStandardAcousticSignature.hpp>

Inheritance diagram for WsfStandardAcousticSignature:
Collaboration diagram for WsfStandardAcousticSignature:

Classes

class  Table
 A 'Table' represents the signature. More...
class  State
 A 'State' represents all of the tables for a given signature state. More...

Public Types

using StateIndex = std::vector<State>::size_type
Public Types inherited from WsfAcousticSignature
enum  { cSIGNATURE_INDEX = 5 }
Public Types inherited from WsfObject
typedef std::vector< WsfStringIdTypeList
 The list of types returned by GetTypeList.

Public Member Functions

 WsfStandardAcousticSignature ()
WsfAcousticSignatureClone () const override
bool InitializeType () override
std::vector< WsfStringIdGetStateNames () const override
 get the list of all valid states belonging to the signature
bool ProcessInput (UtInput &aInput) override
double GetNoisePressure (WsfStringId aStateId, double aFrequency) override
std::pair< double, double > GetNoisePressureLimits (WsfStringId aStateId) const override
double GetNoisePressure (WsfStringId aStateId, double aFrequency, double aTgtToRcvrAz, double aTgtToRcvrEl) override
bool AddStateEntry (WsfStringId aStateId, std::vector< double > &aFreqVector, std::vector< double > &aSigVector)
const std::vector< State > & GetStates () const
Public Member Functions inherited from WsfAcousticSignature
 WsfAcousticSignature ()=default
Public Member Functions inherited from WsfSignature
 WsfSignature ()
 WsfSignature (const WsfSignature &aSrc)
WsfSignatureoperator= (const WsfSignature &)=delete
 ~WsfSignature () override=default
virtual bool Initialize (double aSimTime, WsfPlatform *aPlatformPtr)
virtual bool IsA_ValidState (WsfStringId aId) const
bool RequiresPlatform () const
 indicates that a signature can be queried without a valid mPlatform
Public Member Functions inherited from WsfObject
 WsfObject ()
 This is the constructor for the WsfObject class.
 ~WsfObject () override
 This is the destructor for the WsfObject class.
const char * GetScriptClassName () const override
const std::string & GetType () const
WsfStringId GetTypeId () const
 Get the string ID of the 'type' of the object.
void SetType (WsfStringId aType)
const std::string & GetBaseType () const
WsfStringId GetBaseTypeId () const
const TypeListGetTypeList () const
bool IsA_TypeOf (WsfStringId aType) const
WsfObjectoperator= (const WsfObject &aRhs)
 Assignment operator.
template<typename T>
void Serialize (T &aBuff)
 For XIO (de)serialization.
const std::string & GetName () const
WsfStringId GetNameId () const
void SetName (WsfStringId aName)

Static Public Member Functions

static WsfAcousticSignatureObjectFactory (const std::string &aTypeName)
 Factory method called by WsfAcousticSignatureTypes.
static WsfAcousticSignatureCreateDefaultType ()
 Called by WsfAcousticSignatureTypes to create the default type to be used on platform if none provided.
static WsfStringId GetInputType (WsfPlatform *aPlatformPtr)
static WsfStringId GetState (WsfPlatform *aPlatformPtr)
static bool SetState (WsfPlatform *aPlatformPtr, WsfStringId aState)
static float GetScaleFactor (WsfPlatform *aPlatformPtr)
static bool SetScaleFactor (WsfPlatform *aPlatformPtr, float aScaleFactor)
static double GetValue (WsfPlatform *aPlatformPtr, double aFrequency)
static double GetValue (WsfPlatform *aPlatformPtr, double aFrequency, double aTgtToRcvrAz, double aTgtToRcvrEl)
static void RegisterScriptMethods (UtScriptTypes &aScriptTypes)
static void RegisterInterface (WsfScenario &aScenario)
 Register the platform interface object on the prototype signature list in the specified scenario.

Additional Inherited Members

 WsfObject (const WsfObject &aSrc)
 Copy constructor (for Clone()).
Static Protected Member Functions inherited from WsfSignature
template<class SignatureState, WsfStringId SignatureState::* IdMember, typename Iterator>
static std::vector< WsfStringIdGetStateNamesP (Iterator aBegin, Iterator aEnd)
Protected Attributes inherited from WsfSignature
WsfPlatformmPlatformPtr
double mBaseTime
bool mRequiresPlatform {false}

Detailed Description

A collection of one or more acoustic signature tables that represent the acoustic signature of a platform.

Member Typedef Documentation

◆ StateIndex

using WsfStandardAcousticSignature::StateIndex = std::vector<State>::size_type

Constructor & Destructor Documentation

◆ WsfStandardAcousticSignature()

WsfStandardAcousticSignature::WsfStandardAcousticSignature ( )

Member Function Documentation

◆ AddStateEntry()

bool WsfStandardAcousticSignature::AddStateEntry ( WsfStringId aStateId,
std::vector< double > & aFreqVector,
std::vector< double > & aSigVector )
inline

◆ Clone()

WsfAcousticSignature * WsfStandardAcousticSignature::Clone ( ) const
overridevirtual

Return a copy of this object. Must be implemented by all derived types. If cloning is impossible, a WsfUncloneableException should be thrown.

Implements WsfAcousticSignature.

References WsfAcousticSignature::WsfAcousticSignature(), and WsfStandardAcousticSignature().

◆ CreateDefaultType()

WsfAcousticSignature * WsfStandardAcousticSignature::CreateDefaultType ( )
static

Called by WsfAcousticSignatureTypes to create the default type to be used on platform if none provided.

References InitializeType(), WsfAcousticSignature::WsfAcousticSignature(), and WsfStandardAcousticSignature().

◆ GetNoisePressure() [1/2]

double WsfStandardAcousticSignature::GetNoisePressure ( WsfStringId aStateId,
double aFrequency )
overridevirtual

Get the acoustic signature for a given signature state and signal frequency.

Parameters
aStateId[input] The string ID representing the signature state to be used.
aFrequency[input] The frequency of the desired noise pressure

Implements WsfAcousticSignature.

References WsfStandardAcousticSignature::Table::mFreqLookup, WsfStandardAcousticSignature::Table::mFreqs, and WsfStandardAcousticSignature::Table::mSigs.

◆ GetNoisePressure() [2/2]

double WsfStandardAcousticSignature::GetNoisePressure ( WsfStringId aStateId,
double aFrequency,
double aTgtToRcvrAz,
double aTgtToRcvrEl )
inlineoverridevirtual

Get the acoustic signature for a given signature state and signal frequency at the given azimuth and elevation.

Parameters
aStateId[input] The string ID representing the signature state to be used.
aFrequency[input] The frequency of the desired noise pressure
aTgtToRcvrAz[input] The azimuth from the target to the receiver
aTgtToRcvrEl[input] the elevation from the target to the receiver

Implements WsfAcousticSignature.

References WsfAcousticSignature::GetNoisePressure().

◆ GetNoisePressureLimits()

std::pair< double, double > WsfStandardAcousticSignature::GetNoisePressureLimits ( WsfStringId aStateId) const
overridevirtual

Get the min and max noise pressure values that can be returned by GetNoisePressure for the given signature state.

Reimplemented from WsfAcousticSignature.

References WsfStandardAcousticSignature::Table::mSigs.

◆ GetStateNames()

std::vector< WsfStringId > WsfStandardAcousticSignature::GetStateNames ( ) const
overridevirtual

get the list of all valid states belonging to the signature

Reimplemented from WsfSignature.

References WsfSignature::GetStateNamesP(), and GetStates().

◆ GetStates()

const std::vector< WsfStandardAcousticSignature::State > & WsfStandardAcousticSignature::GetStates ( ) const
Returns
The signatures for all of defined states.
Note
This method was created to allow applications access to signature data. It should not be used to look up signatures.

Referenced by GetStateNames().

◆ InitializeType()

bool WsfStandardAcousticSignature::InitializeType ( )
overridevirtual

Initialize an signature 'type' instance. This is called by WsfObjectTypeList::LoadType after all the input for the instance has been read.

Returns
true if successful.

Reimplemented from WsfSignature.

References WsfSignature::InitializeType(), and ok.

Referenced by CreateDefaultType().

◆ ObjectFactory()

WsfAcousticSignature * WsfStandardAcousticSignature::ObjectFactory ( const std::string & aTypeName)
static

◆ ProcessInput()

bool WsfStandardAcousticSignature::ProcessInput ( UtInput & aInput)
overridevirtual

Process input from a generic source.

Examine the current input command. If it is NOT one of the commands recognized by this class then it simply returns 'false'. If it is one of the commands recognized by this class then it processes the command and returns 'true'.

Parameters
aInputa reference to a UtInput object.
Returns
'true' if the command was one recognized by the class or 'false' if not.
Exceptions
UtInput::ExceptionBase(or an object derived from it) if the command was recognized but contains some sort of error.
Note
If a derived class does not recognize the command (i.e.: the return value is false) then it should call the base class ProcessInput method. This chain should continue until either the command is recognized or the top-level base class is encountered.

Reimplemented from WsfSignature.

References WsfObject::ProcessInput().


The documentation for this class was generated from the following files:
Copyrights Multiple, All Rights Reserved