12#ifndef WSFEXTINTERFACE_HPP
13#define WSFEXTINTERFACE_HPP
15#include "wsf_export.h"
24#include "UtCallback.hpp"
25#include "UtCallbackHolder.hpp"
26#include "UtRandom.hpp"
70 bool ProcessDeadReckonInput(UtInput& aInput);
71 void ProcessEntityType(UtInput& aInput);
73 void ProcessRadioEntityType(UtInput& aInput);
74 void ProcessExternalEntity(UtInput& aInput);
75 void ProcessExternalType(UtInput& aInput);
78 bool ProcessEntityId(std::string aName,
int aEntityId);
80 void ProcessEntityId(UtInput& aInput);
82 void WriteEntityTypes(
WsfScenario& aScenario, std::ostream& aStream);
83 void WriteEmitterTypes(
WsfScenario& aScenario, std::ostream& aStream);
94 static void ReadEntityId(UtInput& aInput,
WsfExtEntityId& aEntityId);
98 static void ConvertInputToEntityId(std::string& aInput,
WsfExtEntityId& aEntityId);
101 static void ConvertInputToEntityType(std::string& aInput,
WsfExtEntityType& aEntityType);
176 void AddedToScenario()
override;
216 void SelectEntityId(
WsfPlatform* aPlatformPtr, uint16_t& aEntityId);
217 void FreeEntityId(uint16_t aEntityId);
219 bool IsPrivate(
const WsfPlatform* aPlatformPtr)
const;
236 uint16_t GetNewEventId();
260 double Connected(
double aSimTime);
268 UtCallbackHolder mCallbacks;
278 uint16_t mNextEntity;
280 uint16_t mNextEventId;
283 std::bitset<65536U> mActiveEntityIds;
UtStringId WsfStringId
WsfStringId – the same thing as UtStringId.
Definition WsfStringId.hpp:23
#define WSF_EXPORT
Definition WsfXIO_Export.hpp:35
Contains the 'categories' to which an object belongs.
Definition WsfCategoryList.hpp:34
A component list that stores only components of a specified type.
Definition WsfComponentList.hpp:343
WsfComponentT()
Definition WsfComponent.hpp:124
virtual bool ProcessInput(UtInput &aInput)
Definition WsfComponent.cpp:100
Definition WsfExtInterface.hpp:55
std::map< WsfStringId, WsfExtRadioEntityType > mCommTypeToRadioEntityType
Definition WsfExtInterface.hpp:139
std::map< WsfExtEntityType, WsfStringId > mEntityTypeToObjectType
Definition WsfExtInterface.hpp:136
double mDeferredConnectionTime
Definition WsfExtInterface.hpp:123
WsfExtInterfaceComponent Component
Definition WsfExtInterface.hpp:57
std::map< WsfStringId, uint16_t > mPlatformNameToEntityId
Definition WsfExtInterface.hpp:147
uint16_t mStartEntity
Definition WsfExtInterface.hpp:120
std::map< WsfStringId, double > mTargetPriority
Definition WsfExtInterface.hpp:128
std::set< WsfExtEntityId > mExternalEntityIds
Definition WsfExtInterface.hpp:149
unsigned short mApplicationId
Definition WsfExtInterface.hpp:122
std::map< WsfExtRadioEntityType, WsfStringId > mRadioEntityTypeToCommType
Definition WsfExtInterface.hpp:140
std::set< WsfExtEntityType > mExternalEntityTypes
Definition WsfExtInterface.hpp:150
ComponentList mComponents
Definition WsfExtInterface.hpp:155
bool mAllPrivate
Definition WsfExtInterface.hpp:116
void AddComponent(Component *aComponentPtr)
Definition WsfExtInterface.hpp:63
std::set< WsfStringId > mPrivateTypeId
Definition WsfExtInterface.hpp:117
bool mDebugDetonationEnabled
Definition WsfExtInterface.hpp:126
WsfExtEmission * GetEmission() const
Definition WsfExtInterface.hpp:68
unsigned short mSiteId
Definition WsfExtInterface.hpp:121
WsfExtData(WsfScenario &aScenario)
Definition WsfExtInterface.cpp:91
std::map< WsfStringId, int > mSideIdToForceId
Definition WsfExtInterface.hpp:132
WsfExtEntityDeadReckonSetup mDR_Setup
Definition WsfExtInterface.hpp:142
WsfComponentListT< WsfExtInterfaceComponent > ComponentList
Definition WsfExtInterface.hpp:58
WsfCategoryList mPrivateCategoryId
Definition WsfExtInterface.hpp:119
WsfStringId mUnknownPlatformTypeId
Definition WsfExtInterface.hpp:130
const ComponentList & GetComponents() const
Definition WsfExtInterface.hpp:64
WsfExtEmission * mEmissionPtr
Definition WsfExtInterface.hpp:152
std::set< WsfStringId > mPrivateNameId
Definition WsfExtInterface.hpp:118
std::map< WsfStringId, WsfExtEntityType > mObjectTypeToEntityType
Definition WsfExtInterface.hpp:135
std::bitset< 65536U > mPreassignedEntityIds
Definition WsfExtInterface.hpp:145
double mDeferredPDUSendTime
Deferred time before any DIS PDUs can be sent.
Definition WsfExtInterface.hpp:125
Definition WsfExtEmission.hpp:32
Definition WsfExtEntityDeadReckon.hpp:46
Definition WsfExtEntityId.hpp:22
Definition WsfExtEntityType.hpp:28
Definition WsfExtInterface.hpp:46
virtual bool CompleteLoad(WsfScenario &aScenario)
Definition WsfExtInterface.hpp:48
virtual void PrintEmitterTypes(WsfScenario &aScenario, std::ostream &aStream)
Definition WsfExtInterface.hpp:49
The WSF Ext is code which is shared between common external interfaces like DIS and HLA.
Definition WsfExtInterface.hpp:183
@ cALL_ENTITIES
Definition WsfExtInterface.hpp:189
@ cALL_APPLIC
Definition WsfExtInterface.hpp:188
@ cNO_SITES
Definition WsfExtInterface.hpp:190
@ cALL_SITES
Definition WsfExtInterface.hpp:187
@ cNO_ENTITY
Definition WsfExtInterface.hpp:192
@ cNO_APPLIC
Definition WsfExtInterface.hpp:191
@ cRQST_ASSIGN_ID
Definition WsfExtInterface.hpp:193
WsfCategoryList & GetPrivateCategoryId()
Definition WsfExtInterface.hpp:223
std::set< WsfStringId > & GetPrivateNameId()
Definition WsfExtInterface.hpp:221
std::map< WsfExtEntityType, WsfStringId > & GetEntityTypeToObjectMap()
Definition WsfExtInterface.hpp:231
WsfStringId SelectPlatformType(const WsfExtEntityType &aEntityType)
Given an entity type, select the object type to be used.
Definition WsfExtInterface.cpp:860
std::bitset< 65536U > * PreassignedEntityIds()
Definition WsfExtInterface.hpp:255
bool PrepareExtension() override
Definition WsfExtInterface.cpp:774
std::map< WsfStringId, uint16_t > * PlatformNameToEntityId()
Definition WsfExtInterface.hpp:257
UtCallbackListN< void(double)> ConnectionComplete
Definition WsfExtInterface.hpp:251
WsfExtInterface(WsfExtInput &aInput)
Definition WsfExtInterface.cpp:752
std::set< WsfStringId > & GetPrivateTypeId()
Definition WsfExtInterface.hpp:222
static void StripExternalPlatform(WsfPlatform *aPlatformPtr)
Definition WsfExtInterface.cpp:808
WsfExtEntityDeadReckon * GetEntityDeadReckon() const
Definition WsfExtInterface.hpp:247
uint16_t AssignNewEntity()
Definition WsfExtInterface.cpp:928
unsigned short GetSiteId()
Definition WsfExtInterface.hpp:227
WsfStringId GetDefaultPlatformTypeId()
Return the type ID of the default platform.
Definition WsfExtInterface.hpp:212
ut::Random & GetRandom()
Get the local random number generator.
Definition WsfExtInterface.hpp:239
WsfPlatform * CreateExternalPlatform(const std::string &aPlatformType)
Definition WsfExtInterface.cpp:835
void SimulationComplete(double aSimTime)
std::map< WsfStringId, WsfExtEntityType > & GetObjectToEntityTypeMap()
Definition WsfExtInterface.hpp:230
std::bitset< 65536U > * ActiveEntityIds()
Definition WsfExtInterface.hpp:256
unsigned short GetApplicationId()
Definition WsfExtInterface.hpp:228
double GetDeferredConnectionTime() const
Return the time from the start of the simulation run that external interfaces will open connections.
Definition WsfExtInterface.hpp:242
WsfStringId GetUnknownPlatformTypeId()
Return the type ID of the platform mapped to unknown types.
Definition WsfExtInterface.hpp:214
double GetDeferredPDUSendTime() const
Return the time from the start of the simulation run that DIS PDUs can be sent across external interf...
Definition WsfExtInterface.hpp:245
Definition WsfObject.hpp:40
WsfScenarioExtension()
Definition WsfScenarioExtension.cpp:21
WsfScenario & GetScenario() const
Definition WsfScenarioExtension.hpp:46
friend class WsfScenario
Definition WsfScenarioExtension.hpp:39
Contains the data required to create a simulation, and acts as the entry point for input file process...
Definition WsfScenario.hpp:111
WsfSimulationExtension()
Definition WsfSimulationExtension.cpp:23
The main controller for a simulation.
Definition WsfSimulation.hpp:109
Definition WsfComm.hpp:43
Definition WsfExtEntityDeadReckon.hpp:31