WSF
WsfDisInterface Class Reference

#include <WsfDisInterface.hpp>

Inheritance diagram for WsfDisInterface:
Collaboration diagram for WsfDisInterface:

Public Types

using DeviceList = std::vector<WsfDisDevice*>
Public Types inherited from WsfDisInput
using Component = WsfDisComponent
using ComponentList = WsfComponentListT<WsfDisComponent>
using ArticulationVec = std::vector<Articulation>
using ArticulationMap = std::map<WsfStringId, ArticulationVec>

Public Member Functions

 WsfDisInterface (WsfDisInput &aScenario, WsfSimulation &aSim, WsfExtInterface *aExtInterfacePtr)
void AddedToSimulation () override
bool Initialize () override
 ~WsfDisInterface () override
bool PrepareExtension () override
bool ActivateConnection (double aSimTime)
WsfDisPlatformAddExternalPlatform (double aSimTime, std::unique_ptr< WsfDisEntityState > aEntityPtr)
bool ClearIgnoredSiteAndApp (unsigned short aSite, unsigned short aApp)
 Remove a site/application from the ignored site/application list.
bool ClearIgnoredSitesAndApps ()
WsfDisPlatformFindDisPlatform (const DisEntityId &aEntityId)
double GetSimTime () const
WsfDisPlatformGetDisPlatform (size_t aPlatformIndex)
size_t GetDisPlatformCount () const
WsfExtEntityDeadReckonGetDeadReckonPtr ()
void GetEntityId (WsfPlatform *aPlatformPtr, DisEntityId &aEntityId)
 Return the DIS Entity ID of the given platform.
void GetEntityIdFromIndex (size_t aPlatformIndex, DisEntityId &aEntityId)
double GetEntityOrientationThreshold () const
 Return the orientation threshold (radians).
double GetEntityPositionThreshold () const
 Return the entity position threshold (meters).
double GetHeartbeatTimer () const
 Return the heartbeat timer (seconds).
double GetHeartbeatMultiplier () const
 Return the heartbeat multiplier.
double GetTimeFromPdu (DisPdu &aPdu) const
bool GetAutostart () const
unsigned int GetPutCounter () const
 Returns number of sent DIS PDUs.
void SetPutCounter (int aCount)
 Sets the number of sent DIS PDUs.
bool HasInputDevice () const
 Returns true if at least device is configured for receiving DIS PDU's.
bool HasOutputDevice () const
 Returns true if at least device is configured for sending DIS PDU's.
bool HasExternalDevice () const
 Returns true if at least one device is a external device.
bool HasDevice () const
 Returns true if a device is configured for sending or receiving PDU's.
unsigned int GetDeviceCount () const
WsfDisDeviceGetDevice (unsigned int aIndex)
DeviceListGetDeviceList ()
int GetSendPort () const
 Returns the send port used for DIS output.
int GetRcvPort () const
 Returns the receive port used for DIS input.
double GetInitialDistributionInterval ()
 Returns initial distribution time.
DisPduFactory * GetPduFactory ()
DisPdu * GetPdu ()
ut::Random & GetRandom ()
 Get the local random number generator.
void PutPdu (double aSimTime, std::unique_ptr< DisPdu > aPduPtr)
void ImmediatePutPdu (double aSimTime, DisPdu &aPduPtr)
void SetHeartbeatMultiplier (double aValue)
void SetPduFactory (DisPduFactory *aFactoryPtr)
bool GetSuppressDisOutput ()
void SetSuppressDisOutput (bool aFlag)
bool GetSuppressEmissionsData () const
bool SuppressAllNonStandardPDUs ()
const WsfScenarioGetScenario () const
Public Member Functions inherited from WsfSimulationExtension
 WsfSimulationExtension ()
 ~WsfSimulationExtension () override=default
WsfSimulationGetSimulation () const
const WsfScenarioGetScenario () const
virtual bool PlatformsInitialized ()
virtual void PendingStart ()
virtual void Start ()
virtual void Complete (double aSimTime)
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 WsfDisInterfaceFind (const WsfSimulation &aSimulation)
static void ReadEntityId (UtInput &aInput, DisEntityId &aEntityId)
static void ReadEntityType (UtInput &aInput, DisEntityType &aEntityType)
static void __private_SetSim (WsfSimulationExtension &aExtension, WsfSimulation *aSimPtr)
Static Public Member Functions inherited from WsfDisInput
static bool ValidSignatureTypeName (std::string &aType)

Static Public Attributes

static DisUint16 cSHADOW_SITE = 0x7FFF
static DisUint16 cMIN_PLAYBACK_SITE
static DisUint16 cMAX_PLAYBACK_SITE

Friends

class WsfDisPlatform
class WsfDisEntityState

XIO auto_mapping support.

using DelayEntityStateFn = bool (*)(WsfDisInterface& aInterfacePtr, const DisEntityId& aEntityId)
using CreatePlatformFn
static void SimTimeToDisClockTime (double aSimTime, DisClockTime &aClockTime)
void SetDelayEntityStateFunction (DelayEntityStateFn aDelayFn)
void SetCreateDisPlatformFunction (CreatePlatformFn aModifyFn)
void ResumeEntityStateProcessing (double aSimTime, const DisEntityId &aEntityId)
void AdvanceTime (double aSimTime)
void Comment (double aSimTime, WsfPlatform *aPlatformPtr, const std::string &aComment)
void CommFrequencyChanged (double aSimTime, wsf::comm::Comm *aCommPtr)
void CommTurnedOff (double aSimTime, wsf::comm::Comm *aCommPtr)
void CommTurnedOn (double aSimTime, wsf::comm::Comm *aCommPtr)
void FrameComplete (double aSimTime)
void FramePlatformsUpdated (double aSimTime)
void FrameStarting (double aSimTime)
bool UseSimpleOrientationRate ()
bool UseWorldToBodyAngularVelocities ()
bool ZeroWorldToBodyAngularVelocities ()
bool IgnoreStopFreezePDU ()
void MessageReceived (double aSimTime, wsf::comm::Comm *aXmtrPtr, wsf::comm::Comm *aRcvrPtr, const WsfMessage &aMessage, wsf::comm::Result &aResult)
void MessageTransmitted (double aSimTime, wsf::comm::Comm *aCommPtr, const WsfMessage &aMessage)
void MoverUpdated (double aSimTime, WsfExtEntityDeadReckon::PlatformDR &aDeadReckonData)
void PlatformAdded (double aSimTime, WsfPlatform *aPlatformPtr)
void PlatformDeleted (double aSimTime, WsfPlatform *aPlatformPtr)
void PlatformInitialized (double aSimTime, WsfPlatform *aPlatformPtr)
void RequestTimeAdvance (double aSimTime, double aMaxRate, double aTimeStep)
void SensorDetectionChanged (double aSimTime, WsfSensor *aSensorPtr, size_t aTargetPlatformIndex, WsfSensorResult &aResult)
void SensorFrequencyChanged (double aSimTime, WsfSensor *aSensorPtr, WsfSensorMode *aModePtr)
void SensorModeActivated (double aSimTime, WsfSensor *aSensorPtr, WsfSensorMode *aModePtr)
void SensorModeDeactivated (double aSimTime, WsfSensor *aSensorPtr, WsfSensorMode *aModePtr)
void SensorRequestCanceled (double aSimTime, WsfSensor *aSensorPtr, const WsfTrack *aTrackPtr)
void SensorRequestInitiated (double aSimTime, WsfSensor *aSensorPtr, WsfSensorMode *aModePtr, const WsfTrack *aTrackPtr)
void SensorRequestUpdated (double aSimTime, WsfSensor *aSensorPtr, WsfSensorMode *aModePtr, const WsfTrack *aTrackPtr)
void SensorScanUpdated (double aSimTime, WsfSensor *aSensorPtr)
void SensorTrackDropped (double aSimTime, WsfSensor *aSensorPtr, const WsfTrack *aTrackPtr)
void SensorTrackInitiated (double aSimTime, WsfSensor *aSensorPtr, const WsfTrack *aTrackPtr)
void SensorTurnedOff (double aSimTime, WsfSensor *aSensorPtr)
void SensorTurnedOn (double aSimTime, WsfSensor *aSensorPtr)
void SimulationPausing ()
void SimulationResuming ()
void SimulationComplete (double aSimTime)
void SimulationDestroyed (WsfSimulation *aSimulationPtr)
void SimulationStarting ()
DisUint32 GetNextRequestNumber ()
DisUint8 GetReliabilityService () const
bool PauseIsInProgress () const
void SendPeriodicPdusWhilePaused (std::vector< unsigned int > &aEntityIndices)
void SendDateAndTime (WsfDisDevice &aDevice, const DisEntityId &aReceivingId, const UtCalendar &aDateTime)
 Send the start date and time in a SetData PDU.
bool ShouldJoinExercise () const
void WriteEntityTypes (std::ostream &aStream)
WsfExtInterfaceGetExtInterface () const
WsfExtEmissionGetExtEmission () const
WsfDisArticulatedPartListGetArticulatedParts () const
void EnableFiltering ()
void ResetFiltering ()
std::map< DisEntityId, WsfDisPlatform * > & GetEntityIdToDisPlatform ()

Methods for dealing for updating PDU's from WSF objects and vis-versa.

void ExtrapolatePlatformState (double aSimTime, WsfDisPlatform *aDisPlatformPtr)
 Called from WsfDisMover to update the platform state by extrapolating from the last received entity state.
void PrepareFinalEntityState (double aSimTime, WsfPlatform *aPlatformPtr, DisEntityState *aEntityStatePtr)
bool UpdateAppearanceFromPlatform (double aSimTime, WsfPlatform *aPlatformPtr, DisEntityState *aEntityStatePtr)
 Update the DIS appearance word from the platform state.
void UpdatePlatformFromAppearance (double aSimTime, WsfPlatform *aPlatformPtr, DisEntityState *aEntityStatePtr)
 Update the platform state from the DIS appearance word.
void UpdatePlatformFromEntityState (double aSimTime, WsfDisPlatform *aDisPlatformPtr, DisEntityState *aEntityStatePtr)
void UpdatePlatformSystem (WsfPlatform *aPlatformPtr, WsfDisEmission *aEmissionPtr, DisSystem *aSystemPtr)
void SetBeamTypeAndFunction (WsfPlatformPart *aPartPtr, WsfStringId aModeNameId, int aBeamNumber, DisBeam *aBeamPtr, DisEnum8 aDefaultFunction)
void SetEmitterTypeAndFunction (WsfPlatformPart *aPartPtr, DisSystem *aSystemPtr)
void UpdateBeamFromXmtr (WsfEM_Xmtr &aXmtr, DisBeam *aBeamPtr, double aMinAz, double aMaxAz, double aMinEl, double aMaxEl)
 Update a DIS Beam record from a Transmitter object.
void UpdateXmtrFromBeam (WsfDisEmission *aEmissionPtr, DisBeam *aBeamPtr, WsfEM_Xmtr *aXmtrPtr, bool &aBeamOn)
void UpdateSystemFromSensor (WsfSensor *aSensorPtr, DisSystem *aSystemPtr)
 Update a DIS System record from a Sensor object.
void UpdateLastSimTime (double aSimTime)
bool IsDeferredConnection () const
void ExecuteDeferredTransmitEvent (double aSimTime, size_t aPlatformIndex)
double ExecuteSensorUpdateEvent (double aSimTime)
void InitializeInputData ()
 Called by WsfDisInterface to reinitialize input to default values.
void ReceivedBadEntityState ()
bool GetEntityType (WsfStringId aTypeName, DisEntityType &aEntityType) const
 Given a type name, select a DIS entity type.

Additional Inherited Members

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

Detailed Description

This is the 'private' part of WsfDisInterface.

The DIS interface has been split into two parts in order to allow the compilation of a WSF application without requiring the presence of the DIS or GenIO include files (obviously they would still be required for linking!).

The private part contains all the references to any of the DIS objects.

Member Typedef Documentation

◆ CreatePlatformFn

Initial value:
WsfPlatform* (*)(WsfDisInterface& aInterface,
WsfStringId aPlatformType,
WsfDisEntityState* aEntityStatePtr)
UtStringId WsfStringId
WsfStringId – the same thing as UtStringId.
Definition WsfStringId.hpp:23
WsfDisInterface(WsfDisInput &aScenario, WsfSimulation &aSim, WsfExtInterface *aExtInterfacePtr)
Definition WsfDisInterface.cpp:95
friend class WsfDisEntityState
Definition WsfDisInterface.hpp:86
Platforms represent a entity within the simulation.
Definition WsfPlatform.hpp:115

◆ DelayEntityStateFn

using WsfDisInterface::DelayEntityStateFn = bool (*)(WsfDisInterface& aInterfacePtr, const DisEntityId& aEntityId)

◆ DeviceList

Constructor & Destructor Documentation

◆ WsfDisInterface()

WsfDisInterface::WsfDisInterface ( WsfDisInput & aScenario,
WsfSimulation & aSim,
WsfExtInterface * aExtInterfacePtr )

References AdvanceTime(), WsfObserver::AdvanceTime(), CommFrequencyChanged(), WsfObserver::CommFrequencyChanged(), CommTurnedOff(), WsfObserver::CommTurnedOff(), CommTurnedOn(), WsfObserver::CommTurnedOn(), MessageReceived(), WsfObserver::MessageReceived(), MessageTransmitted(), WsfObserver::MessageTransmitted(), PlatformAdded(), WsfObserver::PlatformAdded(), PlatformDeleted(), WsfObserver::PlatformDeleted(), PlatformInitialized(), WsfObserver::PlatformInitialized(), RequestTimeAdvance(), WsfObserver::RequestTimeAdvance(), SensorDetectionChanged(), WsfObserver::SensorDetectionChanged(), SensorFrequencyChanged(), WsfObserver::SensorFrequencyChanged(), SensorModeActivated(), WsfObserver::SensorModeActivated(), SensorModeDeactivated(), WsfObserver::SensorModeDeactivated(), SensorRequestCanceled(), WsfObserver::SensorRequestCanceled(), SensorRequestInitiated(), WsfObserver::SensorRequestInitiated(), SensorRequestUpdated(), WsfObserver::SensorRequestUpdated(), SensorScanUpdated(), WsfObserver::SensorScanUpdated(), SensorTrackDropped(), WsfObserver::SensorTrackDropped(), SensorTrackInitiated(), WsfObserver::SensorTrackInitiated(), SensorTurnedOff(), WsfObserver::SensorTurnedOff(), SensorTurnedOn(), WsfObserver::SensorTurnedOn(), SimulationComplete(), WsfObserver::SimulationComplete(), SimulationPausing(), WsfObserver::SimulationPausing(), SimulationResuming(), WsfObserver::SimulationResuming(), SimulationStarting(), WsfObserver::SimulationStarting(), SuppressAllNonStandardPDUs(), WsfDisInput::WsfDisInput(), and WsfSimulationExtension::WsfSimulation.

Referenced by Find().

◆ ~WsfDisInterface()

WsfDisInterface::~WsfDisInterface ( )
override

Member Function Documentation

◆ ActivateConnection()

◆ AddedToSimulation()

void WsfDisInterface::AddedToSimulation ( )
overridevirtual

Called in response to WsfSimulation::RegisterExtension. The extension has now been registered in the simulation.

Reimplemented from WsfSimulationExtension.

References WsfDisInput::mComponents.

◆ AddExternalPlatform()

WsfDisPlatform * WsfDisInterface::AddExternalPlatform ( double aSimTime,
std::unique_ptr< WsfDisEntityState > aEntityPtr )

Create a DIS platform extension that corresponds to the specified Entity State PDU.

Parameters
aSimTimeThe current simulation time.
aEntityPtrThe entity state PDU.
Returns
Pointer to the DIS platform extension for the PDU.

References WsfDisPlatform.

◆ AdvanceTime()

void WsfDisInterface::AdvanceTime ( double aSimTime)

◆ ClearIgnoredSiteAndApp()

bool WsfDisInterface::ClearIgnoredSiteAndApp ( unsigned short aSite,
unsigned short aApp )

Remove a site/application from the ignored site/application list.

References WsfDisInput::mIgnoredSiteAndApps, and ok.

◆ ClearIgnoredSitesAndApps()

bool WsfDisInterface::ClearIgnoredSitesAndApps ( )

◆ Comment()

void WsfDisInterface::Comment ( double aSimTime,
WsfPlatform * aPlatformPtr,
const std::string & aComment )

◆ CommFrequencyChanged()

◆ CommTurnedOff()

◆ CommTurnedOn()

◆ EnableFiltering()

void WsfDisInterface::EnableFiltering ( )
inline

◆ ExecuteDeferredTransmitEvent()

void WsfDisInterface::ExecuteDeferredTransmitEvent ( double aSimTime,
size_t aPlatformIndex )

This is called by the internal DeferredTransmitEvent to send out an Emission PDU.

Numerous events that require transmitting an Emissions PDU may occur almost simultaneously. In order to avoid sending a PDU with each event, the first event will schedule an event that will trigger a very short time (0.001 seconds) in the future. The event will call this routine while will then send the PDU. All of events that occur during the first event and the time the transmission event will simply update the DIS system/beams as required. The transmitted PDU will then contain the sum of the effects of the events in a single PDU.

This is necessary to account for such a situation as when a single detection could cause a transition into detect state and then into track state (1-out-of-1). Without this, two PDU's would be sent for the same time, which causes problems to some receivers.

References GetDisPlatform(), WsfDisPlatform::SendEmissionsPDU(), and WsfDisPlatform.

◆ ExecuteSensorUpdateEvent()

double WsfDisInterface::ExecuteSensorUpdateEvent ( double aSimTime)

This is called by the internal SensorUpdateEvent to send out Emission PDU's in support of the 'sensor_update_interval'.

References GetDisPlatform(), WsfSimulationExtension::GetSimulation(), WsfSimulation::GetTimestep(), WsfDisInput::mSensorUpdateInterval, WsfDisPlatform::SendEmissionsPDU(), and WsfDisPlatform.

◆ ExtrapolatePlatformState()

void WsfDisInterface::ExtrapolatePlatformState ( double aSimTime,
WsfDisPlatform * aDisPlatformPtr )

◆ Find()

◆ FindDisPlatform()

WsfDisPlatform * WsfDisInterface::FindDisPlatform ( const DisEntityId & aEntityId)

Find the DIS platform with the specified entity ID.

Returns
Pointer to the DIS platform, or zero if th platform does not exist.

References WsfDisPlatform.

Referenced by WsfDisUtil::DisToWsfPlayers(), and WsfDisUtil::FindDisPlatform().

◆ FrameComplete()

void WsfDisInterface::FrameComplete ( double aSimTime)

◆ FramePlatformsUpdated()

void WsfDisInterface::FramePlatformsUpdated ( double aSimTime)

◆ FrameStarting()

void WsfDisInterface::FrameStarting ( double aSimTime)

◆ GetArticulatedParts()

WsfDisArticulatedPartList * WsfDisInterface::GetArticulatedParts ( ) const
inline

◆ GetAutostart()

bool WsfDisInterface::GetAutostart ( ) const
inline

Return whether we have directed the simulation to autostart when in networked mode.

Note
This value only has meaning for networked simulations.

References WsfDisInput::mAutostart.

◆ GetDeadReckonPtr()

WsfExtEntityDeadReckon * WsfDisInterface::GetDeadReckonPtr ( )
inline

◆ GetDevice()

WsfDisDevice * WsfDisInterface::GetDevice ( unsigned int aIndex)
inline

◆ GetDeviceCount()

unsigned int WsfDisInterface::GetDeviceCount ( ) const
inline

◆ GetDeviceList()

DeviceList & WsfDisInterface::GetDeviceList ( )
inline

◆ GetDisPlatform()

WsfDisPlatform * WsfDisInterface::GetDisPlatform ( size_t aPlatformIndex)

Get the DIS platform extension given a platform index.

Returns
Pointer to the DIS platform extension.
0 if the input platform index is 0 or if the platform no longer exists.

References WsfDisPlatform.

Referenced by ExecuteDeferredTransmitEvent(), ExecuteSensorUpdateEvent(), WsfDisUtil::GetDisPlatform(), WsfXIO_ObjectInfoLoad::Load_Platform(), WsfDisFilterAllowance::PduAllowed(), PlatformInitialized(), SendPeriodicPdusWhilePaused(), WsfL16::Interface_J11::WeaponFired(), and WsfDisUtil::WsfToDisPlayers().

◆ GetDisPlatformCount()

size_t WsfDisInterface::GetDisPlatformCount ( ) const
inline

◆ GetEntityId()

void WsfDisInterface::GetEntityId ( WsfPlatform * aPlatformPtr,
DisEntityId & aEntityId )

Return the DIS Entity ID of the given platform.

References WsfDisPlatform::GetEntityId(), WsfPlatform::GetIndex(), and WsfDisPlatform.

Referenced by WsfMilDisPlatform::UpdateJammerSystem().

◆ GetEntityIdFromIndex()

void WsfDisInterface::GetEntityIdFromIndex ( size_t aPlatformIndex,
DisEntityId & aEntityId )

Return the DIS Entity ID of the given platform index.

Note
This will return an id for either "live" and "dead" entities

References WsfDisPlatform::GetEntityId(), and WsfDisPlatform.

Referenced by WsfDisUtil::GetEntityIdFromIndex().

◆ GetEntityIdToDisPlatform()

std::map< DisEntityId, WsfDisPlatform * > & WsfDisInterface::GetEntityIdToDisPlatform ( )
inline

◆ GetEntityOrientationThreshold()

double WsfDisInterface::GetEntityOrientationThreshold ( ) const
inline

Return the orientation threshold (radians).

◆ GetEntityPositionThreshold()

double WsfDisInterface::GetEntityPositionThreshold ( ) const
inline

Return the entity position threshold (meters).

◆ GetEntityType()

bool WsfDisInterface::GetEntityType ( WsfStringId aTypeName,
DisEntityType & aEntityType ) const

Given a type name, select a DIS entity type.

References WsfDisExt::ToDis().

◆ GetExtEmission()

WsfExtEmission * WsfDisInterface::GetExtEmission ( ) const

◆ GetExtInterface()

◆ GetHeartbeatMultiplier()

double WsfDisInterface::GetHeartbeatMultiplier ( ) const
inline

Return the heartbeat multiplier.

◆ GetHeartbeatTimer()

double WsfDisInterface::GetHeartbeatTimer ( ) const
inline

Return the heartbeat timer (seconds).

◆ GetInitialDistributionInterval()

double WsfDisInterface::GetInitialDistributionInterval ( )
inline

Returns initial distribution time.

Referenced by WsfDisPlatform::WsfDisPlatform().

◆ GetNextRequestNumber()

DisUint32 WsfDisInterface::GetNextRequestNumber ( )
inline

◆ GetPdu()

DisPdu * WsfDisInterface::GetPdu ( )

Attempt to receive a PDU from a connection.

Returns
The PDU to received. 'null' if no PDU can be received by a connection.

References WsfDisDevice::GetPdu(), and GetPduFactory().

Referenced by AdvanceTime().

◆ GetPduFactory()

DisPduFactory * WsfDisInterface::GetPduFactory ( )
inline

Referenced by GetPdu().

◆ GetPutCounter()

unsigned int WsfDisInterface::GetPutCounter ( ) const
inline

Returns number of sent DIS PDUs.

◆ GetRandom()

ut::Random & WsfDisInterface::GetRandom ( )

Get the local random number generator.

Referenced by WsfDisPlatform::WsfDisPlatform().

◆ GetRcvPort()

int WsfDisInterface::GetRcvPort ( ) const

Returns the receive port used for DIS input.

Return the receive port for DIS inputs.

◆ GetReliabilityService()

DisUint8 WsfDisInterface::GetReliabilityService ( ) const
inline

◆ GetScenario()

Returns the scenario in which this extension is registered.

Note
Do not call this method before registering this extension

Referenced by ExtrapolatePlatformState(), and WsfDisUtil::GetScenario().

◆ GetSendPort()

int WsfDisInterface::GetSendPort ( ) const

Returns the send port used for DIS output.

Return the send port for DIS inputs.

◆ GetSimTime()

double WsfDisInterface::GetSimTime ( ) const
inline

Referenced by UpdatePlatformSystem().

◆ GetSuppressDisOutput()

bool WsfDisInterface::GetSuppressDisOutput ( )
inline

◆ GetSuppressEmissionsData()

bool WsfDisInterface::GetSuppressEmissionsData ( ) const
inline

◆ GetTimeFromPdu()

double WsfDisInterface::GetTimeFromPdu ( DisPdu & aPdu) const

Return the simulation time corresponding to a timestamp in a PDU

Parameters
aPduThe PDU from which the time is be extracted.
Returns
The equivalent simulation time.

References WsfDisInput::mUsePduTime, and simTime.

Referenced by WsfDisUtil::GetTimeFromPdu().

◆ HasDevice()

◆ HasExternalDevice()

bool WsfDisInterface::HasExternalDevice ( ) const
inline

Returns true if at least one device is a external device.

◆ HasInputDevice()

bool WsfDisInterface::HasInputDevice ( ) const
inline

Returns true if at least device is configured for receiving DIS PDU's.

Referenced by AdvanceTime(), HasDevice(), and PrepareExtension().

◆ HasOutputDevice()

bool WsfDisInterface::HasOutputDevice ( ) const
inline

Returns true if at least device is configured for sending DIS PDU's.

Referenced by Comment(), HasDevice(), and PutPdu().

◆ IgnoreStopFreezePDU()

bool WsfDisInterface::IgnoreStopFreezePDU ( )
inline

◆ ImmediatePutPdu()

void WsfDisInterface::ImmediatePutPdu ( double aSimTime,
DisPdu & aPdu )

Immediately send a PDU out over the current connections.

Parameters
aSimTimeThe current simulation time.
aPduThe PDU to be sent.
Note
If multi-threaded the PDU is queued by the thread for sending.

References WsfDisInput::mMultiThreaded.

Referenced by RequestTimeAdvance(), WsfMilDisPlatform::SendingEmission(), and SendPeriodicPdusWhilePaused().

◆ Initialize()

bool WsfDisInterface::Initialize ( )
overridevirtual

Called in response to WsfSimulation::Initialize. This is called to allow the extension to perform any initialization that is required.

Note
The extension should not assume that another extension has been initialized unless it this extension has been registered as a dependency of the other extension.

Reimplemented from WsfSimulationExtension.

References WsfDisInput::mComponents.

◆ InitializeInputData()

void WsfDisInterface::InitializeInputData ( )

Called by WsfDisInterface to reinitialize input to default values.

◆ IsDeferredConnection()

bool WsfDisInterface::IsDeferredConnection ( ) const
inline

◆ MessageReceived()

void WsfDisInterface::MessageReceived ( double aSimTime,
wsf::comm::Comm * aXmtrPtr,
wsf::comm::Comm * aRcvrPtr,
const WsfMessage & aMessage,
wsf::comm::Result & aResult )

◆ MessageTransmitted()

void WsfDisInterface::MessageTransmitted ( double aSimTime,
wsf::comm::Comm * aCommPtr,
const WsfMessage & aMessage )

◆ MoverUpdated()

void WsfDisInterface::MoverUpdated ( double aSimTime,
WsfExtEntityDeadReckon::PlatformDR & aDeadReckonData )

◆ PauseIsInProgress()

bool WsfDisInterface::PauseIsInProgress ( ) const
inline

◆ PlatformAdded()

void WsfDisInterface::PlatformAdded ( double aSimTime,
WsfPlatform * aPlatformPtr )

◆ PlatformDeleted()

void WsfDisInterface::PlatformDeleted ( double aSimTime,
WsfPlatform * aPlatformPtr )

References WsfPlatform::GetIndex().

Referenced by WsfDisInterface().

◆ PlatformInitialized()

void WsfDisInterface::PlatformInitialized ( double aSimTime,
WsfPlatform * aPlatformPtr )

◆ PrepareExtension()

bool WsfDisInterface::PrepareExtension ( )
overridevirtual

Called in response to a call to WsfSimulation::Initialize and WsfSimulation::PrepareSimulation.

A simulation extension will typically implement either WsfSimulationExtension::Initialize or WsfSimulationExtension::PrepareExtension, or a combination of both. The main difference is that:

  • WsfSimulationExtension::Initialize is called only when a simulation is initialized after being loaded from input files (the normal mode of operation).
  • WsfSimulation::PrepareExecution is called in the former case AND when a simulation is reloaded from a snapshot.

The primary criteria for deciding which method to use is to look at the extension and see if it uses any external resources such as files or sockets. If the extension uses external resources and wants to support snapshotting then it MUST use this this method so it can (re)establish connections to external resources (A snapshot cannot save the state of an open file or socket and so it must be reopened.)

Reimplemented from WsfSimulationExtension.

References ActivateConnection(), WsfSimulation::AddEvent(), WsfComponentList::RoleIterator< T >::AtEnd(), CommTurnedOn(), WsfSimulation::GetPlatformCount(), WsfSimulation::GetPlatformEntry(), WsfSimulation::GetSimTime(), WsfSimulationExtension::GetSimulation(), HasDevice(), HasInputDevice(), WsfDisInput::mAutostart, WsfDisInput::mComponents, WsfDisInput::mDeviceConfigurations, WsfDisInput::mIgnoredKindAndDomain, WsfDisInput::mIgnoredPduTypes, WsfDisInput::mIgnoredSiteAndApps, WsfDisInput::mIgnoredTypes, WsfDisInput::mInputHeartbeatMultiplier, WsfDisInput::mMultiThreaded, WsfDisInput::mRangeFilteredPlatforms, ok, PlatformAdded(), PlatformInitialized(), SensorTurnedOn(), WsfSimulation::SetIsExternallyStarted(), simTime, and WsfSimulationExtension::WsfSimulation.

◆ PrepareFinalEntityState()

void WsfDisInterface::PrepareFinalEntityState ( double aSimTime,
WsfPlatform * aPlatformPtr,
DisEntityState * aEntityStatePtr )

Prepare an entity state for its final transmission. This performs the following operations: -) Captures the final platform position and orientation -) Sets the velocity and acceleration to zero -) Captures the final damage state -) Marks the entity as frozen and inactive.

References WsfPlatform::GetDamageFactor().

◆ PutPdu()

void WsfDisInterface::PutPdu ( double aSimTime,
std::unique_ptr< DisPdu > aPduPtr )

Send a PDU out over the current connection.

Parameters
aSimTimeThe current simulation time.
aPduPtrThe PDU to be sent.
Note
aPduPtr is deleted after sending.

References HasOutputDevice(), and WsfDisInput::mMultiThreaded.

Referenced by WsfDisUtil::PutPdu().

◆ ReadEntityId()

void WsfDisInterface::ReadEntityId ( UtInput & aInput,
DisEntityId & aEntityId )
static

Read a DIS Entity Id from an input stream.

Parameters
aInputThe input stream
aEntityIdThe value read from the stream.

References WsfExtData::ConvertInputToEntityId(), and WsfDisExt::ToDis().

Referenced by WsfMilDisInterface::ProcessInput().

◆ ReadEntityType()

void WsfDisInterface::ReadEntityType ( UtInput & aInput,
DisEntityType & aEntityType )
static

Read a DIS Entity Type from an input stream.

Parameters
aInputThe input stream
aEntityTypeThe value read from the stream.

References WsfExtData::ConvertInputToEntityType(), and WsfDisExt::ToDis().

Referenced by WsfMilDisInterface::ProcessInput().

◆ ReceivedBadEntityState()

void WsfDisInterface::ReceivedBadEntityState ( )

◆ RequestTimeAdvance()

void WsfDisInterface::RequestTimeAdvance ( double aSimTime,
double aMaxRate,
double aTimeStep )

◆ ResetFiltering()

◆ ResumeEntityStateProcessing()

void WsfDisInterface::ResumeEntityStateProcessing ( double aSimTime,
const DisEntityId & aEntityId )

◆ SendDateAndTime()

void WsfDisInterface::SendDateAndTime ( WsfDisDevice & aDevice,
const DisEntityId & aReceivingId,
const UtCalendar & aDateTime )

Send the start date and time in a SetData PDU.

References WsfDisDevice::PutPdu().

Referenced by ActivateConnection().

◆ SendPeriodicPdusWhilePaused()

void WsfDisInterface::SendPeriodicPdusWhilePaused ( std::vector< unsigned int > & aEntityIndices)

◆ SensorDetectionChanged()

void WsfDisInterface::SensorDetectionChanged ( double aSimTime,
WsfSensor * aSensorPtr,
size_t aTargetPlatformIndex,
WsfSensorResult & aResult )

◆ SensorFrequencyChanged()

void WsfDisInterface::SensorFrequencyChanged ( double aSimTime,
WsfSensor * aSensorPtr,
WsfSensorMode * aModePtr )

◆ SensorModeActivated()

void WsfDisInterface::SensorModeActivated ( double aSimTime,
WsfSensor * aSensorPtr,
WsfSensorMode * aModePtr )

◆ SensorModeDeactivated()

void WsfDisInterface::SensorModeDeactivated ( double aSimTime,
WsfSensor * aSensorPtr,
WsfSensorMode * aModePtr )

◆ SensorRequestCanceled()

void WsfDisInterface::SensorRequestCanceled ( double aSimTime,
WsfSensor * aSensorPtr,
const WsfTrack * aTrackPtr )

◆ SensorRequestInitiated()

void WsfDisInterface::SensorRequestInitiated ( double aSimTime,
WsfSensor * aSensorPtr,
WsfSensorMode * aModePtr,
const WsfTrack * aTrackPtr )

◆ SensorRequestUpdated()

void WsfDisInterface::SensorRequestUpdated ( double aSimTime,
WsfSensor * aSensorPtr,
WsfSensorMode * aModePtr,
const WsfTrack * aTrackPtr )

◆ SensorScanUpdated()

void WsfDisInterface::SensorScanUpdated ( double aSimTime,
WsfSensor * aSensorPtr )

◆ SensorTrackDropped()

void WsfDisInterface::SensorTrackDropped ( double aSimTime,
WsfSensor * aSensorPtr,
const WsfTrack * aTrackPtr )

◆ SensorTrackInitiated()

void WsfDisInterface::SensorTrackInitiated ( double aSimTime,
WsfSensor * aSensorPtr,
const WsfTrack * aTrackPtr )

◆ SensorTurnedOff()

void WsfDisInterface::SensorTurnedOff ( double aSimTime,
WsfSensor * aSensorPtr )

◆ SensorTurnedOn()

◆ SetBeamTypeAndFunction()

void WsfDisInterface::SetBeamTypeAndFunction ( WsfPlatformPart * aPartPtr,
WsfStringId aModeNameId,
int aBeamNumber,
DisBeam * aBeamPtr,
DisEnum8 aDefaultFunction )

Set the beam type (AKA 'beam parameter index') and beam function in a DIS Beam record.

Parameters
aPartPtrPointer to the part (comm, sensor, etc) that contains the beam.
aModeNameIdThe name (ID) of the mode in which the beam is a part.
aBeamNumberThe 1-based mode number of the beam within the mode.
aBeamPtrPointer to the DIS Beam to be updated.
aDefaultFunctionThe default beam function to be used if one was not defined by the inputs.

References WsfExtEmission::GetBeamFunction(), WsfExtEmission::GetBeamType(), WsfExtData::GetEmission(), GetExtInterface(), and WsfObject::GetTypeId().

Referenced by WsfMilDisPlatform::UpdateJammerSystem().

◆ SetCreateDisPlatformFunction()

void WsfDisInterface::SetCreateDisPlatformFunction ( CreatePlatformFn aModifyFn)
inline

◆ SetDelayEntityStateFunction()

void WsfDisInterface::SetDelayEntityStateFunction ( DelayEntityStateFn aDelayFn)
inline

◆ SetEmitterTypeAndFunction()

void WsfDisInterface::SetEmitterTypeAndFunction ( WsfPlatformPart * aPartPtr,
DisSystem * aSystemPtr )

Set the emitter type (AKA 'emitter name') and function in the specified DIS System record.

Parameters
aPartPtrPointer to the associated WSF part (comm, sensor, etc) that represents the system.
aSystemPtrPointer to the DIS System to be updated.

References WsfExtEmission::GetEmitterFunction(), WsfExtEmission::GetEmitterType(), GetExtEmission(), WsfObject::GetTypeId(), and WsfDisEmission::OverrideTypeAndFunction.

◆ SetHeartbeatMultiplier()

void WsfDisInterface::SetHeartbeatMultiplier ( double aValue)
inline

◆ SetPduFactory()

void WsfDisInterface::SetPduFactory ( DisPduFactory * aFactory)

Change the PDU factory used to create incoming PDUs.

WsfDisInterface will delete the factory when it is no longer needed.

◆ SetPutCounter()

void WsfDisInterface::SetPutCounter ( int aCount)
inline

Sets the number of sent DIS PDUs.

◆ SetSuppressDisOutput()

void WsfDisInterface::SetSuppressDisOutput ( bool aFlag)
inline

◆ ShouldJoinExercise()

bool WsfDisInterface::ShouldJoinExercise ( ) const
inline

◆ SimTimeToDisClockTime()

void WsfDisInterface::SimTimeToDisClockTime ( double aSimTime,
DisClockTime & aClockTime )
static

◆ SimulationComplete()

void WsfDisInterface::SimulationComplete ( double aSimTime)

◆ SimulationDestroyed()

void WsfDisInterface::SimulationDestroyed ( WsfSimulation * aSimulationPtr)

◆ SimulationPausing()

◆ SimulationResuming()

void WsfDisInterface::SimulationResuming ( )

Referenced by WsfDisInterface().

◆ SimulationStarting()

void WsfDisInterface::SimulationStarting ( )

References WsfDisInput::mMultiThreaded.

Referenced by WsfDisInterface().

◆ SuppressAllNonStandardPDUs()

bool WsfDisInterface::SuppressAllNonStandardPDUs ( )
inline

◆ UpdateAppearanceFromPlatform()

bool WsfDisInterface::UpdateAppearanceFromPlatform ( double aSimTime,
WsfPlatform * aPlatformPtr,
DisEntityState * aEntityStatePtr )

Update the DIS appearance word from the platform state.

References WsfPlatform::GetConcealmentFactor(), and WsfPlatform::GetDamageFactor().

◆ UpdateBeamFromXmtr()

◆ UpdateLastSimTime()

void WsfDisInterface::UpdateLastSimTime ( double aSimTime)
inline

◆ UpdatePlatformFromAppearance()

void WsfDisInterface::UpdatePlatformFromAppearance ( double aSimTime,
WsfPlatform * aPlatformPtr,
DisEntityState * aEntityStatePtr )

◆ UpdatePlatformFromEntityState()

void WsfDisInterface::UpdatePlatformFromEntityState ( double aSimTime,
WsfDisPlatform * aDisPlatformPtr,
DisEntityState * aEntityStatePtr )

◆ UpdatePlatformSystem()

◆ UpdateSystemFromSensor()

◆ UpdateXmtrFromBeam()

◆ UseSimpleOrientationRate()

bool WsfDisInterface::UseSimpleOrientationRate ( )
inline

◆ UseWorldToBodyAngularVelocities()

bool WsfDisInterface::UseWorldToBodyAngularVelocities ( )
inline

◆ WriteEntityTypes()

void WsfDisInterface::WriteEntityTypes ( std::ostream & aStream)

◆ ZeroWorldToBodyAngularVelocities()

bool WsfDisInterface::ZeroWorldToBodyAngularVelocities ( )
inline

◆ WsfDisEntityState

friend class WsfDisEntityState
friend

References WsfDisEntityState.

Referenced by WsfDisEntityState.

◆ WsfDisPlatform

Member Data Documentation

◆ cMAX_PLAYBACK_SITE

DisUint16 WsfDisInterface::cMAX_PLAYBACK_SITE
static

◆ cMIN_PLAYBACK_SITE

DisUint16 WsfDisInterface::cMIN_PLAYBACK_SITE
static

◆ cSHADOW_SITE

DisUint16 WsfDisInterface::cSHADOW_SITE = 0x7FFF
static

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