|
WSF
|
#include <WsfRF_Jammer.hpp>


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. | |
| JammerMode & | operator= (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 | |
| WsfWeaponMode & | operator= (const WsfWeaponMode &)=delete |
| WsfPlatform * | GetPlatform () const |
| Return the pointer to the platform to which the associated weapon is attached. | |
| WsfWeapon * | GetWeapon () const |
| Return the pointer to the weapon with which this mode is associated. | |
| bool | ProcessInput (UtInput &aInput) override |
| const WsfScenario & | GetScenario () 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 | |
| WsfNamed & | operator= (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_Antenna > | mAntenna |
| Master Antenna, this mode. | |
| std::unique_ptr< JammerXmtr > | mXmtr |
| Master transmitter, this mode. | |
| std::unique_ptr< JammerBeam > | mBeam |
| 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. | |
| WsfMode * | Clone () 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 |
| JammerBeam * | GetJammerBeam (size_t aBeamNumber, bool &aIsActive) const |
| bool | GetActiveBeamSpotIndexes (double aFrequency, double aBandwidth, size_t aBeamNumber, WsfTrackId aTrackId, BeamSpotIndexMap &aBeamSpotIndexMap) |
| JammerBeam * | GetNextAssignableBeam (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 WsfScenario & | mScenario |
| WsfPlatform * | mPlatformPtr |
| Pointer to the platform with which the weapon is associated. | |
| WsfWeapon * | mWeaponPtr |
| Pointer to the weapon with which the mode is associated. | |
| using WsfRF_Jammer::JammerMode::BeamMap = std::map<size_t, JammerBeam*> |
map<BeamIndex, JammerBeamPointer>
| using WsfRF_Jammer::JammerMode::XmtrVec = std::vector<JammerXmtr*> |
Need to track all of the active transmitters for DIS Emission PDU handling.
| WsfRF_Jammer::JammerMode::JammerMode | ( | const WsfScenario & | aScenario | ) |
Construct RF Jammer.
References WsfRF_Jammer::cAVERAGE_POWER, mActiveBeamPtrs, mActiveXmtrSpotPtrs, mAntenna, mAvailableBeamPtrs, mBeam, mBeamAllocationChanged, mBeamPowerDistribution, mMaximumNumSpots, mMaxNumBeams, mRepeater, mUseRepeater, mXmtr, and WsfWeapon::WsfWeaponMode::WsfWeaponMode().
Referenced by Clone(), JammerMode(), and operator=().
| WsfRF_Jammer::JammerMode::JammerMode | ( | const JammerMode & | aSrc | ) |
Copy Constructor.
References JammerMode(), mActiveBeamPtrs, mActiveXmtrSpotPtrs, mAntenna, mAvailableBeamPtrs, mBeam, mBeamAllocationChanged, mBeamPowerDistribution, mMaximumNumSpots, mMaxNumBeams, mRepeater, mUseRepeater, mXmtr, and WsfWeapon::WsfWeaponMode::WsfWeaponMode().
|
override |
References mActiveBeamPtrs, and mAvailableBeamPtrs.
| 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.
| aFrequency | The transmitter frequency that may need adjusted, modified by this method. |
| aBandwidth | The transmitter bandwidth that may need adjusted, modified by this method. |
References mMaximumNumSpots, and mXmtr.
Referenced by GetActiveBeamSpotIndexes(), WsfRF_Jammer::StartJamming(), and WsfRF_Jammer::UpdateJamming().
| 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).
| aGroupPowerDistribution | The power distribution of the groups (average, constant, etc.). |
| aActiveGroupCount | The 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().
|
overridevirtual |
Clone this object.
Implements WsfWeapon::WsfWeaponMode.
References JammerMode(), and WsfMode::WsfMode().
|
overridevirtual |
Deselect the mode.
| aSimTime | The current simulation time. |
Implements WsfWeapon::WsfWeaponMode.
References mActiveBeamPtrs, and mRepeater.
Referenced by operator=(), and WsfRF_Jammer::StopJamming().
| size_t WsfRF_Jammer::JammerMode::GetActiveBeamCount | ( | ) | const |
Find the number of active beams.
References mActiveBeamPtrs.
Referenced by WsfRF_Jammer::GetActiveBeamCount(), and WsfRF_Jammer::GetMaximumBeamCount().
| 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.
| aFrequency | The assigned jammer transmitter frequency. (Hertz) |
| aBandwidth | The assigned jammer transmitter bandwidth. (Hertz) |
| aBeamNumber | The assigned jammer transmitter Beam Number. (0 to maximum number of beams) |
| aTrackId | The assigned Track Id of the target to be jammed. |
| aBeamSpotIndexMap | The beam to spot index map for the active beams/spots list. |
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().
|
inline |
Get the total number of active spots for this mode
References mActiveXmtrSpotPtrs.
Referenced by GetNextAssignableBeam().
| size_t WsfRF_Jammer::JammerMode::GetAvailableBeamCount | ( | ) | const |
Find the number of available beams.
References mAvailableBeamPtrs.
Referenced by WsfRF_Jammer::GetMaximumBeamCount(), and operator=().
| WsfRF_Jammer::JammerBeam * WsfRF_Jammer::JammerMode::GetJammerBeam | ( | size_t | aBeamNumber, |
| bool & | aIsActive ) const |
Get the beam pointer for the specified beam number.
| aBeamNumber | The assigned jammer transmitter Beam Number. (1 to maximum number of beams) |
| aIsActive | Flag to provide the active status of the beam. Aids in determining which list the beam is in. |
References mActiveBeamPtrs, and mAvailableBeamPtrs.
Referenced by WsfRF_Jammer::GetActiveSpotCount(), WsfRF_Jammer::GetMaximumSpotCount(), GetNextAssignableBeam(), operator=(), and WsfRF_Jammer::UpdateJamming().
|
inline |
Get the maximum number of available spots for this mode
References mMaximumNumSpots.
Referenced by 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).
| aBeamNumber | The assigned jammer transmitter Beam Number. (1 to maximum number of beams) |
| aIsActive | Flag to provide the active status of the beam. Aids in determining which list the beam is in. |
References GetActiveXmtrSpotCount(), GetJammerBeam(), GetMaximumXmtrSpotCount(), WsfRF_Jammer::JammerBeam::mActiveSpotPtrs, WsfRF_Jammer::JammerBeam::mAvailableSpotPtrs, mMaximumNumSpots, and mMaxNumBeams.
Referenced by operator=(), and WsfRF_Jammer::StartJamming().
|
overridevirtual |
Initialize the jammer mode.
| aSimTime | The current simulation time. |
| aWeaponPtr | The weapon associated to this mode |
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().
|
delete |
Move operator.
References AdjustPowerDistribution(), Deselect(), GetActiveBeamSpotIndexes(), GetAvailableBeamCount(), GetJammerBeam(), GetNextAssignableBeam(), JammerMode(), Select(), WsfMode::WsfMode(), and WsfWeapon::WsfWeapon().
|
overridevirtual |
Process input from a generic source.
Reimplemented from WsfMode.
References WsfRF_Jammer::cAVERAGE_POWER, WsfRF_Jammer::cCONSTANT_POWER, mAntenna, mBeam, mBeamPowerDistribution, mMaximumNumSpots, mMaxNumBeams, mRepeater, mUseRepeater, and mXmtr.
|
overridevirtual |
Select the mode.
| aSimTime | The current simulation time. |
Implements WsfWeapon::WsfWeaponMode.
References mActiveBeamPtrs.
Referenced by operator=(), and WsfRF_Jammer::StartJamming().
| BeamMap WsfRF_Jammer::JammerMode::mActiveBeamPtrs |
List of all active beams, this mode.
Referenced by AdjustPowerDistribution(), Deselect(), WsfRF_Jammer::DeselectEA_Technique(), GetActiveBeamCount(), GetActiveBeamSpotIndexes(), WsfRF_Jammer::GetEM_Xmtr(), GetJammerBeam(), WsfRF_Jammer::GetJammerXmtr(), JammerMode(), JammerMode(), Select(), WsfRF_Jammer::SelectEA_Technique(), WsfRF_Jammer::SetEA_DeltaGainTechnique(), WsfRF_Jammer::StartJamming(), WsfRF_Jammer::StopJamming(), and ~JammerMode().
| XmtrVec WsfRF_Jammer::JammerMode::mActiveXmtrSpotPtrs |
Vector for the active jammer transmitters (i.e. spots).
Referenced by WsfRF_Jammer::GetActiveRequestCount(), GetActiveXmtrSpotCount(), WsfRF_Jammer::GetEM_Xmtr(), WsfRF_Jammer::GetEM_Xmtr(), WsfRF_Jammer::GetEM_XmtrCount(), WsfRF_Jammer::GetEM_XmtrCount(), JammerMode(), JammerMode(), WsfRF_Jammer::StartJamming(), and WsfRF_Jammer::StopJamming().
| std::unique_ptr<WsfEM_Antenna> WsfRF_Jammer::JammerMode::mAntenna |
Master Antenna, this mode.
Referenced by Initialize(), JammerMode(), JammerMode(), and ProcessInput().
| BeamMap WsfRF_Jammer::JammerMode::mAvailableBeamPtrs |
List of all available beams, this mode.
Referenced by GetAvailableBeamCount(), GetJammerBeam(), Initialize(), JammerMode(), JammerMode(), WsfRF_Jammer::StartJamming(), WsfRF_Jammer::StopJamming(), and ~JammerMode().
| std::unique_ptr<JammerBeam> WsfRF_Jammer::JammerMode::mBeam |
Master beam, this mode.
Referenced by Initialize(), JammerMode(), JammerMode(), and ProcessInput().
| 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().
| PowerDistribution WsfRF_Jammer::JammerMode::mBeamPowerDistribution |
Beam power distribution - average or constant - defaults to average.
Referenced by AdjustPowerDistribution(), JammerMode(), JammerMode(), and ProcessInput().
| unsigned int WsfRF_Jammer::JammerMode::mMaximumNumSpots |
Maximum number of spots for this weapon. Includes all beams.
Referenced by AdjustFrequencyBandwidth(), WsfRF_Jammer::GetMaximumRequestCount(), GetMaximumXmtrSpotCount(), GetNextAssignableBeam(), JammerMode(), JammerMode(), ProcessInput(), WsfRF_Jammer::StartJamming(), and WsfRF_Jammer::UpdateJamming().
| 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().
| WsfRF_Repeater WsfRF_Jammer::JammerMode::mRepeater |
Repeater logic, this mode.
Referenced by Deselect(), GetActiveBeamSpotIndexes(), Initialize(), JammerMode(), JammerMode(), ProcessInput(), WsfRF_Jammer::StartJamming(), WsfRF_Jammer::StartJammingTrack(), and WsfRF_Jammer::UpdateJamming().
| bool WsfRF_Jammer::JammerMode::mUseRepeater |
Flag to specify if using a repeater, this mode.
Referenced by GetActiveBeamSpotIndexes(), JammerMode(), JammerMode(), ProcessInput(), WsfRF_Jammer::StartJamming(), WsfRF_Jammer::StartJammingTrack(), WsfRF_Jammer::StopJamming(), WsfRF_Jammer::TurnOn(), and WsfRF_Jammer::UpdateJamming().
| std::unique_ptr<JammerXmtr> WsfRF_Jammer::JammerMode::mXmtr |
Master transmitter, this mode.
Referenced by AdjustFrequencyBandwidth(), AdjustPowerDistribution(), WsfRF_Jammer::GetMasterXmtr(), WsfRF_Jammer::GetMaximumFrequency(), WsfRF_Jammer::GetMinimumFrequency(), Initialize(), JammerMode(), JammerMode(), ProcessInput(), WsfRF_Jammer::StartJamming(), and WsfRF_Jammer::TurnOn().