WSF
WsfL16::Interface Class Reference

#include <Interface.hpp>

Inheritance diagram for WsfL16::Interface:
Collaboration diagram for WsfL16::Interface:

Public Member Functions

 Interface (InterfaceSetup &aScenario)
void AddedToSimulation () override
 ~Interface () override
bool Initialize () override
bool IncludeJ3xTrackDisEntityId ()
 Returns a boolean used to determine whether or not to include track DIS entity id inside J3.X messages.
void SendJMessage (double aSimTime, WsfPlatform &aSender, const Messages::InitialBase *aMessage)
void SendJMessage (double aSimTime, WsfPlatform &aSender, const Messages::InitialBase *aMessage, const SlotParameters &aSlotParameters)
void SendRawJMessage (double aSimTime, WsfPlatform *aSender, const char *aDataPtr, int aMessageBytes, int aNPG)
void SendUserDefinedJMessage (double aSimTime, WsfPlatform *aSender, unsigned short *aMessage, int aNPG, int aMessageBytes, int aLabel, int aSubLabel, int aNumMsgs)
void SendUserDefinedJMessage (double aSimTime, WsfPlatform *aSender, unsigned short *aMessage, const SlotParameters &aSlotParameters, int aMessageBytes, int aLabel, int aSubLabel, int aNumMsgs)
void FilterMessageSend (WsfPlatform &aSenderPlatform, int aLabel, int aSubLabel=-1)
void UnfilterMessageSend (WsfPlatform &aSenderPlatform, int aLabel, int aSubLabel=-1)
void FilterMessageSend (WsfPlatform *aSenderPlatform, int aLabel, int aSubLabel=-1)
void UnfilterMessageSend (WsfPlatform *aSenderPlatform, int aLabel, int aSubLabel=-1)
unsigned GetAirSpecificType (WsfStringId aPlatformTypeId)
unsigned GetLandSpecificType (WsfStringId aPlatformTypeId)
WsfStringId GetAirPlatformType (unsigned aAirSpecificTypeId)
WsfStringId GetLandPlatformType (unsigned aLandSpecificTypeId)
WsfDisInterfaceGetDisInterface () const
Public Member Functions inherited from WsfSimulationExtension
 WsfSimulationExtension ()
 ~WsfSimulationExtension () override=default
WsfSimulationGetSimulation () const
const WsfScenarioGetScenario () const
virtual bool PrepareExtension ()
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 WsfL16::InterfaceSetup
 InterfaceSetup (WsfScenario &aScenario)
bool ProcessInput (UtInput &aInput)
void PrintScriptUsage ()
 Scripting language.
void PrintScriptUsageRst ()
bool SetNPGTable (int aMsgType, int aNPG)
bool IsRequested () const

Static Public Member Functions

static int GetJ3xIdentityFromIFF (WsfTrack::IFF_Status aIFF_Status)
static void SetIFF_FromJ3xIdentity (WsfTrack &aTrack, int aJ3xIdentity)
static void __private_SetSim (WsfSimulationExtension &aExtension, WsfSimulation *aSimPtr)

Public Attributes

UtCallbackListN< void(double, const WsfL16::Messages::InitialBase &)> JMessageReceived
UtCallbackListN< void(const WsfL16::Messages::InitialBase &)> JMessageSent
Public Attributes inherited from WsfL16::InterfaceSetup
TdlHeaderType mHeaderType
TdlSwapType mSwapMethod
int mTSALevel
int mTimeSlotType
Messages::HeaderTDL100 mHeaderTDL100
Messages::WSF_HeaderTDL100 mWSF_HeaderTDL100
int mSlotOffset
Messages::HeaderTDL100 mTdlHeader
bool mIsRequested
bool mDebugEnabled
bool mSendPPLI
bool mFillWith31_7
bool mIgnoreInboundMessages
double mSecondsTillSimStartSinceJan1_1900
double mSecondsSinceMidnight
bool mIncludeJ3xTrackDEI
std::map< unsigned, WsfStringIdmAirPlatformTypes
std::map< WsfStringId, unsigned > mAirSpecificTypes
std::map< unsigned, WsfStringIdmLandPlatformTypes
std::map< WsfStringId, unsigned > mLandSpecificTypes
Interface_J11_Setup mInterface_J11_Setup
std::map< size_t, MessageFiltermPlatformFilters
MessageFilter mGlobalFilters
std::set< std::pair< int, int > > mNPGTable
WsfScenariomWsfSetupPtr

Provision to allow an external method to provide the track numbers for a weapon and controller.

This decouples the Link-16 interface from the services that are launching and controlling weapons.

using GetWeaponTrackNumbersFn
void SetWeaponTrackNumbersFunction (GetWeaponTrackNumbersFn aFunctionPtr)
void GetWeaponTrackNumbers (size_t aWeaponIndex, unsigned int &aWeaponTrackNumber, unsigned int &aControllerTrackNumber)
static WSF_L16_EXPORT WsfPlatformGetControllerFromTrackNumber (WsfSimulation *aSimulationPtr, unsigned int aTrackNumber)
static WSF_L16_EXPORT void SetPlatformTrackNumber (WsfPlatform *aPlatformPtr, unsigned int aTrackNumber)

Additional Inherited Members

Public Types inherited from WsfL16::InterfaceSetup
enum  TdlHeaderType { cTDL_6 , cTDL_100 }
enum  TdlSwapType { cWSF , cTRAP_TOOL }
Protected Member Functions inherited from WsfExtension
void InitializeExtensionName (const std::string &aName)

Detailed Description

WsfL16::Interface is primarily an interface to DIS using the DisSignal PDU.

Member Typedef Documentation

◆ GetWeaponTrackNumbersFn

Initial value:
void (*)(WsfSimulation& aSimulation,
size_t aWeaponIndex,
unsigned int& aWeaponTrackNumber,
unsigned int& aControllerTrackNumber)
friend class WsfSimulation
Definition WsfSimulationExtension.hpp:43

Constructor & Destructor Documentation

◆ Interface()

◆ ~Interface()

WsfL16::Interface::~Interface ( )
override

Member Function Documentation

◆ AddedToSimulation()

void WsfL16::Interface::AddedToSimulation ( )
overridevirtual

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

Reimplemented from WsfSimulationExtension.

References WsfSimulation::GetExtension(), and WsfSimulationExtension::GetSimulation().

◆ FilterMessageSend() [1/2]

◆ FilterMessageSend() [2/2]

◆ GetAirPlatformType()

WsfStringId WsfL16::Interface::GetAirPlatformType ( unsigned aAirSpecificTypeId)

◆ GetAirSpecificType()

unsigned WsfL16::Interface::GetAirSpecificType ( WsfStringId aPlatformTypeId)

◆ GetControllerFromTrackNumber()

◆ GetDisInterface()

WsfDisInterface * WsfL16::Interface::GetDisInterface ( ) const
inline

◆ GetJ3xIdentityFromIFF()

int WsfL16::Interface::GetJ3xIdentityFromIFF ( WsfTrack::IFF_Status aIFF_Status)
static

◆ GetLandPlatformType()

WsfStringId WsfL16::Interface::GetLandPlatformType ( unsigned aLandSpecificTypeId)

◆ GetLandSpecificType()

unsigned WsfL16::Interface::GetLandSpecificType ( WsfStringId aPlatformTypeId)

◆ GetWeaponTrackNumbers()

void WsfL16::Interface::GetWeaponTrackNumbers ( size_t aWeaponIndex,
unsigned int & aWeaponTrackNumber,
unsigned int & aControllerTrackNumber )

Attempt to get the track numbers for a weapon and its controller from an external provider of track numbers. This decouples the Link-16 interface from those interfaces that are launching and controlling weapons.

References WsfSimulationExtension::GetSimulation().

◆ IncludeJ3xTrackDisEntityId()

bool WsfL16::Interface::IncludeJ3xTrackDisEntityId ( )
inline

Returns a boolean used to determine whether or not to include track DIS entity id inside J3.X messages.

References WsfL16::InterfaceSetup::mIncludeJ3xTrackDEI.

◆ Initialize()

◆ SendJMessage() [1/2]

◆ SendJMessage() [2/2]

◆ SendRawJMessage()

◆ SendUserDefinedJMessage() [1/2]

void WsfL16::Interface::SendUserDefinedJMessage ( double aSimTime,
WsfPlatform * aSender,
unsigned short * aMessage,
const SlotParameters & aSlotParameters,
int aMessageBytes,
int aLabel,
int aSubLabel,
int aNumMsgs )

◆ SendUserDefinedJMessage() [2/2]

void WsfL16::Interface::SendUserDefinedJMessage ( double aSimTime,
WsfPlatform * aSender,
unsigned short * aMessage,
int aNPG,
int aMessageBytes,
int aLabel,
int aSubLabel,
int aNumMsgs )

◆ SetIFF_FromJ3xIdentity()

void WsfL16::Interface::SetIFF_FromJ3xIdentity ( WsfTrack & aTrack,
int aJ3xIdentity )
static

◆ SetPlatformTrackNumber()

void WsfL16::Interface::SetPlatformTrackNumber ( WsfPlatform * aPlatformPtr,
unsigned int aTrackNumber )
static

◆ SetWeaponTrackNumbersFunction()

void WsfL16::Interface::SetWeaponTrackNumbersFunction ( GetWeaponTrackNumbersFn aFunctionPtr)
inline

◆ UnfilterMessageSend() [1/2]

◆ UnfilterMessageSend() [2/2]

Member Data Documentation

◆ JMessageReceived

UtCallbackListN<void(double, const WsfL16::Messages::InitialBase&)> WsfL16::Interface::JMessageReceived

◆ JMessageSent

UtCallbackListN<void(const WsfL16::Messages::InitialBase&)> WsfL16::Interface::JMessageSent

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