WSF
wsf::dis::ScenarioExtension Class Reference

#include <WsfDisExtension.hpp>

Inheritance diagram for wsf::dis::ScenarioExtension:
Collaboration diagram for wsf::dis::ScenarioExtension:

Public Member Functions

void SimulationCreated (WsfSimulation &aSimulation) override
bool ProcessInput (UtInput &aInput) override
Public Member Functions inherited from WsfScenarioExtension
 WsfScenarioExtension ()
 ~WsfScenarioExtension () override
WsfScenarioGetScenario () const
WsfApplicationGetApplication () const
virtual void AddedToScenario ()
virtual void FileLoaded (const std::string &aFileName)
virtual bool Complete ()
virtual bool Complete2 ()
virtual bool AlwaysCreate ()
Public Member Functions inherited from WsfExtension
virtual ~WsfExtension ()=default
const std::string & GetExtensionName () const
Public Member Functions inherited from WsfDisInput
 WsfDisInput ()
bool ProcessInput (WsfScenario &aScenario, UtInput &aInput)
bool ProcessBlockInput (WsfScenario &aScenario, UtInput &aInput)
std::vector< DeviceConfiguration > & GetDeviceConfigurations ()
 Return whether device configurations for evaluation.
bool ProcessDeviceInput (WsfScenario &aScenario, UtInput &aInput, DeviceConfiguration &aConfiguration)
bool ProcessFilterAllowance (UtInput &aInput, WsfDisFilterAllowance &aAllowance)
std::set< std::pair< unsigned short, unsigned short > > & GetIgnoredSiteAndApps ()
 Returns the list of ignored sites and applications.
bool GetIgnoredSiteAndApplicationPair (unsigned int aIndex, std::pair< unsigned short, unsigned short > &aSiteAndAppPair)
 Returns a site and application begin filtered out by index.
bool IgnoreSiteAndApplication (unsigned short aSite, unsigned short aApp)
bool IsTerseMode () const
bool UseSimpleAccelerations () const
bool SuppressNonStandardData () const
 Returns 'true' if the DIS interface is only sending standard DIS data.
bool MultiThreaded () const
bool DebugEnabled () const
void SuppressNonStandardData (bool aDoSupress)
 Called by WsfDisInterface to disable output of non-DIS standard data.
bool UseTrackJamForTrackingRequests ()
 Is the sensor track-jam list being used to indicate a tracking request.
bool SuppressCME_PassiveSensor () const
bool SuppressCME_EntityData () const
bool SuppressCME_DetectBeam () const
double GetSensorUpdateInterval () const
int GetTimeToLive () const
const WsfDisArticulatedPart::ArticulationListGetArticulationList () const
void AddComponent (Component *aComponentPtr)
const ComponentListGetComponents () const

Static Public Member Functions

static ScenarioExtensionFind (const WsfScenario &aScenario)
Static Public Member Functions inherited from WsfDisInput
static bool ValidSignatureTypeName (std::string &aType)

Additional Inherited Members

Public Types inherited from WsfDisInput
using Component = WsfDisComponent
using ComponentList = WsfComponentListT<WsfDisComponent>
using ArticulationVec = std::vector<Articulation>
using ArticulationMap = std::map<WsfStringId, ArticulationVec>
Public Attributes inherited from WsfDisInput
union { 
   struct { 
      bool   mMultiThreaded: 1 
      bool   mDebugEnabled: 1 
      bool   mShadowAll: 1 
      bool   mLogCreatedEntities: 1 
      bool   mSuppressCommData: 1 
      bool   mSuppressEmissionsData: 1 
      bool   mSendPeriodicsWhilePaused: 1 
      bool   mDebugAppearanceUpdates: 1 
      bool   mUsePduTime: 1 
      bool   mAutostart: 1 
      bool   mUseSimpleAccelerations: 1 
      bool   mTerseMode: 1 
      bool   mUseSimpleOrientRates: 1 
 Use the calculated simple orientation rates. More...
      bool   mJoinExercise: 1 
 Join an exercise for non-realtime simulation. More...
      bool   mUseTrackJamForTrackingRequests: 1 
      bool   mSimpleMissReporting: 1 
      bool   mDebugThread: 1 
      bool   mUseWorldToBodyAngularVelocities: 1 
 Force the world (Euler) angular velocities to body axis angular velocities. More...
      bool   mZeroBodyAngularVelocities: 1 
 Zero out the world (Euler) angular velocities to body axis angular velocities. More...
      bool   mIgnoreStopFreezePDU: 1 
 Ignore the Stop/Freeze PDU; can be used by simulations running asynchronously. More...
      bool   mSuppressCME_DetectBeam: 1 
 Deprecated commands. More...
      bool   mSuppressCME_EntityData: 1 
 'true' if the non-standard 'other' PDU used for CME entity data should NOT be sent. More...
      bool   mSuppressCME_DrawData: 1 
 'true' if the non-standard practice of sending WsfDraw PDUs across the network should NOT take place More...
      bool   mSuppressCME_PassiveSensor: 1 
 'true' if the non-standard practice of sending emissions PDUs for passive sensors should NOT take place. More...
      bool   mUseDeprecatedCME_DrawData: 1 
 'true' if the WsfDraw DIS 'Other' PDUs containing draw commands will be sent using the deprecated format. More...
      bool   mSuppressNonStandardData: 1 
 'true' if WSF will only output standard DIS data. More...
   } 
   unsigned int   mFlags 
}; 
unsigned mMaxBadPDU_Count
int mMulticastTimeToLive
double mThreadSleepTime
Protected Types inherited from WsfDisInput
using RangeFilteredPlatforms = std::vector<std::tuple<WsfStringId, size_t, double>>
using NameTypeToStateIdPair = std::pair<WsfStringId, int>
using StringToStateIdPair = std::pair<std::string, WsfStringId>
using StringToStateIdVec = std::vector<StringToStateIdPair>
using IdIdToStringIDMap = std::map<NameTypeToStateIdPair, StringToStateIdVec>
using IdIdToStringIDMapIter = std::map<NameTypeToStateIdPair, StringToStateIdVec>::iterator
Protected Member Functions inherited from WsfExtension
void InitializeExtensionName (const std::string &aName)
Protected Member Functions inherited from WsfDisInput
bool ProcessArticulatedPart (UtInput &aInput)
Protected Attributes inherited from WsfDisInput
std::set< WsfStringIdmShadowTypeId
std::set< WsfStringIdmShadowNameId
std::vector< DeviceConfigurationmDeviceConfigurations
RangeFilteredPlatforms mRangeFilteredPlatforms
std::set< WsfExtEntityTypemIgnoredTypes
std::set< DisEnum8 > mIgnoredPduTypes
std::set< std::pair< unsigned short, unsigned short > > mIgnoredSiteAndApps
std::set< std::pair< unsigned short, unsigned short > > mIgnoredKindAndDomain
double mInputHeartbeatMultiplier
double mSensorUpdateInterval
IdIdToStringIDMap mAfterBurnerByName
IdIdToStringIDMap mAfterBurnerByType
ArticulationMap mArticulationByName
 Map for changing appearance (signatures, etc.) via articulated parts.
ArticulationMap mArticulationByType
IdIdToStringIDMap mConfigIdByName
IdIdToStringIDMap mConfigIdByType
WsfDisArticulatedPart::ArticulationList mArticulationList
bool sDebugEnabled
std::set< int > sExcludedPlatformTypes
ComponentList mComponents

Member Function Documentation

◆ Find()

ScenarioExtension * wsf::dis::ScenarioExtension::Find ( const WsfScenario & aScenario)
static

◆ ProcessInput()

bool wsf::dis::ScenarioExtension::ProcessInput ( UtInput & aInput)
overridevirtual

Process potential input for the extension. This method examines the current input command to determine if it is one that is recognized by the extension. If it is one recognized by the extension then it processes the command and returns 'true', otherwise it returns 'false'.

Parameters
aInputa reference to a UtInput object.
Returns
'true' if the command was one recognized by the extension or 'false' if not.
Exceptions
UtInput::ExceptionBase(or an object derived from it) if the command was recognized but contains some sort of error.

Reimplemented from WsfScenarioExtension.

References WsfScenarioExtension::GetScenario(), and WsfDisInput::ProcessInput().

◆ SimulationCreated()

void wsf::dis::ScenarioExtension::SimulationCreated ( WsfSimulation & aSimulation)
overridevirtual

Called when a simulation has been created. (Technically this is called upon entry to WsfSimulation::Initialize()). This is typically used when a scenario extension also requires a simulation extension. The method would typically register the simulation extension as follows:

aSimulation.RegisterExtension("my_ext", new MySimulationExtension());
Parameters
aSimulationThe simulation that is being created. See note below!
Note
This is called upon entry to WsfSimulation::Initialize() and nothing can be assumed about the state of the simulation.
See also
WsfSimulationExtension, WsfApplicationExtension::SimulationCreated

Reimplemented from WsfScenarioExtension.

References WsfExtInterface::Find(), WsfExtension::GetExtensionName(), and WsfSimulation::RegisterExtension().


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