WSF
WsfExtEmission Class Reference

#include <WsfExtEmission.hpp>

Collaboration diagram for WsfExtEmission:

Classes

class  BeamKey

Public Types

enum  { cLEVEL_ONE_DEBUG = 0x00000001 , cLEVEL_TWO_DEBUG = 0x00000002 }

Public Member Functions

 WsfExtEmission (WsfScenario &aScenario)
bool ProcessInput (UtInput &aInput)
 Process input commands.
void ProcessBeamFunction (UtInput &aInput)
void ProcessBeamType (UtInput &aInput)
void ProcessEmitterFunction (UtInput &aInput)
void ProcessEmitterType (UtInput &aInput)
int GetDebugMask ()
void SetDebugMask (int aMask)
uint8_t GetBeamFunction (WsfStringId aPartTypeId, WsfStringId aModeNameId, int aBeamNumber)
 Return the DIS beam function that corresponds to given BeamKey.
uint16_t GetBeamType (WsfStringId aPartTypeId, WsfStringId aModeNameId, int aBeamNumber)
 Return the DIS beam index that corresponds to given <sensor type, Mode, beam number> key.
uint16_t GetEmitterType (WsfStringId aPartTypeId)
 Return the DIS emitter name that corresponds to given WSF part (comm/sensor) type ID.
uint8_t GetEmitterFunction (WsfStringId aPartTypeId)
 Return the DIS emitter function that corresponds to given WSF part (comm/sensor) type ID.
WsfStringId GetPartTypeId (uint16_t aEmitterType)
 Return the WSF part (comm/sensor) type ID that corresponds to given DIS Emitter type.
void UpdateBeamLimits (WsfEM_XmtrRcvr &aXmtrRcvr, double &aMinAz, double &aMaxAz, double &aMinEl, double &aMaxEl)
WsfSensorGetSensor (WsfPlatform *aPlatformPtr, WsfStringId aSensorTypeId, unsigned int aEmitterNameDIS, unsigned int aEmitterIdNumberDIS)
WsfSensorGetSensor (WsfStringId aSensorTypeId, unsigned int aEmitterNameDIS, unsigned int aEmitterIdNumberDIS)
WsfSensorAddSensor (double aSimTime, WsfPlatform *aPlatformPtr, WsfStringId aSensorTypeId, unsigned int aEmitterNameDIS, unsigned int aEmitterIdNumberDIS)
WsfScenarioGetScenario () const

Protected Attributes

WsfScenariomScenarioPtr {nullptr}
unsigned int sDebugMask {0}
 A bit mask for turning on debug levels.
std::map< BeamKey, uint8_t > sBeamKeyToBeamFunction
 The following maps a beam-key (sensor-type, mode-name, beam-index) to a DIS Beam Function.
std::map< BeamKey, uint16_t > sBeamKeyToBeamType
 The following maps a beam-key (sensor-type, mode-name, beam-index) to a DIS Beam Parameter Index.
std::map< WsfStringId, uint8_t > sPartTypeToEmitterFunction
 The following maps a WSF comm/sensor type to DIS emitter function.
std::map< WsfStringId, uint16_t > sPartTypeToEmitterType
 The following maps a WSF comm/sensor type id to DIS emitter type.
std::map< uint16_t, WsfStringIdsEmitterTypeToPartType

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
cLEVEL_ONE_DEBUG 

General debug.

cLEVEL_TWO_DEBUG 

Debug beam data.

Constructor & Destructor Documentation

◆ WsfExtEmission()

WsfExtEmission::WsfExtEmission ( WsfScenario & aScenario)

References mScenarioPtr.

Member Function Documentation

◆ AddSensor()

WsfSensor * WsfExtEmission::AddSensor ( double aSimTime,
WsfPlatform * aPlatformPtr,
WsfStringId aSensorTypeId,
unsigned int aEmitterNameDIS,
unsigned int aEmitterIdNumberDIS )

Adds a sensor to the given platform.

Parameters
aSimTime[input] Current simulation time.
aPlatformPtr[input] Pointer to the sensor's platform.
aSensorTypeId[input] Sensor type ID.
aEmitterNameDIS[input] DIS emitter system - emitter name
aEmitterIdNumberDIS[input] DIS emitter system - emitter ID number
Returns
A pointer to the sensor just added.

References WsfComponentListT< COMPONENT_TYPE >::AddComponent(), WsfSensor::Clone(), cWSF_COMPONENT_SENSOR, WsfComponentList::DeleteComponent(), WsfScenario::FindType(), WsfObject::GetName(), WsfObject::GetNameId(), WsfSimulation::GetScenario(), GetSensor(), WsfPlatform::GetSimulation(), WsfObject::GetType(), WsfSensor::Initialize(), WsfPlatformPart::SetExternallyControlled(), and WsfObject::SetName().

Referenced by WsfDisInterface::UpdatePlatformSystem().

◆ GetBeamFunction()

uint8_t WsfExtEmission::GetBeamFunction ( WsfStringId aPartTypeId,
WsfStringId aModeNameId,
int aBeamNumber )

Return the DIS beam function that corresponds to given BeamKey.

References WsfExtEmission::BeamKey::mBeamNumber, WsfExtEmission::BeamKey::mMode, and sBeamKeyToBeamFunction.

Referenced by WsfDisInterface::SetBeamTypeAndFunction().

◆ GetBeamType()

uint16_t WsfExtEmission::GetBeamType ( WsfStringId aPartTypeId,
WsfStringId aModeNameId,
int aBeamNumber )

Return the DIS beam index that corresponds to given <sensor type, Mode, beam number> key.

References WsfExtEmission::BeamKey::mBeamNumber, WsfExtEmission::BeamKey::mMode, and sBeamKeyToBeamType.

Referenced by WsfDisInterface::SetBeamTypeAndFunction().

◆ GetDebugMask()

◆ GetEmitterFunction()

uint8_t WsfExtEmission::GetEmitterFunction ( WsfStringId aPartTypeId)

Return the DIS emitter function that corresponds to given WSF part (comm/sensor) type ID.

References sPartTypeToEmitterFunction.

Referenced by WsfDisInterface::SetEmitterTypeAndFunction().

◆ GetEmitterType()

uint16_t WsfExtEmission::GetEmitterType ( WsfStringId aPartTypeId)

Return the DIS emitter name that corresponds to given WSF part (comm/sensor) type ID.

References sPartTypeToEmitterType.

Referenced by WsfMilExtInterface::PrintEmitterTypes(), and WsfDisInterface::SetEmitterTypeAndFunction().

◆ GetPartTypeId()

WsfStringId WsfExtEmission::GetPartTypeId ( uint16_t aEmitterType)

Return the WSF part (comm/sensor) type ID that corresponds to given DIS Emitter type.

References sEmitterTypeToPartType.

Referenced by WsfMilExtInterface::PrintEmitterTypes(), and WsfDisInterface::UpdatePlatformSystem().

◆ GetScenario()

WsfScenario & WsfExtEmission::GetScenario ( ) const
inline

References mScenarioPtr.

Referenced by GetSensor().

◆ GetSensor() [1/2]

WsfSensor * WsfExtEmission::GetSensor ( WsfPlatform * aPlatformPtr,
WsfStringId aSensorTypeId,
unsigned int aEmitterNameDIS,
unsigned int aEmitterIdNumberDIS )

Gets a sensor from the given platform.

Parameters
aPlatformPtr[input] Pointer to the sensor's platform.
aSensorTypeId[input] Sensor type ID.
aEmitterNameDIS[input] DIS emitter system - emitter name
aEmitterIdNumberDIS[input] DIS emitter system - emitter ID number
Returns
A pointer to the sensor just found.

References WsfComponentList::RoleIterator< T >::AtEnd(), and WsfUtil::GetAuxValue().

Referenced by AddSensor(), and WsfDisInterface::UpdatePlatformSystem().

◆ GetSensor() [2/2]

WsfSensor * WsfExtEmission::GetSensor ( WsfStringId aSensorTypeId,
unsigned int aEmitterNameDIS,
unsigned int aEmitterIdNumberDIS )

Gets a sensor from the given platform.

Parameters
aSensorTypeId[input] Sensor type ID.
aEmitterNameDIS[input] DIS emitter system - emitter name
aEmitterIdNumberDIS[input] DIS emitter system - emitter ID number
Returns
A pointer to the sensor just found.

References WsfObjectTypeList< T >::Clone(), WsfSensorTypes::Get(), WsfAuxDataEnabled::GetAuxData(), and GetScenario().

◆ ProcessBeamFunction()

void WsfExtEmission::ProcessBeamFunction ( UtInput & aInput)

References sBeamKeyToBeamFunction.

Referenced by ProcessInput().

◆ ProcessBeamType()

void WsfExtEmission::ProcessBeamType ( UtInput & aInput)

References sBeamKeyToBeamType.

Referenced by ProcessInput().

◆ ProcessEmitterFunction()

void WsfExtEmission::ProcessEmitterFunction ( UtInput & aInput)

References sPartTypeToEmitterFunction.

Referenced by ProcessInput().

◆ ProcessEmitterType()

void WsfExtEmission::ProcessEmitterType ( UtInput & aInput)

◆ ProcessInput()

bool WsfExtEmission::ProcessInput ( UtInput & aInput)

◆ SetDebugMask()

void WsfExtEmission::SetDebugMask ( int aMask)
inline

References sDebugMask.

◆ UpdateBeamLimits()

void WsfExtEmission::UpdateBeamLimits ( WsfEM_XmtrRcvr & aXmtrRcvr,
double & aMinAz,
double & aMaxAz,
double & aMinEl,
double & aMaxEl )

Update the beam field-of-view limits from the user limits. Use the field-of-view limits from the antenna definition (which could be the default 'unlimited' values) if either of the following is true:

-) The user explicitly specified the field-of-view limits in the antenna definition. -) No limits from the scan or slew limits could be used.

The incoming values are not modified if they have valid values AND the user did not explicitly specify [azimuth/elevation]_field_of_view in the antenna definition.

References WsfEM_Antenna::cSCAN_AZ, WsfEM_Antenna::cSCAN_AZ_EL, WsfEM_Antenna::cSCAN_EL, WsfArticulatedPart::cSLEW_AZ, WsfArticulatedPart::cSLEW_AZ_EL, WsfArticulatedPart::cSLEW_EL, WsfEM_XmtrRcvr::GetAntenna(), WsfEM_Antenna::GetArticulatedPart(), WsfEM_Antenna::GetAzimuthFieldOfView(), WsfEM_Antenna::GetAzimuthScanLimits(), WsfEM_Antenna::GetElevationFieldOfView(), WsfEM_Antenna::GetElevationScanLimits(), WsfArticulatedPart::GetMaxAzSlew(), WsfArticulatedPart::GetMaxElSlew(), WsfArticulatedPart::GetMinAzSlew(), WsfArticulatedPart::GetMinElSlew(), WsfEM_Antenna::GetScanMode(), and WsfArticulatedPart::GetSlewMode().

Referenced by WsfDisInterface::UpdateBeamFromXmtr(), WsfDisInterface::UpdateSystemFromSensor(), and WsfDisInterface::UpdateXmtrFromBeam().

Member Data Documentation

◆ mScenarioPtr

WsfScenario* WsfExtEmission::mScenarioPtr {nullptr}
protected

Referenced by GetScenario(), and WsfExtEmission().

◆ sBeamKeyToBeamFunction

std::map<BeamKey, uint8_t> WsfExtEmission::sBeamKeyToBeamFunction
protected

The following maps a beam-key (sensor-type, mode-name, beam-index) to a DIS Beam Function.

Referenced by GetBeamFunction(), and ProcessBeamFunction().

◆ sBeamKeyToBeamType

std::map<BeamKey, uint16_t> WsfExtEmission::sBeamKeyToBeamType
protected

The following maps a beam-key (sensor-type, mode-name, beam-index) to a DIS Beam Parameter Index.

Referenced by GetBeamType(), and ProcessBeamType().

◆ sDebugMask

unsigned int WsfExtEmission::sDebugMask {0}
protected

A bit mask for turning on debug levels.

Referenced by GetDebugMask(), ProcessInput(), and SetDebugMask().

◆ sEmitterTypeToPartType

std::map<uint16_t, WsfStringId> WsfExtEmission::sEmitterTypeToPartType
protected

◆ sPartTypeToEmitterFunction

std::map<WsfStringId, uint8_t> WsfExtEmission::sPartTypeToEmitterFunction
protected

The following maps a WSF comm/sensor type to DIS emitter function.

Referenced by GetEmitterFunction(), and ProcessEmitterFunction().

◆ sPartTypeToEmitterType

std::map<WsfStringId, uint16_t> WsfExtEmission::sPartTypeToEmitterType
protected

The following maps a WSF comm/sensor type id to DIS emitter type.

Referenced by GetEmitterType(), and ProcessEmitterType().


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