WSF
WsfRF_Jammer::JammerMode Class Reference

#include <WsfRF_Jammer.hpp>

Inheritance diagram for WsfRF_Jammer::JammerMode:
Collaboration diagram for WsfRF_Jammer::JammerMode:

Public Types

using BeamMap = std::map<size_t, JammerBeam*>
 map<BeamIndex, JammerBeamPointer>
using XmtrVec = std::vector<JammerXmtr*>
 Need to track all of the active transmitters for DIS Emission PDU handling.

Public Member Functions

 JammerMode (const WsfScenario &aScenario)
 Construct RF Jammer.
 JammerMode (const JammerMode &aSrc)
 Copy Constructor.
JammerModeoperator= (const JammerMode &)=delete
 Move operator.
 ~JammerMode () override
Public Member Functions inherited from WsfWeapon::WsfWeaponMode
 WsfWeaponMode (const WsfScenario &aScenario)
 WsfWeaponMode (const WsfWeaponMode &aSrc)
 ~WsfWeaponMode () override=default
WsfWeaponModeoperator= (const WsfWeaponMode &)=delete
WsfPlatformGetPlatform () const
 Return the pointer to the platform to which the associated weapon is attached.
WsfWeaponGetWeapon () const
 Return the pointer to the weapon with which this mode is associated.
bool ProcessInput (UtInput &aInput) override
const WsfScenarioGetScenario () const
Public Member Functions inherited from WsfMode
 WsfMode ()
 ~WsfMode () override=default
size_t GetModeIndex () const
 Return the index of this mode within its associated mode list.
bool IsSelected () const
 Returns 'true' if the mode is selected.
Public Member Functions inherited from WsfNamed
 WsfNamed ()
 WsfNamed (WsfStringId aName)
 WsfNamed (const WsfNamed &)=default
WsfNamedoperator= (const WsfNamed &)=default
virtual ~WsfNamed ()=default
const std::string & GetName () const
WsfStringId GetNameId () const
void SetName (WsfStringId aName)

Master transmitter methods and definitions

std::unique_ptr< WsfEM_AntennamAntenna
 Master Antenna, this mode.
std::unique_ptr< JammerXmtrmXmtr
 Master transmitter, this mode.
std::unique_ptr< JammerBeammBeam
 Master beam, this mode.
bool AdjustFrequencyBandwidth (double &aFrequency, double &aBandwidth)

Beam definitions

BeamMap mActiveBeamPtrs
 List of all active beams, this mode.
BeamMap mAvailableBeamPtrs
 List of all available beams, this mode.
bool mBeamAllocationChanged
 Flag to indicate if a beam allocation change was made for the last [Start/Stop]Jamming call.
unsigned int mMaxNumBeams
PowerDistribution mBeamPowerDistribution
 Beam power distribution - average or constant - defaults to average.

Spot definitions

unsigned int mMaximumNumSpots
XmtrVec mActiveXmtrSpotPtrs
 Vector for the active jammer transmitters (i.e. spots).

Repeater definitions

WsfRF_Repeater mRepeater
 Repeater logic, this mode.
bool mUseRepeater
 Flag to specify if using a repeater, this mode.

Common infrastructure methods.

WsfModeClone () const override
bool Initialize (double aSimTime, WsfWeapon *aWeaponPtr) override
bool ProcessInput (UtInput &aInput) override
void Deselect (double aSimTime) override
void Select (double aSimTime) override
void AdjustPowerDistribution (PowerDistribution aGroupPowerDistribution, unsigned int aActiveGroupCount)

Beam methods and definitions

size_t GetActiveBeamCount () const
size_t GetAvailableBeamCount () const
JammerBeamGetJammerBeam (size_t aBeamNumber, bool &aIsActive) const
bool GetActiveBeamSpotIndexes (double aFrequency, double aBandwidth, size_t aBeamNumber, WsfTrackId aTrackId, BeamSpotIndexMap &aBeamSpotIndexMap)
JammerBeamGetNextAssignableBeam (size_t aBeamNumber, bool &aIsActive) const

Spot methods and definition for this mode

size_t GetActiveXmtrSpotCount () const
unsigned int GetMaximumXmtrSpotCount () const

Additional Inherited Members

Protected Attributes inherited from WsfWeapon::WsfWeaponMode
const WsfScenariomScenario
WsfPlatformmPlatformPtr
 Pointer to the platform with which the weapon is associated.
WsfWeaponmWeaponPtr
 Pointer to the weapon with which the mode is associated.

Member Typedef Documentation

◆ BeamMap

using WsfRF_Jammer::JammerMode::BeamMap = std::map<size_t, JammerBeam*>

map<BeamIndex, JammerBeamPointer>

◆ XmtrVec

Need to track all of the active transmitters for DIS Emission PDU handling.

Constructor & Destructor Documentation

◆ JammerMode() [1/2]

◆ JammerMode() [2/2]

◆ ~JammerMode()

WsfRF_Jammer::JammerMode::~JammerMode ( )
override

Member Function Documentation

◆ AdjustFrequencyBandwidth()

bool WsfRF_Jammer::JammerMode::AdjustFrequencyBandwidth ( double & aFrequency,
double & aBandwidth )

Adjusts the input frequency and bandwidth if the jammer is not a barrage jammer and is in the frequency limits of the master transmitter but the bandwidth is outside the frequency band of the master transmitter.

Parameters
aFrequencyThe transmitter frequency that may need adjusted, modified by this method.
aBandwidthThe transmitter bandwidth that may need adjusted, modified by this method.
Returns
Returns 'true' if the frequency and bandwidth required adjustment.

References mMaximumNumSpots, and mXmtr.

Referenced by GetActiveBeamSpotIndexes(), WsfRF_Jammer::StartJamming(), and WsfRF_Jammer::UpdateJamming().

◆ AdjustPowerDistribution()

void WsfRF_Jammer::JammerMode::AdjustPowerDistribution ( PowerDistribution aGroupPowerDistribution,
unsigned int aActiveGroupCount )

Adjust the power for each active spot transmitter. The total power is stored in the master transmitter (mXmtr).

Parameters
aGroupPowerDistributionThe power distribution of the groups (average, constant, etc.).
aActiveGroupCountThe number of active groups in the jammer suite.

References WsfRF_Jammer::cAVERAGE_POWER, mActiveBeamPtrs, WsfRF_Jammer::JammerBeam::mActiveSpotPtrs, mBeamAllocationChanged, mBeamPowerDistribution, WsfRF_Jammer::JammerBeam::mSpotPowerDistribution, and mXmtr.

Referenced by operator=(), WsfRF_Jammer::StartJamming(), and WsfRF_Jammer::StopJamming().

◆ Clone()

WsfMode * WsfRF_Jammer::JammerMode::Clone ( ) const
overridevirtual

Clone this object.

Returns
a pointer to the new object.

Implements WsfWeapon::WsfWeaponMode.

References JammerMode(), and WsfMode::WsfMode().

◆ Deselect()

void WsfRF_Jammer::JammerMode::Deselect ( double aSimTime)
overridevirtual

Deselect the mode.

Parameters
aSimTimeThe current simulation time.

Implements WsfWeapon::WsfWeaponMode.

References mActiveBeamPtrs, and mRepeater.

Referenced by operator=(), and WsfRF_Jammer::StopJamming().

◆ GetActiveBeamCount()

size_t WsfRF_Jammer::JammerMode::GetActiveBeamCount ( ) const

Find the number of active beams.

Returns
The number of active beams.

References mActiveBeamPtrs.

Referenced by WsfRF_Jammer::GetActiveBeamCount(), and WsfRF_Jammer::GetMaximumBeamCount().

◆ GetActiveBeamSpotIndexes()

bool WsfRF_Jammer::JammerMode::GetActiveBeamSpotIndexes ( double aFrequency,
double aBandwidth,
size_t aBeamNumber,
WsfTrackId aTrackId,
BeamSpotIndexMap & aBeamSpotIndexMap )

Find and return beam indexes at referenced beam parameters.

Parameters
aFrequencyThe assigned jammer transmitter frequency. (Hertz)
aBandwidthThe assigned jammer transmitter bandwidth. (Hertz)
aBeamNumberThe assigned jammer transmitter Beam Number. (0 to maximum number of beams)
aTrackIdThe assigned Track Id of the target to be jammed.
aBeamSpotIndexMapThe beam to spot index map for the active beams/spots list.
Returns
The request was successful at the supplied search criteria (frequency, bandwidth, beam number, and/or target index).

References AdjustFrequencyBandwidth(), WsfRF_Jammer::JammerBeam::GetActiveSpotIndex(), WsfRF_Jammer::JammerBeam::GetBeamNumber(), mActiveBeamPtrs, mRepeater, and mUseRepeater.

Referenced by WsfRF_Jammer::DeselectEA_Technique(), WsfRF_Jammer::GetJammerXmtr(), operator=(), WsfRF_Jammer::SelectEA_Technique(), WsfRF_Jammer::SetEA_DeltaGainTechnique(), and WsfRF_Jammer::StopJamming().

◆ GetActiveXmtrSpotCount()

size_t WsfRF_Jammer::JammerMode::GetActiveXmtrSpotCount ( ) const
inline

Get the total number of active spots for this mode

Returns
Number of active spots for this mode.

References mActiveXmtrSpotPtrs.

Referenced by GetNextAssignableBeam().

◆ GetAvailableBeamCount()

size_t WsfRF_Jammer::JammerMode::GetAvailableBeamCount ( ) const

Find the number of available beams.

Returns
The number of available beams.

References mAvailableBeamPtrs.

Referenced by WsfRF_Jammer::GetMaximumBeamCount(), and operator=().

◆ GetJammerBeam()

WsfRF_Jammer::JammerBeam * WsfRF_Jammer::JammerMode::GetJammerBeam ( size_t aBeamNumber,
bool & aIsActive ) const

Get the beam pointer for the specified beam number.

Parameters
aBeamNumberThe assigned jammer transmitter Beam Number. (1 to maximum number of beams)
aIsActiveFlag to provide the active status of the beam. Aids in determining which list the beam is in.
Returns
Pointer to the beam, returns 0 if one is not found.

References mActiveBeamPtrs, and mAvailableBeamPtrs.

Referenced by WsfRF_Jammer::GetActiveSpotCount(), WsfRF_Jammer::GetMaximumSpotCount(), GetNextAssignableBeam(), operator=(), and WsfRF_Jammer::UpdateJamming().

◆ GetMaximumXmtrSpotCount()

unsigned int WsfRF_Jammer::JammerMode::GetMaximumXmtrSpotCount ( ) const
inline

Get the maximum number of available spots for this mode

Returns
Number of available spots for this mode.

References mMaximumNumSpots.

Referenced by GetNextAssignableBeam().

◆ GetNextAssignableBeam()

WsfRF_Jammer::JammerBeam * WsfRF_Jammer::JammerMode::GetNextAssignableBeam ( size_t aBeamNumber,
bool & aIsActive ) const

Get the beam pointer for the specified beam number or select beam automatically (i.e. aBeamNumber = 0).

Parameters
aBeamNumberThe assigned jammer transmitter Beam Number. (1 to maximum number of beams)
aIsActiveFlag to provide the active status of the beam. Aids in determining which list the beam is in.
Returns
Pointer to the beam, returns 0 if one is not found.

References GetActiveXmtrSpotCount(), GetJammerBeam(), GetMaximumXmtrSpotCount(), WsfRF_Jammer::JammerBeam::mActiveSpotPtrs, WsfRF_Jammer::JammerBeam::mAvailableSpotPtrs, mMaximumNumSpots, and mMaxNumBeams.

Referenced by operator=(), and WsfRF_Jammer::StartJamming().

◆ Initialize()

bool WsfRF_Jammer::JammerMode::Initialize ( double aSimTime,
WsfWeapon * aWeaponPtr )
overridevirtual

Initialize the jammer mode.

See also
WsfWeaponMode::!Initialize
Parameters
aSimTimeThe current simulation time.
aWeaponPtrThe weapon associated to this mode
Returns
'true' if successful or 'false' if some error was encountered.

Reimplemented from WsfWeapon::WsfWeaponMode.

References WsfPlatformPart::cLEVEL_TWO_DEBUG, WsfPlatformPart::DebugEnabled(), WsfPlatformPart::GetDebugMask(), WsfPlatformPart::GetSimulation(), WsfRF_Jammer::JammerBeam::Initialize(), mAntenna, mAvailableBeamPtrs, mBeam, mMaxNumBeams, mRepeater, mXmtr, ok, and WsfWeapon::WsfWeapon().

◆ operator=()

◆ ProcessInput()

bool WsfRF_Jammer::JammerMode::ProcessInput ( UtInput & aInput)
overridevirtual

Process input from a generic source.

See also
WsfWeaponMode::ProcessInput

Reimplemented from WsfMode.

References WsfRF_Jammer::cAVERAGE_POWER, WsfRF_Jammer::cCONSTANT_POWER, mAntenna, mBeam, mBeamPowerDistribution, mMaximumNumSpots, mMaxNumBeams, mRepeater, mUseRepeater, and mXmtr.

◆ Select()

void WsfRF_Jammer::JammerMode::Select ( double aSimTime)
overridevirtual

Select the mode.

Parameters
aSimTimeThe current simulation time.

Implements WsfWeapon::WsfWeaponMode.

References mActiveBeamPtrs.

Referenced by operator=(), and WsfRF_Jammer::StartJamming().

Member Data Documentation

◆ mActiveBeamPtrs

◆ mActiveXmtrSpotPtrs

◆ mAntenna

std::unique_ptr<WsfEM_Antenna> WsfRF_Jammer::JammerMode::mAntenna

Master Antenna, this mode.

Referenced by Initialize(), JammerMode(), JammerMode(), and ProcessInput().

◆ mAvailableBeamPtrs

BeamMap WsfRF_Jammer::JammerMode::mAvailableBeamPtrs

◆ mBeam

std::unique_ptr<JammerBeam> WsfRF_Jammer::JammerMode::mBeam

Master beam, this mode.

Referenced by Initialize(), JammerMode(), JammerMode(), and ProcessInput().

◆ mBeamAllocationChanged

bool WsfRF_Jammer::JammerMode::mBeamAllocationChanged

Flag to indicate if a beam allocation change was made for the last [Start/Stop]Jamming call.

Referenced by AdjustPowerDistribution(), JammerMode(), JammerMode(), WsfRF_Jammer::StartJamming(), and WsfRF_Jammer::StopJamming().

◆ mBeamPowerDistribution

PowerDistribution WsfRF_Jammer::JammerMode::mBeamPowerDistribution

Beam power distribution - average or constant - defaults to average.

Referenced by AdjustPowerDistribution(), JammerMode(), JammerMode(), and ProcessInput().

◆ mMaximumNumSpots

unsigned int WsfRF_Jammer::JammerMode::mMaximumNumSpots

◆ mMaxNumBeams

unsigned int WsfRF_Jammer::JammerMode::mMaxNumBeams

Maximum number of beams for multi-beam jamming. Defaults to 1 (barrage jammer).

Referenced by GetNextAssignableBeam(), Initialize(), JammerMode(), JammerMode(), and ProcessInput().

◆ mRepeater

◆ mUseRepeater

◆ mXmtr


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