|
WSF
|
Overrides the creation of DIS platforms using type information received over XIO. More...
#include <WsfXIO_AutoDisMapping.hpp>

Classes | |
| struct | ConnectionData |
| struct | RemotePlatformInfo |
| Data pertaining to a platform owned by an external simulation. More... | |
| struct | TranslateMessageFunction |
Protected Types | |
| typedef std::map< WsfStringId, TranslateMessageFunction > | MessageTranslatorMap |
| 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 | |
| ConnectionData * | GetConnection (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 | |
| WsfSimulation & | mSimulation |
| const WsfScenario & | mScenario |
| WsfDisInterface * | mDisInterfacePtr |
| WsfExtInterface * | mExtInterfacePtr |
| WsfXIO_Interface * | mInterfacePtr |
| WsfXIO_DisExtension * | mDisExtensionPtr |
| std::vector< ConnectionData * > | mConnections |
| std::vector< WsfXIO_EntityId > | mDelayedEntityStates |
| WsfXIO_DisRequestManager * | mDisRequestManagerPtr |
| MessageTranslatorMap | mMessageTranslators |
| RemotePlatformMap | mRemotePlatforms |
| Maps a PlatformID to RemotePlatformInfo. | |
| RemovedPlatformMap | mRemovedPlatforms |
| UtCallbackHolder | mCallbacks |
Overrides the creation of DIS platforms using type information received over XIO.
|
protected |
|
protected |
ID of a remote platform (connection ID, remote platform index).
|
protected |
|
protected |
| WsfXIO_AutoDisMapping::WsfXIO_AutoDisMapping | ( | WsfXIO_Simulation & | aXIO_Simulation, |
| WsfXIO_DisExtension * | aDisExtensionPtr ) |
| WsfXIO_AutoDisMapping::~WsfXIO_AutoDisMapping | ( | ) |
|
inline |
References mMessageTranslators.
| bool WsfXIO_AutoDisMapping::DelayDisEntityState | ( | const DisEntityId & | aEntityId | ) |
Called from WsfDisInterface.
References FindPlatformData(), IsAutoMapped(), mDelayedEntityStates, and mInterfacePtr.
| WsfXIO_AutoDisMapping::ConnectionData * WsfXIO_AutoDisMapping::FindConnectionData | ( | WsfXIO_Connection * | aConnectionPtr | ) |
References mConnections.
Referenced by HandleDisMessage().
| WsfXIO_AutoDisMapping::RemotePlatformInfo * WsfXIO_AutoDisMapping::FindPlatform | ( | int | aConnectionId, |
| size_t | aPlatformIndex ) |
References mRemotePlatforms.
Referenced by FindRemotePlatform().
| WsfXIO_DisPlatformInfoPkt * WsfXIO_AutoDisMapping::FindPlatformData | ( | const DisEntityId & | aEntity, |
| ConnectionData *& | aConnectionPtr ) |
References mConnections, and WsfXIO_AutoDisMapping::ConnectionData::mPlatforms.
Referenced by DelayDisEntityState(), and NewDisPlatform().
| WsfPlatform * WsfXIO_AutoDisMapping::FindRemotePlatform | ( | size_t | aRemoteIndex, |
| ConnectionData * | aDataPtr ) |
| bool WsfXIO_AutoDisMapping::ForwardMessage | ( | double | aSimTime, |
| ConnectionData * | aConnectionData, | ||
| WsfXIO_DisMessagePkt & | aPkt, | ||
| WsfMessage & | aMessage ) |
References wsf::comm::Address::GetAddress(), WsfMessage::GetDstAddr(), WsfMessage::GetNextHopAddr(), WsfMessage::GetSrcAddr(), wsf::comm::Address::GetSubnetMaskBitLength(), mSimulation, wsf::comm::Address::SetAddress(), WsfMessage::SetDstAddr(), WsfMessage::SetNextHopAddr(), and WsfMessage::SetSrcAddr().
Referenced by HandleDisMessage().
|
protected |
References mConnections.
Referenced by HandlePlatformInfo().
| void WsfXIO_AutoDisMapping::HandleConnect | ( | WsfXIO_Connection * | aConnectionPtr | ) |
| void WsfXIO_AutoDisMapping::HandleDisconnect | ( | WsfXIO_Connection * | aConnectionPtr | ) |
| void WsfXIO_AutoDisMapping::HandleDisMessage | ( | WsfXIO_DisMessagePkt & | aPkt | ) |
References WsfMessage::Clone(), FindConnectionData(), FindRemotePlatform(), ForwardMessage(), WsfMessage::GetType(), mInterfacePtr, WsfXIO_DisMessagePkt::mMessagePtr, mMessageTranslators, WsfXIO_DisMessagePkt::mPlatformIndex, mSimulation, platformPtr, WsfMessage::SetOriginator(), WsfMessage::SetSimulation(), and simTime.
Referenced by Initialize().
| void WsfXIO_AutoDisMapping::HandlePlatformInfo | ( | WsfXIO_DisPlatformInfoPkt & | aPkt | ) |
References WsfXIO_EntityId::Convert(), GetConnection(), WsfXIO_Connection::GetConnectionId(), WsfDisPlatform::GetPlatform(), WsfXIO_AutoDisMapping::ConnectionData::mConnectionPtr, WsfXIO_AutoDisMapping::RemotePlatformInfo::mConnectionPtr, mDelayedEntityStates, mDisInterfacePtr, WsfXIO_DisPlatformInfoPkt::mEntityId, mInterfacePtr, WsfXIO_DisPlatformInfoPkt::mIsAlive, WsfXIO_DisPlatformInfoPkt::mPlatformIndex, WsfXIO_AutoDisMapping::RemotePlatformInfo::mPlatformInfo, WsfXIO_AutoDisMapping::RemotePlatformInfo::mPlatformPtr, WsfXIO_AutoDisMapping::ConnectionData::mPlatforms, mRemotePlatforms, mSimulation, RemovePlatformFromConnection(), and UpdateRemovedPlatforms().
| bool WsfXIO_AutoDisMapping::Initialize | ( | ) |
Initialize Auto DIS Mapping
References WsfAssociationMessage::GetTypeId(), WsfStatusMessage::GetTypeId(), WsfTaskAssignMessage::GetTypeId(), WsfTaskCancelMessage::GetTypeId(), WsfTaskControlMessage::GetTypeId(), WsfTaskStatusMessage::GetTypeId(), WsfTrackDropMessage::GetTypeId(), WsfTrackMessage::GetTypeId(), HandleConnect(), HandleDisconnect(), HandleDisMessage(), mCallbacks, mDisInterfacePtr, mInterfacePtr, mMessageTranslators, mSimulation, WsfObserver::PlatformDeleted(), PlatformDeleted(), WsfObserver::PlatformInitialized(), PlatformInitialized(), TranslateAssociationMessage(), TranslateStatusMessage(), TranslateTaskAssignMessage(), TranslateTaskCancelMessage(), TranslateTaskControlMessage(), TranslateTaskStatusMessage(), TranslateTrackDropMessage(), and TranslateTrackMessage().
|
protected |
References WsfXIO_EntityId::GetApplication(), WsfXIO_EntityId::GetSite(), and mInterfacePtr.
Referenced by DelayDisEntityState(), and NewDisPlatform().
| WsfPlatform * WsfXIO_AutoDisMapping::NewDisPlatform | ( | WsfStringId | aPlatformType, |
| WsfDisEntityState * | aEntityStatePtr ) |
Called from WsfDisInterface.
References WsfComponentList::RoleIterator< T >::AtEnd(), wsf::comm::Comm::Clone(), WsfObjectTypeList< T >::Clone(), WsfPlatform::Clone(), wsf::xio::CommComponent::FindOrCreate(), FindPlatformData(), WsfPlatformTypes::Get(), IsAutoMapped(), WsfXIO_DisPlatformInfoPkt::mCommanders, WsfXIO_AutoDisMapping::ConnectionData::mConnectionPtr, mDisInterfacePtr, mExtInterfacePtr, mInterfacePtr, WsfXIO_DisPlatformInfoPkt::mName, moverPtr, mScenario, WsfXIO_DisPlatformInfoPkt::mSide, WsfXIO_DisPlatformInfoPkt::mType, platformPtr, and WsfObject::SetName().
| void WsfXIO_AutoDisMapping::PlatformDeleted | ( | double | aSimTime, |
| WsfPlatform * | aPlatformPtr ) |
References WsfXIO_Connection::GetConnectionId(), WsfXIO_AutoDisMapping::ConnectionData::mConnectionPtr, WsfXIO_AutoDisMapping::RemotePlatformInfo::mConnectionPtr, WsfXIO_DisPlatformInfoPkt::mPlatformIndex, WsfXIO_AutoDisMapping::RemotePlatformInfo::mPlatformInfo, WsfXIO_AutoDisMapping::RemotePlatformInfo::mPlatformPtr, mRemotePlatforms, and UpdateRemovedPlatforms().
Referenced by Initialize().
| void WsfXIO_AutoDisMapping::PlatformInitialized | ( | double | aSimTime, |
| WsfPlatform * | aPlatformPtr ) |
References WsfDisPlatform::GetEntityId(), WsfPlatform::GetIndex(), WsfPlatform::IsExternallyControlled(), mDisInterfacePtr, and mRemotePlatforms.
Referenced by Initialize().
|
protected |
Removes a platform from the list of platforms maintained by a connection.
References WsfXIO_AutoDisMapping::ConnectionData::mPlatforms.
Referenced by HandlePlatformInfo().
| bool WsfXIO_AutoDisMapping::TranslateAssociationMessage | ( | double | aSimTime, |
| WsfMessage * | aMessagePtr, | ||
| ConnectionData * | aConnectionData, | ||
| WsfXIO_DisMessagePkt & | aPkt ) |
References WsfAssociationMessage::GetSensorPlatformIndex(), WsfAssociationMessage::SetSensorPlatformIndex(), and TranslatePlatformIndex().
Referenced by Initialize().
| bool WsfXIO_AutoDisMapping::TranslatePlatformIndex | ( | size_t & | aIndex, |
| ConnectionData * | aConnectionDataPtr ) |
References FindRemotePlatform(), WsfXIO_Connection::GetConnectionId(), WsfXIO_AutoDisMapping::ConnectionData::mConnectionPtr, mRemovedPlatforms, ok, and platformPtr.
Referenced by TranslateAssociationMessage(), TranslateStatusMessage(), TranslateTaskAssignMessage(), TranslateTaskCancelMessage(), TranslateTaskControlMessage(), TranslateTaskStatusMessage(), and TranslateTrackDropMessage().
| bool WsfXIO_AutoDisMapping::TranslateStatusMessage | ( | double | aSimTime, |
| WsfMessage * | aMessagePtr, | ||
| ConnectionData * | aConnectionData, | ||
| WsfXIO_DisMessagePkt & | aPkt ) |
References WsfStatusMessage::GetPlatformIndex(), WsfStatusMessage::SetPlatformIndex(), and TranslatePlatformIndex().
Referenced by Initialize().
| bool WsfXIO_AutoDisMapping::TranslateTaskAssignMessage | ( | double | aSimTime, |
| WsfMessage * | aMessagePtr, | ||
| ConnectionData * | aConnectionData, | ||
| WsfXIO_DisMessagePkt & | aPkt ) |
References WsfTask::GetAssigneePlatformIndex(), WsfTask::GetAssignerPlatformIndex(), WsfTaskAssignMessage::GetTask(), WsfTaskAssignMessage::GetTrack(), WsfTask::SetAssigneePlatformIndex(), WsfTask::SetAssignerPlatformIndex(), TranslatePlatformIndex(), and TranslateTrack().
Referenced by Initialize().
| bool WsfXIO_AutoDisMapping::TranslateTaskCancelMessage | ( | double | aSimTime, |
| WsfMessage * | aMessagePtr, | ||
| ConnectionData * | aConnectionData, | ||
| WsfXIO_DisMessagePkt & | aPkt ) |
| bool WsfXIO_AutoDisMapping::TranslateTaskControlMessage | ( | double | aSimTime, |
| WsfMessage * | aMessagePtr, | ||
| ConnectionData * | aConnectionData, | ||
| WsfXIO_DisMessagePkt & | aPkt ) |
| bool WsfXIO_AutoDisMapping::TranslateTaskStatusMessage | ( | double | aSimTime, |
| WsfMessage * | aMessagePtr, | ||
| ConnectionData * | aConnectionData, | ||
| WsfXIO_DisMessagePkt & | aPkt ) |
| void WsfXIO_AutoDisMapping::TranslateTime | ( | double | aSimTime, |
| WsfXIO_DisMessagePkt & | aPkt, | ||
| double & | aRemoteSimTime ) |
References WsfXIO_DisMessagePkt::mSimTime.
Referenced by TranslateTrackDropMessage().
| bool WsfXIO_AutoDisMapping::TranslateTrack | ( | double | aSimTime, |
| const WsfXIO_DisMessagePkt & | aMessagePkt, | ||
| ConnectionData * | aConnectionDataPtr, | ||
| WsfTrack & | aTrack ) |
References FindRemotePlatform(), WsfPlatform::GetIndex(), WsfTrack::GetOriginatorNameId(), WsfTrack::GetStartTime(), WsfTrack::GetTargetIndex(), WsfTrack::GetUpdateTime(), WsfXIO_DisMessagePkt::mSimTime, mSimulation, WsfTrack::SetPlatformOriginator(), WsfTrack::SetStartTime(), WsfTrack::SetTargetIndex(), and targetIndex().
Referenced by TranslateTaskAssignMessage(), and TranslateTrackMessage().
| bool WsfXIO_AutoDisMapping::TranslateTrackDropMessage | ( | double | aSimTime, |
| WsfMessage * | aMessagePtr, | ||
| ConnectionData * | aConnectionData, | ||
| WsfXIO_DisMessagePkt & | aPkt ) |
| bool WsfXIO_AutoDisMapping::TranslateTrackMessage | ( | double | aSimTime, |
| WsfMessage * | aMessagePtr, | ||
| ConnectionData * | aConnectionData, | ||
| WsfXIO_DisMessagePkt & | aPkt ) |
References WsfTrackMessage::GetTrack(), and TranslateTrack().
Referenced by Initialize().
|
protected |
Update the 'removed platforms' list as necessary.
References WsfPlatform::GetIndex(), and mRemovedPlatforms.
Referenced by HandleDisconnect(), HandlePlatformInfo(), and PlatformDeleted().
|
protected |
Referenced by Initialize().
|
protected |
Referenced by FindConnectionData(), FindPlatformData(), GetConnection(), HandleConnect(), HandleDisconnect(), and ~WsfXIO_AutoDisMapping().
|
protected |
Referenced by DelayDisEntityState(), and HandlePlatformInfo().
|
protected |
Referenced by WsfXIO_AutoDisMapping().
|
protected |
Referenced by HandlePlatformInfo(), Initialize(), NewDisPlatform(), PlatformInitialized(), and WsfXIO_AutoDisMapping().
|
protected |
Referenced by HandleConnect(), WsfXIO_AutoDisMapping(), and ~WsfXIO_AutoDisMapping().
|
protected |
Referenced by NewDisPlatform(), and WsfXIO_AutoDisMapping().
|
protected |
Referenced by DelayDisEntityState(), HandleDisMessage(), HandlePlatformInfo(), Initialize(), IsAutoMapped(), NewDisPlatform(), and WsfXIO_AutoDisMapping().
|
protected |
Referenced by CanTranslateMessage(), HandleDisMessage(), and Initialize().
|
protected |
Maps a PlatformID to RemotePlatformInfo.
Referenced by FindPlatform(), HandleDisconnect(), HandlePlatformInfo(), PlatformDeleted(), PlatformInitialized(), and ~WsfXIO_AutoDisMapping().
|
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().
|
protected |
Referenced by NewDisPlatform(), and WsfXIO_AutoDisMapping().
|
protected |
Referenced by ForwardMessage(), HandleDisMessage(), HandlePlatformInfo(), Initialize(), TranslateTrack(), and WsfXIO_AutoDisMapping().