WSF
WsfXIO_AutoDisMapping Class Reference

Overrides the creation of DIS platforms using type information received over XIO. More...

#include <WsfXIO_AutoDisMapping.hpp>

Collaboration diagram for WsfXIO_AutoDisMapping:

Classes

struct  ConnectionData
struct  RemotePlatformInfo
 Data pertaining to a platform owned by an external simulation. More...
struct  TranslateMessageFunction

Public Member Functions

 WsfXIO_AutoDisMapping (WsfXIO_Simulation &aXIO_Simulation, WsfXIO_DisExtension *aDisExtensionPtr)
 ~WsfXIO_AutoDisMapping ()
bool Initialize ()
bool DelayDisEntityState (const DisEntityId &aEntityId)
 Called from WsfDisInterface.
WsfPlatformNewDisPlatform (WsfStringId aPlatformType, WsfDisEntityState *aEntityStatePtr)
 Called from WsfDisInterface.
bool CanTranslateMessage (WsfStringId aMessageType) const
void HandlePlatformInfo (WsfXIO_DisPlatformInfoPkt &aPkt)
ConnectionDataFindConnectionData (WsfXIO_Connection *aConnectionPtr)
void HandleConnect (WsfXIO_Connection *aConnectionPtr)
void HandleDisconnect (WsfXIO_Connection *aConnectionPtr)
bool TranslateTrack (double aSimTime, const WsfXIO_DisMessagePkt &aMessagePkt, ConnectionData *aConnectionDataPtr, WsfTrack &aTrack)
bool TranslatePlatformIndex (size_t &aIndex, ConnectionData *aConnectionDataPtr)
void TranslateTime (double aSimTime, WsfXIO_DisMessagePkt &aPkt, double &aRemoteSimTime)
bool ForwardMessage (double aSimTime, ConnectionData *aConnectionData, WsfXIO_DisMessagePkt &aPkt, WsfMessage &aMessage)
RemotePlatformInfoFindPlatform (int aConnectionId, size_t aPlatformIndex)
WsfPlatformFindRemotePlatform (size_t aRemoteIndex, ConnectionData *aDataPtr)
WsfXIO_DisPlatformInfoPktFindPlatformData (const DisEntityId &aEntity, ConnectionData *&aConnectionPtr)
void HandleDisMessage (WsfXIO_DisMessagePkt &aPkt)
bool TranslateTrackMessage (double aSimTime, WsfMessage *aMessagePtr, ConnectionData *aConnectionData, WsfXIO_DisMessagePkt &aPkt)
bool TranslateTrackDropMessage (double aSimTime, WsfMessage *aMessagePtr, ConnectionData *aConnectionData, WsfXIO_DisMessagePkt &aPkt)
bool TranslateTaskAssignMessage (double aSimTime, WsfMessage *aMessagePtr, ConnectionData *aConnectionData, WsfXIO_DisMessagePkt &aPkt)
bool TranslateTaskStatusMessage (double aSimTime, WsfMessage *aMessagePtr, ConnectionData *aConnectionData, WsfXIO_DisMessagePkt &aPkt)
bool TranslateTaskCancelMessage (double aSimTime, WsfMessage *aMessagePtr, ConnectionData *aConnectionData, WsfXIO_DisMessagePkt &aPkt)
bool TranslateTaskControlMessage (double aSimTime, WsfMessage *aMessagePtr, ConnectionData *aConnectionData, WsfXIO_DisMessagePkt &aPkt)
bool TranslateAssociationMessage (double aSimTime, WsfMessage *aMessagePtr, ConnectionData *aConnectionData, WsfXIO_DisMessagePkt &aPkt)
bool TranslateStatusMessage (double aSimTime, WsfMessage *aMessagePtr, ConnectionData *aConnectionData, WsfXIO_DisMessagePkt &aPkt)
void PlatformInitialized (double aSimTime, WsfPlatform *aPlatformPtr)
void PlatformDeleted (double aSimTime, WsfPlatform *aPlatformPtr)

Protected Types

typedef std::map< WsfStringId, TranslateMessageFunctionMessageTranslatorMap
typedef std::pair< int, size_t > PlatformId
 ID of a remote platform (connection ID, remote platform index).
typedef std::map< PlatformId, RemotePlatformInfo * > RemotePlatformMap
typedef std::map< PlatformId, size_t > RemovedPlatformMap

Protected Member Functions

ConnectionDataGetConnection (WsfXIO_Connection *aConnectionPtr)
bool IsAutoMapped (const DisEntityId &aId)
void RemovePlatformFromConnection (ConnectionData *aDataPtr, unsigned int aRemoteIndex)
 Removes a platform from the list of platforms maintained by a connection.
void UpdateRemovedPlatforms (int aConnectionId, size_t aRemoteIndex, WsfPlatform *aPlatformPtr)
 Update the 'removed platforms' list as necessary.

Protected Attributes

WsfSimulationmSimulation
const WsfScenariomScenario
WsfDisInterfacemDisInterfacePtr
WsfExtInterfacemExtInterfacePtr
WsfXIO_InterfacemInterfacePtr
WsfXIO_DisExtensionmDisExtensionPtr
std::vector< ConnectionData * > mConnections
std::vector< WsfXIO_EntityIdmDelayedEntityStates
WsfXIO_DisRequestManagermDisRequestManagerPtr
MessageTranslatorMap mMessageTranslators
RemotePlatformMap mRemotePlatforms
 Maps a PlatformID to RemotePlatformInfo.
RemovedPlatformMap mRemovedPlatforms
UtCallbackHolder mCallbacks

Detailed Description

Overrides the creation of DIS platforms using type information received over XIO.

Member Typedef Documentation

◆ MessageTranslatorMap

◆ PlatformId

typedef std::pair<int, size_t> WsfXIO_AutoDisMapping::PlatformId
protected

ID of a remote platform (connection ID, remote platform index).

◆ RemotePlatformMap

◆ RemovedPlatformMap

typedef std::map<PlatformId, size_t> WsfXIO_AutoDisMapping::RemovedPlatformMap
protected

Constructor & Destructor Documentation

◆ WsfXIO_AutoDisMapping()

◆ ~WsfXIO_AutoDisMapping()

WsfXIO_AutoDisMapping::~WsfXIO_AutoDisMapping ( )

Member Function Documentation

◆ CanTranslateMessage()

bool WsfXIO_AutoDisMapping::CanTranslateMessage ( WsfStringId aMessageType) const
inline

References mMessageTranslators.

◆ DelayDisEntityState()

bool WsfXIO_AutoDisMapping::DelayDisEntityState ( const DisEntityId & aEntityId)

◆ FindConnectionData()

WsfXIO_AutoDisMapping::ConnectionData * WsfXIO_AutoDisMapping::FindConnectionData ( WsfXIO_Connection * aConnectionPtr)

References mConnections.

Referenced by HandleDisMessage().

◆ FindPlatform()

WsfXIO_AutoDisMapping::RemotePlatformInfo * WsfXIO_AutoDisMapping::FindPlatform ( int aConnectionId,
size_t aPlatformIndex )

References mRemotePlatforms.

Referenced by FindRemotePlatform().

◆ FindPlatformData()

WsfXIO_DisPlatformInfoPkt * WsfXIO_AutoDisMapping::FindPlatformData ( const DisEntityId & aEntity,
ConnectionData *& aConnectionPtr )

◆ FindRemotePlatform()

◆ ForwardMessage()

◆ GetConnection()

WsfXIO_AutoDisMapping::ConnectionData * WsfXIO_AutoDisMapping::GetConnection ( WsfXIO_Connection * aConnectionPtr)
protected

References mConnections.

Referenced by HandlePlatformInfo().

◆ HandleConnect()

◆ HandleDisconnect()

◆ HandleDisMessage()

◆ HandlePlatformInfo()

◆ Initialize()

◆ IsAutoMapped()

bool WsfXIO_AutoDisMapping::IsAutoMapped ( const DisEntityId & aId)
protected

◆ NewDisPlatform()

◆ PlatformDeleted()

◆ PlatformInitialized()

void WsfXIO_AutoDisMapping::PlatformInitialized ( double aSimTime,
WsfPlatform * aPlatformPtr )

◆ RemovePlatformFromConnection()

void WsfXIO_AutoDisMapping::RemovePlatformFromConnection ( ConnectionData * aDataPtr,
unsigned int aRemoteIndex )
protected

Removes a platform from the list of platforms maintained by a connection.

References WsfXIO_AutoDisMapping::ConnectionData::mPlatforms.

Referenced by HandlePlatformInfo().

◆ TranslateAssociationMessage()

bool WsfXIO_AutoDisMapping::TranslateAssociationMessage ( double aSimTime,
WsfMessage * aMessagePtr,
ConnectionData * aConnectionData,
WsfXIO_DisMessagePkt & aPkt )

◆ TranslatePlatformIndex()

◆ TranslateStatusMessage()

bool WsfXIO_AutoDisMapping::TranslateStatusMessage ( double aSimTime,
WsfMessage * aMessagePtr,
ConnectionData * aConnectionData,
WsfXIO_DisMessagePkt & aPkt )

◆ TranslateTaskAssignMessage()

◆ TranslateTaskCancelMessage()

◆ TranslateTaskControlMessage()

◆ TranslateTaskStatusMessage()

◆ TranslateTime()

void WsfXIO_AutoDisMapping::TranslateTime ( double aSimTime,
WsfXIO_DisMessagePkt & aPkt,
double & aRemoteSimTime )

◆ TranslateTrack()

◆ TranslateTrackDropMessage()

◆ TranslateTrackMessage()

bool WsfXIO_AutoDisMapping::TranslateTrackMessage ( double aSimTime,
WsfMessage * aMessagePtr,
ConnectionData * aConnectionData,
WsfXIO_DisMessagePkt & aPkt )

◆ UpdateRemovedPlatforms()

void WsfXIO_AutoDisMapping::UpdateRemovedPlatforms ( int aConnectionId,
size_t aRemoteIndex,
WsfPlatform * aPlatformPtr )
protected

Update the 'removed platforms' list as necessary.

References WsfPlatform::GetIndex(), and mRemovedPlatforms.

Referenced by HandleDisconnect(), HandlePlatformInfo(), and PlatformDeleted().

Member Data Documentation

◆ mCallbacks

UtCallbackHolder WsfXIO_AutoDisMapping::mCallbacks
protected

Referenced by Initialize().

◆ mConnections

std::vector<ConnectionData*> WsfXIO_AutoDisMapping::mConnections
protected

◆ mDelayedEntityStates

std::vector<WsfXIO_EntityId> WsfXIO_AutoDisMapping::mDelayedEntityStates
protected

◆ mDisExtensionPtr

WsfXIO_DisExtension* WsfXIO_AutoDisMapping::mDisExtensionPtr
protected

Referenced by WsfXIO_AutoDisMapping().

◆ mDisInterfacePtr

WsfDisInterface* WsfXIO_AutoDisMapping::mDisInterfacePtr
protected

◆ mDisRequestManagerPtr

WsfXIO_DisRequestManager* WsfXIO_AutoDisMapping::mDisRequestManagerPtr
protected

◆ mExtInterfacePtr

WsfExtInterface* WsfXIO_AutoDisMapping::mExtInterfacePtr
protected

◆ mInterfacePtr

◆ mMessageTranslators

MessageTranslatorMap WsfXIO_AutoDisMapping::mMessageTranslators
protected

◆ mRemotePlatforms

RemotePlatformMap WsfXIO_AutoDisMapping::mRemotePlatforms
protected

◆ mRemovedPlatforms

RemovedPlatformMap WsfXIO_AutoDisMapping::mRemovedPlatforms
protected

We may get messages from remote sources that contain platform indices local to them, even after the platforms have been removed (mostly track drop, but possibly others). Therefore, we must retain knowledge even after the platforms no longer exist.

Referenced by TranslatePlatformIndex(), and UpdateRemovedPlatforms().

◆ mScenario

const WsfScenario& WsfXIO_AutoDisMapping::mScenario
protected

◆ mSimulation


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