WSF
WsfDisPlaybackDevice Class Reference

#include <WsfDisPlaybackDevice.hpp>

Inheritance diagram for WsfDisPlaybackDevice:
Collaboration diagram for WsfDisPlaybackDevice:

Public Member Functions

 WsfDisPlaybackDevice (const std::string &aFileName, WsfDisInterface *aInterfacePtr)
 ~WsfDisPlaybackDevice () override
DisPdu * GetPdu (DisPduFactory *aPduFactoryPtr) override
void PutPduP (double aSimTime, DisPdu &aPdu) override
Public Member Functions inherited from WsfDisDevice
 WsfDisDevice (WsfDisInterface *aInterfacePtr)
virtual ~WsfDisDevice ()
void PutPdu (double aSimTime, DisPdu &aPdu)
DeviceType GetDeviceType () const
virtual GenUDP_IO * GenUDP_IOPtr ()
void AddFilterAllowance (WsfDisFilterAllowance *anAllowance)

Static Public Member Functions

static void EntityDeleted (const DisEntityId &aEntityId)
static bool IsPlaybackEntity (const DisEntityId &aEntityId)
 the supplied entity ID associated with a playback entity.
static void PreparePlaybackPlatform (double aSimTime, WsfPlatform *aPlatformPtr, DisEntityState *aEntityPtr)
static void Reset ()
 Reset static data back to its initial state.

Static Public Attributes

static DisUint16 cMIN_PLAYBACK_SITE = 65000U
static DisUint16 cMAX_PLAYBACK_SITE = 65015U

Additional Inherited Members

Public Types inherited from WsfDisDevice
enum  DeviceType {
  cDEVICE_NONE , cDEVICE_RECORD , cDEVICE_PLAYBACK , cDEVICE_MULTICAST ,
  cDEVICE_BROADCAST , cDEVICE_UNICAST , cDEVICE_CEE
}
Protected Member Functions inherited from WsfDisDevice
bool AllowedThroughFilter (DisPdu &aPdu)
Protected Attributes inherited from WsfDisDevice
DeviceType mDeviceType
std::vector< WsfDisFilterAllowance * > mFilterAllowances
WsfDisInterfacemInterfacePtr

Detailed Description

Provide the ability to use a recorded DIS stream (playback files) as an input stream.

Entities that are created from this device are a sort of hybrid entity. In many regards they are treated as local entities, that is they have Entity State PDU's written to output streams. But their motion comes from Entity State PDU's read from the file (so they are like 'external' entities in this regard).

This was initially created so we could read DIS recording files produced by SLAMEM. It has a good traffic model and it was easier to simply read the generated data rather than trying to replicate what they do.

Note
: At the current time only Entity State PDU's are used from the file. All other PDU's are ignored.

Constructor & Destructor Documentation

◆ WsfDisPlaybackDevice()

WsfDisPlaybackDevice::WsfDisPlaybackDevice ( const std::string & aFileName,
WsfDisInterface * aInterfacePtr )

◆ ~WsfDisPlaybackDevice()

WsfDisPlaybackDevice::~WsfDisPlaybackDevice ( )
override

Member Function Documentation

◆ EntityDeleted()

void WsfDisPlaybackDevice::EntityDeleted ( const DisEntityId & aEntityId)
static

Update the list of deleted entities. This is called by WsfDisInterface::DeletePlatform() whenever a platform is deleted.

References IsPlaybackEntity().

◆ GetPdu()

DisPdu * WsfDisPlaybackDevice::GetPdu ( DisPduFactory * aPduFactoryPtr)
overridevirtual

Reimplemented from WsfDisDevice.

◆ IsPlaybackEntity()

bool WsfDisPlaybackDevice::IsPlaybackEntity ( const DisEntityId & aEntityId)
inlinestatic

◆ PreparePlaybackPlatform()

void WsfDisPlaybackDevice::PreparePlaybackPlatform ( double aSimTime,
WsfPlatform * aPlatformPtr,
DisEntityState * aEntityPtr )
static

Prepare a playback platform for use.

This is called by WsfDisInterface::AddExternalPlatform after the platform has been instantiated but before it is added to the simulation.

Parameters
aSimTimeThe current simulation time.
aPlatformPtrThe platform about to be added to the simulation.
aEntityPtrThe entity state that is associated with the platform.

References WsfComponentList::RoleIterator< T >::AtEnd().

◆ PutPduP()

void WsfDisPlaybackDevice::PutPduP ( double aSimTime,
DisPdu & aPdu )
inlineoverridevirtual

Implements WsfDisDevice.

◆ Reset()

void WsfDisPlaybackDevice::Reset ( )
static

Reset static data back to its initial state.

References cMIN_PLAYBACK_SITE.

Referenced by WsfDisInterface::ActivateConnection(), and WsfDisInterface::SimulationComplete().

Member Data Documentation

◆ cMAX_PLAYBACK_SITE

DisUint16 WsfDisPlaybackDevice::cMAX_PLAYBACK_SITE = 65015U
static

◆ cMIN_PLAYBACK_SITE

DisUint16 WsfDisPlaybackDevice::cMIN_PLAYBACK_SITE = 65000U
static

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