WSF
WsfXIO_RemotePlatformList Class Reference

#include <WsfXIO_RemotePlatformList.hpp>

Collaboration diagram for WsfXIO_RemotePlatformList:

Public Types

enum  InformationLevel { cBASIC_INFORMATION = 1 , cSTATE_INFORMATION = 3 , cROUTE_INFORMATION = 4 , cNO_CHANGE = 0x10000000 }
typedef std::multimap< WsfXIO_EntityId, WsfXIO_PlatformInfo * > EntityIdMap
typedef std::map< WsfXIO_PlatformId, WsfXIO_PlatformInfo * > PlatformIdMap
typedef std::pair< WsfStringId, unsigned int > PlatformNameId
typedef std::map< PlatformNameId, WsfXIO_PlatformInfo * > PlatformNameIdMap

Public Member Functions

void Send (WsfXIO_Packet &aPkt)
 Send an XIO Packet to all connections maintained by the remote platform list.
 WsfXIO_RemotePlatformList (WsfXIO_Interface *aInterfacePtr)
 ~WsfXIO_RemotePlatformList ()
void SetReliableEntityState (bool aIsReliable)
void SetIgnoreExternalPlatforms (bool aIgnore)
void SetInformationLevels (int aPlatformInformationLevel)
void SetDeadReckonParameters (double aDeadReckonInterval, double aMaxDeadReckonError=5.0, double aMaxDeadReckonOrientationError=3.0 *UtMath::cRAD_PER_DEG)
void SetInformationLevels (int aPlatformInformationLevel, WsfXIO_PlatformInfo *aPlatformPtr, double aDeadReckonInterval=1.0, double aMaxDeadReckonError=5.0, double aMaxDeadReckonOrientationError=3.0 *UtMath::cRAD_PER_DEG)
void Destroy ()
 Call this method to clean out the Remote Platform List's memory.
bool AddConnection (WsfXIO_Connection *aConnectionPtr, const WsfClockSource *aClockPtr)
void DropConnection (WsfXIO_Connection *aConnectionPtr)
WsfXIO_ConnectionGetConnectionByEntityId (const WsfXIO_EntityId &aEntityId)
WsfXIO_PlatformInfoGetPlatformByEntityId (const WsfXIO_EntityId &aEntityId)
WsfXIO_PlatformInfoGetPlatformByIndex (const WsfXIO_Connection *aConnectionPtr, const unsigned int aPlatformIndex)
WsfXIO_PlatformInfoFindPlatform (WsfXIO_PlatformId aPlaformId)
WsfXIO_PlatformInfoFindPlatform (WsfXIO_EntityId aId, int aConnectionId)
 Returns the platform info for a platform with the given entity ID and connection ID.
WsfXIO_PlatformInfoFindPlatformByIndex (int aPlatformIndex, const WsfXIO_Connection *aConnectionPtr=nullptr)
WsfXIO_PlatformInfoFindPlatformByName (WsfStringId aPlatformName, const WsfXIO_Connection *aConnectionPtr=nullptr)
CommandChainList GetCommandChainByEntityId (const WsfXIO_EntityId &aEntityId) const
std::list< WsfXIO_PlatformInfo * > GetCurrentPlatforms () const
unsigned int GetConnectionCount () const
const PlatformIdMapGetAllPlatforms () const
const EntityIdMapGetPlatformsByEntityId () const

Public Attributes

UtCallbackListN< void(WsfXIO_PlatformInfo &)> PlatformAdded
UtCallbackListN< void(WsfXIO_PlatformInfo &)> PlatformRemoved
UtCallbackListN< void(WsfXIO_PlatformInfo &)> PlatformEntityStateChanged
 Provides information about a platform when its entity state changes.
UtCallbackListN< void(WsfXIO_PlatformInfo &, WsfXIO_PlatformPartInfo &)> PlatformPartStateChanged
 Provides information about a platform when a platform part state changes.
UtCallbackListN< void(WsfXIO_PlatformInfo &)> TrackManagerStateChanged
 Provides information about a platform when its track manager state changes.
UtCallbackListN< void(WsfXIO_PlatformInfo &, const std::vector< WsfXIO_CommandChain > &)> CommandChainInitialized
 Provides information about a platform when its entity state changes.
UtCallbackListN< void(WsfXIO_PlatformInfo &)> RouteUpdated

Protected Member Functions

unsigned int GetInfoType (int aInfoLevel)
ConnectionInfo * FindConnection (const GenUniqueId &aId)

Protected Attributes

WsfXIO_InterfacemInterfacePtr
bool mReliableEntityState
bool mUseDefaultDR_Params
bool mIgnoreExternalPlatforms
ConnectionMap mConnectionMap
EntityIdMap mAllPlatformsMap
CommandChainMap mCommandChainMap
PlatformIdMap mPlatforms
PlatformNameIdMap mPlatformsByName
UtCallbackHolder mCallbacks
int mDefaultPlatformInfoLevel
double mDefaultDeadReckonInterval
double mDefaultMaxDeadReckonError
double mDefaultMaxDeadReckonOrientationError

Friends

class ConnectionInfo

Detailed Description

WsfXIO_RemotePlatformList allows you to subscribe to platform lists maintained by remote WSF-based applications. The WsfXIO_RemotePlatformList consolidates these platforms so that you can access them by DisEntityId without needing to know their host application. Alternatively, you can look up a platform by platform index if you know the platform's host application.

Member Typedef Documentation

◆ EntityIdMap

◆ PlatformIdMap

◆ PlatformNameId

typedef std::pair<WsfStringId, unsigned int> WsfXIO_RemotePlatformList::PlatformNameId

◆ PlatformNameIdMap

Member Enumeration Documentation

◆ InformationLevel

Information level specifies the depth of information you want from the platforms you have subscribed to.

Enumerator
cBASIC_INFORMATION 

Provides Platform identity and list of platform parts.

cSTATE_INFORMATION 

Provides kinematic information in addition to the basic information.

cROUTE_INFORMATION 
cNO_CHANGE 

Constructor & Destructor Documentation

◆ WsfXIO_RemotePlatformList()

WsfXIO_RemotePlatformList::WsfXIO_RemotePlatformList ( WsfXIO_Interface * aInterfacePtr)

◆ ~WsfXIO_RemotePlatformList()

WsfXIO_RemotePlatformList::~WsfXIO_RemotePlatformList ( )

References Destroy().

Member Function Documentation

◆ AddConnection()

bool WsfXIO_RemotePlatformList::AddConnection ( WsfXIO_Connection * aConnectionPtr,
const WsfClockSource * aClockPtr )

Subscribe to an additional XIO connection (presumably from an additional remote host application).

References ConnectionInfo, WsfXIO_Connection::GetApplicationId(), WsfXIO_Connection::GetInterface(), mCallbacks, mConnectionMap, and mDefaultPlatformInfoLevel.

◆ Destroy()

void WsfXIO_RemotePlatformList::Destroy ( )

Call this method to clean out the Remote Platform List's memory.

Referenced by ~WsfXIO_RemotePlatformList().

◆ DropConnection()

void WsfXIO_RemotePlatformList::DropConnection ( WsfXIO_Connection * aConnectionPtr)

Unsubscribe from an XIO Connection (presumably from an additional remote host application).

References WsfXIO_Connection::GetApplicationId().

◆ FindConnection()

WsfXIO_RemotePlatformList::ConnectionInfo * WsfXIO_RemotePlatformList::FindConnection ( const GenUniqueId & aId)
protected

References mConnectionMap.

Referenced by SetInformationLevels().

◆ FindPlatform() [1/2]

WsfXIO_PlatformInfo * WsfXIO_RemotePlatformList::FindPlatform ( WsfXIO_EntityId aId,
int aConnectionId )

Returns the platform info for a platform with the given entity ID and connection ID.

References end(), and mAllPlatformsMap.

◆ FindPlatform() [2/2]

WsfXIO_PlatformInfo * WsfXIO_RemotePlatformList::FindPlatform ( WsfXIO_PlatformId aPlaformId)

References mPlatforms, and platformPtr.

◆ FindPlatformByIndex()

WsfXIO_PlatformInfo * WsfXIO_RemotePlatformList::FindPlatformByIndex ( int aPlatformIndex,
const WsfXIO_Connection * aConnectionPtr = nullptr )

Returns the platform with remote index aPlatformIndex hosted by connection aConnectionPtr (optional) note: If aConnectionPtr is not given, there may be multiple platforms sharing the same index.

References WsfXIO_Connection::GetConnectionId(), WsfXIO_PlatformId::mConnectionId, WsfXIO_PlatformId::mIndex, mPlatforms, and platformPtr.

◆ FindPlatformByName()

WsfXIO_PlatformInfo * WsfXIO_RemotePlatformList::FindPlatformByName ( WsfStringId aPlatformName,
const WsfXIO_Connection * aConnectionPtr = nullptr )

Returns the platform with name aPlatformName hosted by aConnectionPtr (optional). note: If aConnectionPtr is not given, there may be multiple platforms sharing the same name.

References WsfXIO_Connection::GetConnectionId(), WsfXIO_PlatformId::mConnectionId, mPlatformsByName, and platformPtr.

◆ GetAllPlatforms()

const PlatformIdMap & WsfXIO_RemotePlatformList::GetAllPlatforms ( ) const
inline

References mPlatforms.

◆ GetCommandChainByEntityId()

std::vector< WsfXIO_CommandChain > WsfXIO_RemotePlatformList::GetCommandChainByEntityId ( const WsfXIO_EntityId & aEntityId) const

Returns the platform's command chain. CommandChainList::empty() == true if the command chain data is not available.

References mCommandChainMap.

◆ GetConnectionByEntityId()

WsfXIO_Connection * WsfXIO_RemotePlatformList::GetConnectionByEntityId ( const WsfXIO_EntityId & aEntityId)

Get the Connection that supplied the given Dis Entity ID. Returns 0 pointer if that Dis Entity ID isn't subscribed to.

Returns the connection which is sending the entity with the ID aEntityId.

Note
Warning: This routine should not be used if multiple connections can send the same entity.

References mAllPlatformsMap.

◆ GetConnectionCount()

unsigned int WsfXIO_RemotePlatformList::GetConnectionCount ( ) const
inline

Returns the number of connections that the RemotePlatformList presently is subscribed to.

References mConnectionMap.

◆ GetCurrentPlatforms()

std::list< WsfXIO_PlatformInfo * > WsfXIO_RemotePlatformList::GetCurrentPlatforms ( ) const

Returns the list of all platforms presently recognized by the remote platform list. The list returns contains pointers to the source platforms. Do not maintain this list beyond scope.

References mAllPlatformsMap.

◆ GetInfoType()

◆ GetPlatformByEntityId()

WsfXIO_PlatformInfo * WsfXIO_RemotePlatformList::GetPlatformByEntityId ( const WsfXIO_EntityId & aEntityId)

Get Platform Information associated with the given Dis Entity ID. Returns 0 pointer if that Dis Entity ID isn't subscribed to.

Returns a WsfXIO_PlatformInfo for a platform with the given WsfXIO_EntityId if one exists

Note
Warning: This routine should not be used if multiple connections can send the same entity.

References mAllPlatformsMap, and platformPtr.

◆ GetPlatformByIndex()

WsfXIO_PlatformInfo * WsfXIO_RemotePlatformList::GetPlatformByIndex ( const WsfXIO_Connection * aConnectionPtr,
const unsigned int aPlatformIndex )

Get Platform information associated with the given platform index hosted by the specified XIO connection. Returns 0 pointer if that Dis Entity ID isn't subscribed to.

References WsfXIO_Connection::GetApplicationId(), mConnectionMap, and platformPtr.

◆ GetPlatformsByEntityId()

const EntityIdMap & WsfXIO_RemotePlatformList::GetPlatformsByEntityId ( ) const
inline

References mAllPlatformsMap.

◆ Send()

void WsfXIO_RemotePlatformList::Send ( WsfXIO_Packet & aPkt)

Send an XIO Packet to all connections maintained by the remote platform list.

Send an XIO Packet to all connections maintained by the remote platform list.

References mConnectionMap, and mInterfacePtr.

◆ SetDeadReckonParameters()

void WsfXIO_RemotePlatformList::SetDeadReckonParameters ( double aDeadReckonInterval,
double aMaxDeadReckonError = 5.0,
double aMaxDeadReckonOrientationError = 3.0 * UtMath::cRAD_PER_DEG )

◆ SetIgnoreExternalPlatforms()

void WsfXIO_RemotePlatformList::SetIgnoreExternalPlatforms ( bool aIgnore)
inline

◆ SetInformationLevels() [1/2]

void WsfXIO_RemotePlatformList::SetInformationLevels ( int aPlatformInformationLevel)

◆ SetInformationLevels() [2/2]

void WsfXIO_RemotePlatformList::SetInformationLevels ( int aPlatformInformationLevel,
WsfXIO_PlatformInfo * aPlatformPtr,
double aDeadReckonInterval = 1.0,
double aMaxDeadReckonError = 5.0,
double aMaxDeadReckonOrientationError = 3.0 * UtMath::cRAD_PER_DEG )

◆ SetReliableEntityState()

void WsfXIO_RemotePlatformList::SetReliableEntityState ( bool aIsReliable)
inline

References mReliableEntityState.

◆ ConnectionInfo

friend class ConnectionInfo
friend

Referenced by AddConnection().

Member Data Documentation

◆ CommandChainInitialized

UtCallbackListN<void(WsfXIO_PlatformInfo&, const std::vector<WsfXIO_CommandChain>&)> WsfXIO_RemotePlatformList::CommandChainInitialized

Provides information about a platform when its entity state changes.

◆ mAllPlatformsMap

EntityIdMap WsfXIO_RemotePlatformList::mAllPlatformsMap
protected

◆ mCallbacks

UtCallbackHolder WsfXIO_RemotePlatformList::mCallbacks
protected

Referenced by AddConnection().

◆ mCommandChainMap

CommandChainMap WsfXIO_RemotePlatformList::mCommandChainMap
protected

◆ mConnectionMap

ConnectionMap WsfXIO_RemotePlatformList::mConnectionMap
protected

◆ mDefaultDeadReckonInterval

double WsfXIO_RemotePlatformList::mDefaultDeadReckonInterval
protected

◆ mDefaultMaxDeadReckonError

double WsfXIO_RemotePlatformList::mDefaultMaxDeadReckonError
protected

◆ mDefaultMaxDeadReckonOrientationError

double WsfXIO_RemotePlatformList::mDefaultMaxDeadReckonOrientationError
protected

◆ mDefaultPlatformInfoLevel

int WsfXIO_RemotePlatformList::mDefaultPlatformInfoLevel
protected

◆ mIgnoreExternalPlatforms

bool WsfXIO_RemotePlatformList::mIgnoreExternalPlatforms
protected

◆ mInterfacePtr

WsfXIO_Interface* WsfXIO_RemotePlatformList::mInterfacePtr
protected

Referenced by Send(), and WsfXIO_RemotePlatformList().

◆ mPlatforms

PlatformIdMap WsfXIO_RemotePlatformList::mPlatforms
protected

◆ mPlatformsByName

PlatformNameIdMap WsfXIO_RemotePlatformList::mPlatformsByName
protected

Referenced by FindPlatformByName().

◆ mReliableEntityState

bool WsfXIO_RemotePlatformList::mReliableEntityState
protected

◆ mUseDefaultDR_Params

bool WsfXIO_RemotePlatformList::mUseDefaultDR_Params
protected

◆ PlatformAdded

UtCallbackListN<void(WsfXIO_PlatformInfo&)> WsfXIO_RemotePlatformList::PlatformAdded

Provides information about a platform when it enters the distributed simulation environment.

◆ PlatformEntityStateChanged

UtCallbackListN<void(WsfXIO_PlatformInfo&)> WsfXIO_RemotePlatformList::PlatformEntityStateChanged

Provides information about a platform when its entity state changes.

◆ PlatformPartStateChanged

UtCallbackListN<void(WsfXIO_PlatformInfo&, WsfXIO_PlatformPartInfo&)> WsfXIO_RemotePlatformList::PlatformPartStateChanged

Provides information about a platform when a platform part state changes.

◆ PlatformRemoved

UtCallbackListN<void(WsfXIO_PlatformInfo&)> WsfXIO_RemotePlatformList::PlatformRemoved

Provides information about a platform when it leaves the distributed simulation environment.

◆ RouteUpdated

UtCallbackListN<void(WsfXIO_PlatformInfo&)> WsfXIO_RemotePlatformList::RouteUpdated

◆ TrackManagerStateChanged

UtCallbackListN<void(WsfXIO_PlatformInfo&)> WsfXIO_RemotePlatformList::TrackManagerStateChanged

Provides information about a platform when its track manager state changes.


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