12#ifndef WSFXIO_REMOTEPLATFORMLIST_HPP
13#define WSFXIO_REMOTEPLATFORMLIST_HPP
15#include "wsf_export.h"
17#include "UtCallback.hpp"
39 class PlatformListRequest;
42 typedef std::map<unsigned int, WsfXIO_PlatformInfo*> IndexMap;
45 typedef std::map<GenUniqueId, ConnectionInfo*> ConnectionMap;
46 typedef std::vector<WsfXIO_CommandChain> CommandChainList;
47 typedef std::map<WsfXIO_EntityId, CommandChainList> CommandChainMap;
50 typedef std::multimap<WsfXIO_EntityId, WsfXIO_PlatformInfo*>
EntityIdMap;
51 typedef std::map<WsfXIO_PlatformId, WsfXIO_PlatformInfo*>
PlatformIdMap;
79 void SetInformationLevels(
int aPlatformInformationLevel);
81 void SetDeadReckonParameters(
double aDeadReckonInterval,
82 double aMaxDeadReckonError = 5.0,
83 double aMaxDeadReckonOrientationError = 3.0 * UtMath::cRAD_PER_DEG);
85 void SetInformationLevels(
int aPlatformInformationLevel,
87 double aDeadReckonInterval = 1.0,
88 double aMaxDeadReckonError = 5.0,
89 double aMaxDeadReckonOrientationError = 3.0 * UtMath::cRAD_PER_DEG);
122 CommandChainList GetCommandChainByEntityId(
const WsfXIO_EntityId& aEntityId)
const;
127 std::list<WsfXIO_PlatformInfo*> GetCurrentPlatforms()
const;
161 void RemoveConnectionInfo(
const GenUniqueId& aConnectionId);
162 void RemoveConnectionInfo();
179 int aPlatformInfoLevel,
192 void RemoveRequest() { mInterfacePtr->GetRequestManager().RemoveRequest(mPlatformListRequestPtr); }
193 void AddRequest() { mInterfacePtr->GetRequestManager().AddRequest(mPlatformListRequestPtr); }
195 void SetInformationLevels(WsfXIO_PlatformInfo* aPlatformPtr,
196 int aPlatformInformationLevel,
197 double aDefaultDeadReckonInterval,
198 double aDefaultMaxDeadReckonError,
199 double aDefaultMaxDeadReckonOrientationError);
201 WsfXIO_PlatformInfo* GetPlatformByIndex(
const unsigned int aPlatformIndex);
202 WsfXIO_Connection* GetConnection() {
return mConnectionPtr; }
204 unsigned int ToUINT(
const int aVal) {
return static_cast<unsigned int>(aVal); }
208 ConnectionInfo(
const ConnectionInfo& aRhs);
209 ConnectionInfo& operator=(
const ConnectionInfo& aRhs);
211 WsfXIO_RemotePlatformList* mParentPtr;
212 int mPlatformInfoLevel;
213 WsfXIO_Connection* mConnectionPtr;
214 WsfXIO_Interface* mInterfacePtr;
215 PlatformListRequest* mPlatformListRequestPtr;
216 WsfXIO_RequestManager& mPlatformInfoRequestManager;
217 IndexMap mPlatformInfoMap;
218 const WsfClockSource* mClockSourcePtr;
221 friend class ConnectionInfo;
226 PlatformListRequest(ConnectionInfo& aConnectionInfo)
228 , mConnectionInfo(aConnectionInfo)
235 ConnectionInfo& mConnectionInfo;
238 class PlatformInfoRequest :
public WsfXIO_PlatformInfoRequest
241 PlatformInfoRequest(
int aPlatformIndex,
unsigned int aInformationTypes, ConnectionInfo& aConnectionInfo,
bool aIsReliable)
242 : WsfXIO_PlatformInfoRequest(aPlatformIndex, aInformationTypes, aConnectionInfo.GetConnection(), aIsReliable)
243 , mConnectionInfo(aConnectionInfo)
247 void HandleResponse(WsfXIO_ResponsePkt& aPkt)
override;
250 ConnectionInfo& mConnectionInfo;
254 unsigned int GetInfoType(
int aInfoLevel);
256 ConnectionInfo* FindConnection(
const GenUniqueId& aId);
UtStringId WsfStringId
WsfStringId – the same thing as UtStringId.
Definition WsfStringId.hpp:23
#define WSF_EXPORT
Definition WsfXIO_Export.hpp:35
Maintain the current simulation clock.
Definition WsfClockSource.hpp:22
Definition WsfXIO_Connection.hpp:37
Definition WsfXIO_PacketRegistry.hpp:973
Definition WsfXIO_PacketRegistry.hpp:1112
Definition WsfXIO_Interface.hpp:54
Base class for XIO Packets. Provides the header information.
Definition WsfXIO_Packet.hpp:46
Definition WsfXIO_PacketRegistry.hpp:171
Definition WsfXIO_PacketRegistry.hpp:1118
Definition WsfXIO_SerializeTypes.hpp:64