WSF
WsfDisPlatform Class Reference

An internal class used by WsfDisInterface to maintain information about a platform. More...

#include <WsfDisPlatform.hpp>

Public Types

enum  PDUTypeType {
  cPDUTYPE_NOT_DEFINED = 0x00000000 , cPDUTYPE_SIGNAL = 0x00000010 , cPDUTYPE_EMISSION = 0x00000020 , cPDUTYPE_ENTITY_STATE = 0x00000040 ,
  cPDUTYPE_TRANSMITTER = 0x00000080
}
using Component = WsfDisPlatformComponent
using ComponentList = WsfComponentListT<WsfDisPlatformComponent>

Public Member Functions

 WsfDisPlatform (double aSimTime, WsfPlatform *aPlatformPtr, WsfDisInterface *aInterfacePtr, std::unique_ptr< DisEntityState > aEntityStatePtr, const DisEntityId &aEntityId, const DisEntityType &aEntityType, bool aIsIncomingTransfer, bool aIsOutgoingTransfer)
 ~WsfDisPlatform ()

Emission PDU methods.

using SB_Key = std::pair<unsigned char, unsigned char>
 System-Beam key - a combination of the unique IDs.
using SB_MapType = std::map<SB_Key, unsigned int>
using SB_MapTypeIterator = std::map<SB_Key, unsigned int>::iterator
using SB_MapTypePair = std::pair<SB_Key, unsigned int>
bool GetEmissionPDU () const
void SendEmissionsPDU (double aSimTime)
 Send out the emissions PDUs that represent all the sensors on the platform.
DisSystem * GetSensorSystem (WsfSensor *aSensorPtr)
 Given a WSF sensor, locate its corresponding DIS system.
unsigned char GetPartIdToBeamId (unsigned int aUniqueId)
unsigned int GetSysBeamIdToPartId (SB_Key aSB_Key)
void SetSysBeamIdToPartId (SB_Key aSB_Key, unsigned int aUniqueId)

Miscellaneous methods.

using InitialSendDisStatusCallback = UtCallbackListN<void(WsfDisPlatform*, bool&)>
static InitialSendDisStatusCallback InitialSendDisStatus
bool PlatformBeingTracked (DisEntityId &anEntityId)
 Returns indicator whether or not other platform is being tracked by this one.
bool GetSendDis () const
 Returns indicator whether or not DIS PDUs will be sent for the platform.
void SetSendDis (bool aFlag)
 Ability to set whether or not DIS PDUs are to be sent for this platform once the run has started.
void SetSendTransmitterPdus (bool aFlag)
WsfExchange::QueryGetQueryPtr ()
 Get/Set the associated WsfExchange::Query information.
WSF_DEPRECATED void SetQueryPtr (WsfExchange::Query *aQueryPtr)
void SetQueryPtr (std::unique_ptr< WsfExchange::Query > aQueryPtr)
void SetDoExtrapolate (bool aFlag)
 Set do not extrapolate flag.
void TrySendCMEData (double simTime)
void SendOrQueueEmissionsPDU (double aSimTime)

Platform methods.

WsfPlatformGetPlatform () const
 Get the associated platform.
void CreateEmission (double aSimTime, const DisEntityId &aDisEntityId)
 Create the initial emission pdu pointer.
bool IsIncomingTransfer () const
 Was this platform created in response to an incoming object transfer.
bool HasBeenReplaced () const
 Has this platform been replaced in response to an incoming object transfer.
void SetHasBeenReplaced (bool aHasBeenReplaced)
 Indicate if this platform has been replaced in response to an incoming object transfer.
const DisEntityId & GetEntityId () const
const DisEntityType & GetEntityType () const
DisUint8 GetForceId () const
WsfPlatformGetShadowPlatform () const
void SetShadowPlatform (WsfPlatform *aPlatformPtr)
WsfDisInterfaceGetInterface () const
void AddComponent (Component *aComponentPtr)
const ComponentListGetComponents () const

Entity State PDU methods.

int AddArticulation (int aType, int aParentType, unsigned int aPublishBitmap, WsfArticulatedPart *aPartPtr, int aStartCount)
void ForceUpdate (double aSimTime)
void GetEntityState (double &aEntityStateUpdateTime, DisEntityState *&aEntityStatePtr)
void SetEntityState (double aSimTime, DisEntityState *aEntityStatePtr)
DisEntityState * GetEntityState ()
 Get the pointer to the entity state.
double GetEntityStateUpdateTime () const
 Returns last time the entity's state was updated.
void SetEntityStateUpdateTime (double aSimTime)
 Store the time when the entity's state is updated.
double GetLastTimeEntityStateSent () const
 Return the last time when an entity state PDU was sent.
double GetInitialDistributionTime () const
 Return the time the initial state PDU is to be sent.
double GetLastTimeMoverUpdated () const
 Return the last time the mover was updated.

Simulation observer methods.

void Comment (double aSimTime, const std::string &aComment)
void CommFrequencyChanged (double aSimTime, wsf::comm::Comm *aCommPtr)
void CommTurnedOff (double aSimTime, wsf::comm::Comm *aCommPtr)
void CommTurnedOn (double aSimTime, wsf::comm::Comm *aCommPtr)
void MessageReceived (double aSimTime, wsf::comm::Comm *aXmtrPtr, wsf::comm::Comm *aRcvrPtr, const WsfMessage &aMessage, wsf::comm::Result &aResult)
void MessageTransmitted (double aSimTime, wsf::comm::Comm *aCommPtr, const WsfMessage &aMessage)
void MoverUpdated (double aSimTime, WsfExtEntityDeadReckon::PlatformDR &aDeadReckonData)
void PlatformDeleted (double aSimTime)
void PlatformInitialized (double aSimTime)
void SensorDetectionChanged (double aSimTime, WsfSensor *aSensorPtr, size_t aTargetPlatformIndex, WsfSensorResult &aResult)
void SensorFrequencyChanged (double aSimTime, WsfSensor *aSensorPtr, WsfSensorMode *aModePtr)
void SensorModeActivated (double aSimTime, WsfSensor *aSensorPtr, WsfSensorMode *aModePtr)
void SensorModeDeactivated (double aSimTime, WsfSensor *aSensorPtr, WsfSensorMode *aModePtr)
void SensorRequestCanceled (double aSimTime, WsfSensor *aSensorPtr, const WsfTrack *aTrackPtr)
void SensorRequestInitiated (double aSimTime, WsfSensor *aSensorPtr, WsfSensorMode *aModePtr, const WsfTrack *aTrackPtr)
void SensorRequestUpdated (double aSimTime, WsfSensor *aSensorPtr, WsfSensorMode *aModePtr, const WsfTrack *aTrackPtr)
void SensorScanUpdated (double aSimTime, WsfSensor *aSensorPtr)
void SensorTrackDropped (double aSimTime, WsfSensor *aSensorPtr, const WsfTrack *aTrackPtr)
void SensorTrackInitiated (double aSimTime, WsfSensor *aSensorPtr, const WsfTrack *aTrackPtr)
void SensorTurnedOff (double aSimTime, WsfSensor *aSensorPtr)
void SensorTurnedOn (double aSimTime, WsfSensor *aSensorPtr)
void ResetEntityId (const DisEntityId &aDisEntityId)
void SetEntityId (const DisEntityId &aDisEntityId)

Detailed Description

An internal class used by WsfDisInterface to maintain information about a platform.

Member Typedef Documentation

◆ Component

◆ ComponentList

◆ InitialSendDisStatusCallback

using WsfDisPlatform::InitialSendDisStatusCallback = UtCallbackListN<void(WsfDisPlatform*, bool&)>

◆ SB_Key

using WsfDisPlatform::SB_Key = std::pair<unsigned char, unsigned char>

System-Beam key - a combination of the unique IDs.

◆ SB_MapType

using WsfDisPlatform::SB_MapType = std::map<SB_Key, unsigned int>

◆ SB_MapTypeIterator

using WsfDisPlatform::SB_MapTypeIterator = std::map<SB_Key, unsigned int>::iterator

◆ SB_MapTypePair

using WsfDisPlatform::SB_MapTypePair = std::pair<SB_Key, unsigned int>

Member Enumeration Documentation

◆ PDUTypeType

Enumerator
cPDUTYPE_NOT_DEFINED 
cPDUTYPE_SIGNAL 
cPDUTYPE_EMISSION 
cPDUTYPE_ENTITY_STATE 
cPDUTYPE_TRANSMITTER 

Constructor & Destructor Documentation

◆ WsfDisPlatform()

WsfDisPlatform::WsfDisPlatform ( double aSimTime,
WsfPlatform * aPlatformPtr,
WsfDisInterface * aInterfacePtr,
std::unique_ptr< DisEntityState > aEntityStatePtr,
const DisEntityId & aEntityId,
const DisEntityType & aEntityType,
bool aIsIncomingTransfer,
bool aIsOutgoingTransfer )

Constructor.

Parameters
aSimTimeThe current simulation time.
aPlatformPtrThe platform associated with the DIS representation.
aInterfacePtrThe WsfDisInterface to be used with this representation.
aEntityStatePtrThe associated entity state for externally controlled entities.
aEntityIdThe DIS Entity Id to be assigned.
aEntityTypeThe DIS Entity Type to be assigned.
aIsIncomingTransfer'true' if the platform was transferred to the application from another.
aIsOutgoingTransfer'true' if the platform will be transferred to external control.

References WsfExtInterface::GetDeferredConnectionTime(), WsfDisInterface::GetExtInterface(), WsfDisUtil::GetExtInterface(), WsfDisInterface::GetInitialDistributionInterval(), WsfDisInterface::GetRandom(), InitialSendDisStatus, WsfPlatform::IsExternallyControlled(), WsfPlatform::IsExternallyMoved(), WsfDisPlaybackDevice::IsPlaybackEntity(), WsfExtData::SelectEntityType(), and WsfDisExt::ToDis().

◆ ~WsfDisPlatform()

WsfDisPlatform::~WsfDisPlatform ( )

Member Function Documentation

◆ AddArticulation()

int WsfDisPlatform::AddArticulation ( int aType,
int aParentType,
unsigned int aPublishBitmap,
WsfArticulatedPart * aPartPtr,
int aStartCount )

◆ AddComponent()

void WsfDisPlatform::AddComponent ( Component * aComponentPtr)
inline

◆ Comment()

void WsfDisPlatform::Comment ( double aSimTime,
const std::string & aComment )

References GetEntityId().

Referenced by WsfDisInterface::Comment().

◆ CommFrequencyChanged()

void WsfDisPlatform::CommFrequencyChanged ( double aSimTime,
wsf::comm::Comm * aCommPtr )

◆ CommTurnedOff()

void WsfDisPlatform::CommTurnedOff ( double aSimTime,
wsf::comm::Comm * aCommPtr )

◆ CommTurnedOn()

void WsfDisPlatform::CommTurnedOn ( double aSimTime,
wsf::comm::Comm * aCommPtr )

◆ CreateEmission()

void WsfDisPlatform::CreateEmission ( double aSimTime,
const DisEntityId & aDisEntityId )

Create the initial emission pdu pointer.

References WsfComponentList::RoleIterator< T >::AtEnd().

Referenced by PlatformInitialized().

◆ ForceUpdate()

void WsfDisPlatform::ForceUpdate ( double aSimTime)

Force an update of the platform. This is called to ensure that the platform position is up-to-date and that an entity state PDU has been sent.

References WsfExtEntityDeadReckon::ForceUpdate(), WsfExtInterface::GetEntityDeadReckon(), WsfDisUtil::GetExtInterface(), GetPlatform(), and WsfPlatform::Update().

Referenced by WsfDisWeaponEvents::DirectedEnergyWeaponFired(), SendEmissionsPDU(), and SensorTurnedOn().

◆ GetComponents()

const ComponentList & WsfDisPlatform::GetComponents ( ) const
inline

Referenced by WsfMilDisPlatform::Find().

◆ GetEmissionPDU()

bool WsfDisPlatform::GetEmissionPDU ( ) const
inline

◆ GetEntityId()

◆ GetEntityState() [1/2]

DisEntityState * WsfDisPlatform::GetEntityState ( )
inline

Get the pointer to the entity state.

◆ GetEntityState() [2/2]

void WsfDisPlatform::GetEntityState ( double & aEntityStateUpdateTime,
DisEntityState *& aEntityStatePtr )

Get the current entity state PDU for externally controlled or playback entities.

This basically gets the last values set by SetEntityState().

Parameters
aEntityStateUpdateTimeThe simulation time of the last update.
aEntityStatePtrThe entity state PDU associated with this entity.

Referenced by WsfDisInterface::ExtrapolatePlatformState(), WsfXIO_ObjectInfoLoad::Load_Platform(), WsfDisInterface::SendPeriodicPdusWhilePaused(), and WsfDisInterface::UpdatePlatformFromEntityState().

◆ GetEntityStateUpdateTime()

double WsfDisPlatform::GetEntityStateUpdateTime ( ) const
inline

Returns last time the entity's state was updated.

Referenced by WsfDisMover::Update().

◆ GetEntityType()

const DisEntityType & WsfDisPlatform::GetEntityType ( ) const
inline

Get the DIS Entity Type for this platform.

Returns
The DIS Entity Type (kind, domain, country, category, subcategory, specific, extra).

Referenced by WsfXIO_ObjectInfoLoad::Load_Platform(), and WsfDisWeaponEvents::WeaponTerminated().

◆ GetForceId()

DisUint8 WsfDisPlatform::GetForceId ( ) const
inline

Get the DIS Force Id for this platform.

Returns
The DIS Force Id for this platform.

Referenced by WsfDisFilterAllowance::PduAllowed(), and PlatformInitialized().

◆ GetInitialDistributionTime()

double WsfDisPlatform::GetInitialDistributionTime ( ) const
inline

Return the time the initial state PDU is to be sent.

◆ GetInterface()

WsfDisInterface * WsfDisPlatform::GetInterface ( ) const
inline

◆ GetLastTimeEntityStateSent()

double WsfDisPlatform::GetLastTimeEntityStateSent ( ) const
inline

Return the last time when an entity state PDU was sent.

◆ GetLastTimeMoverUpdated()

double WsfDisPlatform::GetLastTimeMoverUpdated ( ) const
inline

Return the last time the mover was updated.

◆ GetPartIdToBeamId()

unsigned char WsfDisPlatform::GetPartIdToBeamId ( unsigned int aUniqueId)

◆ GetPlatform()

◆ GetQueryPtr()

◆ GetSendDis()

bool WsfDisPlatform::GetSendDis ( ) const
inline

Returns indicator whether or not DIS PDUs will be sent for the platform.

◆ GetSensorSystem()

DisSystem * WsfDisPlatform::GetSensorSystem ( WsfSensor * aSensorPtr)

Given a WSF sensor, locate its corresponding DIS system.

◆ GetShadowPlatform()

WsfPlatform * WsfDisPlatform::GetShadowPlatform ( ) const
inline

Referenced by WsfDisEmission::Process().

◆ GetSysBeamIdToPartId()

unsigned int WsfDisPlatform::GetSysBeamIdToPartId ( WsfDisPlatform::SB_Key aSB_Key)

◆ HasBeenReplaced()

bool WsfDisPlatform::HasBeenReplaced ( ) const
inline

Has this platform been replaced in response to an incoming object transfer.

◆ IsIncomingTransfer()

bool WsfDisPlatform::IsIncomingTransfer ( ) const
inline

Was this platform created in response to an incoming object transfer.

◆ MessageReceived()

◆ MessageTransmitted()

◆ MoverUpdated()

◆ PlatformBeingTracked()

bool WsfDisPlatform::PlatformBeingTracked ( DisEntityId & anEntityId)

Returns indicator whether or not other platform is being tracked by this one.

Referenced by WsfDisFilterAllowance::PduAllowed().

◆ PlatformDeleted()

void WsfDisPlatform::PlatformDeleted ( double aSimTime)

◆ PlatformInitialized()

void WsfDisPlatform::PlatformInitialized ( double aSimTime)

Perform functions that cannot be performed until the platform has been initialized.

This is called via the simulation observer interface AFTER the platform has been initialized. Some functions that were formerly taken in the constructor have been moved to here because the initialization process may alter data that is needed by those functions. (e.g.: WSF_COMPOSITE_SENSOR may mark a constituent as 'private', which indicates it is not to be sent out).

References CreateEmission(), WsfUtil::GetAuxValue(), WsfDisUtil::GetExtInterface(), GetForceId(), GetPlatform(), WsfDisPlaybackDevice::IsPlaybackEntity(), and platformPtr.

Referenced by WsfDisInterface::PlatformInitialized().

◆ ResetEntityId()

void WsfDisPlatform::ResetEntityId ( const DisEntityId & aDisEntityId)

◆ SendEmissionsPDU()

void WsfDisPlatform::SendEmissionsPDU ( double aSimTime)

◆ SendOrQueueEmissionsPDU()

void WsfDisPlatform::SendOrQueueEmissionsPDU ( double aSimTime)

◆ SensorDetectionChanged()

void WsfDisPlatform::SensorDetectionChanged ( double aSimTime,
WsfSensor * aSensorPtr,
size_t aTargetPlatformIndex,
WsfSensorResult & aResult )

◆ SensorFrequencyChanged()

void WsfDisPlatform::SensorFrequencyChanged ( double aSimTime,
WsfSensor * aSensorPtr,
WsfSensorMode * aModePtr )

◆ SensorModeActivated()

void WsfDisPlatform::SensorModeActivated ( double aSimTime,
WsfSensor * aSensorPtr,
WsfSensorMode * aModePtr )

◆ SensorModeDeactivated()

void WsfDisPlatform::SensorModeDeactivated ( double aSimTime,
WsfSensor * aSensorPtr,
WsfSensorMode * aModePtr )

◆ SensorRequestCanceled()

void WsfDisPlatform::SensorRequestCanceled ( double aSimTime,
WsfSensor * aSensorPtr,
const WsfTrack * aTrackPtr )

◆ SensorRequestInitiated()

void WsfDisPlatform::SensorRequestInitiated ( double aSimTime,
WsfSensor * aSensorPtr,
WsfSensorMode * aModePtr,
const WsfTrack * aTrackPtr )

◆ SensorRequestUpdated()

void WsfDisPlatform::SensorRequestUpdated ( double aSimTime,
WsfSensor * aSensorPtr,
WsfSensorMode * aModePtr,
const WsfTrack * aTrackPtr )

◆ SensorScanUpdated()

void WsfDisPlatform::SensorScanUpdated ( double aSimTime,
WsfSensor * aSensorPtr )

◆ SensorTrackDropped()

void WsfDisPlatform::SensorTrackDropped ( double aSimTime,
WsfSensor * aSensorPtr,
const WsfTrack * aTrackPtr )

◆ SensorTrackInitiated()

void WsfDisPlatform::SensorTrackInitiated ( double aSimTime,
WsfSensor * aSensorPtr,
const WsfTrack * aTrackPtr )

◆ SensorTurnedOff()

void WsfDisPlatform::SensorTurnedOff ( double aSimTime,
WsfSensor * aSensorPtr )

◆ SensorTurnedOn()

void WsfDisPlatform::SensorTurnedOn ( double aSimTime,
WsfSensor * aSensorPtr )

◆ SetDoExtrapolate()

void WsfDisPlatform::SetDoExtrapolate ( bool aFlag)
inline

Set do not extrapolate flag.

◆ SetEntityId()

void WsfDisPlatform::SetEntityId ( const DisEntityId & aDisEntityId)

◆ SetEntityState()

void WsfDisPlatform::SetEntityState ( double aSimTime,
DisEntityState * aEntityStatePtr )

Make the supplied PDU the current PDU for externally controlled or playback entities. This updates the platform to include the effects of any changes resulting from changes in the DIS appearance word or articulation records.

Parameters
aSimTimeThe current simulation time.
aEntityStatePtrThe PDU to be associated with this entity.

References WsfSimulation::DeletePlatform(), WsfDisUtil::GetSimulation(), and WsfDisPlaybackDevice::IsPlaybackEntity().

Referenced by WsfDisEntityState::Process().

◆ SetEntityStateUpdateTime()

void WsfDisPlatform::SetEntityStateUpdateTime ( double aSimTime)
inline

Store the time when the entity's state is updated.

◆ SetHasBeenReplaced()

void WsfDisPlatform::SetHasBeenReplaced ( bool aHasBeenReplaced)
inline

Indicate if this platform has been replaced in response to an incoming object transfer.

Referenced by WsfDisWeaponEvents::TransferPlatformToInternalControl().

◆ SetQueryPtr() [1/2]

void WsfDisPlatform::SetQueryPtr ( std::unique_ptr< WsfExchange::Query > aQueryPtr)

◆ SetQueryPtr() [2/2]

void WsfDisPlatform::SetQueryPtr ( WsfExchange::Query * aQueryPtr)

◆ SetSendDis()

void WsfDisPlatform::SetSendDis ( bool aFlag)
inline

Ability to set whether or not DIS PDUs are to be sent for this platform once the run has started.

◆ SetSendTransmitterPdus()

void WsfDisPlatform::SetSendTransmitterPdus ( bool aFlag)
inline

Ability to set whether or not transmitter PDUs are to be sent for this platform once the run has started.

◆ SetShadowPlatform()

void WsfDisPlatform::SetShadowPlatform ( WsfPlatform * aPlatformPtr)
inline

◆ SetSysBeamIdToPartId()

void WsfDisPlatform::SetSysBeamIdToPartId ( WsfDisPlatform::SB_Key aSB_Key,
unsigned int aUniqueId )

◆ TrySendCMEData()

void WsfDisPlatform::TrySendCMEData ( double simTime)

Member Data Documentation

◆ InitialSendDisStatus

WsfDisPlatform::InitialSendDisStatusCallback WsfDisPlatform::InitialSendDisStatus
static

Referenced by WsfDisPlatform().


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