WSF
WsfL16::SurveillancePart Class Reference

SurveillancePart is responsible for sending tracks. More...

#include <SurveillancePart.hpp>

Inheritance diagram for WsfL16::SurveillancePart:
Collaboration diagram for WsfL16::SurveillancePart:

Classes

struct  TrackInfo

Public Member Functions

 SurveillancePart (WsfScenario &aScenario)
 SurveillancePart (const SurveillancePart &aSrc)
 ~SurveillancePart () override=default
ComputerPartClone () const override
bool Initialize (double aSimTime, ComputerProcessor &aComputer) override
bool ProcessInput (UtInput &aInput) override
void HandleReceive (double aSimTime, const Messages::InitialBase &aMessage) override
 Handle an incoming message.
void HandleSend (double aSimTime) override
 This method is called when the a slot is open.
bool SuppressSensor (WsfStringId aSensorName, bool aSuppress)
int GetTrackNumber (WsfLocalTrack &aLocalTrack)
void SendAirTrack (double aSimTime, const WsfTrack &aTrack, int aTrackNumber)
WsfSimulationGetSimulation () const
Public Member Functions inherited from WsfL16::ComputerPart
 ComputerPart (WsfScenario &aScenario, const std::string &aClassName="WsfProcessor")
 ComputerPart (const ComputerPart &aSrc)
 ~ComputerPart () override
void SendJMessage (double aSimTime, Messages::InitialBase *aMessage)
virtual bool IsNetworkEnabled ()
void SetDebug (bool aDebugOn)
bool Debug ()
void SetPlatform (WsfPlatform *aPlatformPtr)
WsfCommandChainGetCommandChain () const
ComputerProcessorGetComputer ()
WsfPlatformGetPlatform ()
WsfSimulationGetSimulation ()
const SlotParametersGetSlotParameters () const
int DebugMore ()
void SetSendInterval (double aValue)
Public Member Functions inherited from WsfObject
 WsfObject ()
 This is the constructor for the WsfObject class.
 ~WsfObject () override
 This is the destructor for the WsfObject class.
const char * GetScriptClassName () const override
const std::string & GetType () const
WsfStringId GetTypeId () const
 Get the string ID of the 'type' of the object.
void SetType (WsfStringId aType)
const std::string & GetBaseType () const
WsfStringId GetBaseTypeId () const
const TypeListGetTypeList () const
bool IsA_TypeOf (WsfStringId aType) const
WsfObjectoperator= (const WsfObject &aRhs)
 Assignment operator.
template<typename T>
void Serialize (T &aBuff)
 For XIO (de)serialization.
const std::string & GetName () const
WsfStringId GetNameId () const
void SetName (WsfStringId aName)

Protected Types

enum  TrackEnvironment { cAIR , cSURFACE , cSUBSURFACE , cLAND }
using TrackMap = std::map<WsfTrackId, TrackInfo>
using TrackList = std::list<TrackMap::iterator>
Protected Types inherited from WsfL16::ComputerPart
typedef std::map< int, ScriptDataScriptMap

Protected Member Functions

bool HaveReportingResponsibility (double aSimTime, const WsfTrack *aTrackPtr, const WsfLocalTrack *aLocalTrackPtr, int aLink16_TrackQuality, std::string &aTrackNumberString, bool &aIsR2_Switch)
bool OwningPlatformWantsTrackRefNumber (const WsfTrack &aTrack)
void TrackUpdated (const WsfTrack &aTrack)
void TrackCreated (const WsfTrack &aTrack)
void TrackDropped (const WsfTrack &aTrack)
void RawTrackReceived (const WsfTrack &aTrack)
void RawTrackDropped (const WsfTrack &aTrack)
void SendLandTrack (double aSimTime, const WsfTrack &aTrack, int aTrackNumber)
void SendSubsurfaceTrack (double aSimTime, const WsfTrack &aTrack, int aTrackNumber)
void SendSurfaceTrack (double aSimTime, const WsfTrack &aTrack, int aTrackNumber)
void SendSpaceTrack (double aSimTime, const WsfTrack &aTrack, int aTrackNumber)
bool IsTrackReportable (const WsfTrack &aTrack)
bool IsSensorTrackSuppressed (const WsfTrack &aTrack)
TrackMap::iterator FindTrackToSend ()
bool TrackAvailableToSend (double aSimTime)
Protected Member Functions inherited from WsfL16::ComputerPart
double ProcessSendInterval (UtInput &aInput) const
double GetSendInterval ()
 WsfObject (const WsfObject &aSrc)
 Copy constructor (for Clone()).

Protected Attributes

TrackMap mTracks
TrackList mUnchangedTracks
TrackList mUpdatedTracks
double mMaxSendInterval {6.0}
bool mSendNonSensorReports {true}
bool mSuppressDeadTargets {true}
bool mIgnoreReportingResponsibility {false}
WsfTrackManagermTrackManager {nullptr}
std::pair< int, int > mTrackNumberRange {0, 0}
int mNextTrackNumber
int mDefaultTrackDomain {WSF_SPATIAL_DOMAIN_AIR}
std::set< int > mSuppressDomains
std::set< WsfStringIdmSuppressSensors
InputEnumeration mSpatialDomainInput
UtScriptDatamTrackVariablePtr
InterfacemInterfacePtr {nullptr}
Protected Attributes inherited from WsfL16::ComputerPart
IntervalUpdater mSendInterval
int mDebugMore
UtCallbackHolder mCallbacks
SlotParameters mSlotParameters
WsfScriptContextmContextPtr
ScriptMap mSendScripts

Additional Inherited Members

Public Types inherited from WsfObject
typedef std::vector< WsfStringIdTypeList
 The list of types returned by GetTypeList.

Detailed Description

SurveillancePart is responsible for sending tracks.

Member Typedef Documentation

◆ TrackList

using WsfL16::SurveillancePart::TrackList = std::list<TrackMap::iterator>
protected

◆ TrackMap

Member Enumeration Documentation

◆ TrackEnvironment

Enumerator
cAIR 
cSURFACE 
cSUBSURFACE 
cLAND 

Constructor & Destructor Documentation

◆ SurveillancePart() [1/2]

◆ SurveillancePart() [2/2]

◆ ~SurveillancePart()

Member Function Documentation

◆ Clone()

ComputerPart * WsfL16::SurveillancePart::Clone ( ) const
overridevirtual

Return a copy of this object. Must be implemented by all derived types. If cloning is impossible, a WsfUncloneableException should be thrown.

Implements WsfL16::ComputerPart.

References WsfL16::ComputerPart::ComputerPart(), and SurveillancePart().

Referenced by ~SurveillancePart().

◆ FindTrackToSend()

SurveillancePart::TrackMap::iterator WsfL16::SurveillancePart::FindTrackToSend ( )
protected

◆ GetSimulation()

WsfSimulation * WsfL16::SurveillancePart::GetSimulation ( ) const

◆ GetTrackNumber()

int WsfL16::SurveillancePart::GetTrackNumber ( WsfLocalTrack & aLocalTrack)

WSF track IDs are mapped to WsfL16 track IDs in the range that has been assigned.

References WsfL16::ComputerPart::GetComputer(), GetTrackNumber(), mNextTrackNumber, and mTrackNumberRange.

Referenced by GetTrackNumber(), HandleSend(), and ~SurveillancePart().

◆ HandleReceive()

void WsfL16::SurveillancePart::HandleReceive ( double aSimTime,
const Messages::InitialBase & aMessage )
overridevirtual

Handle an incoming message.

Implements WsfL16::ComputerPart.

References HandleReceive().

Referenced by HandleReceive(), and ~SurveillancePart().

◆ HandleSend()

◆ HaveReportingResponsibility()

bool WsfL16::SurveillancePart::HaveReportingResponsibility ( double aSimTime,
const WsfTrack * aTrackPtr,
const WsfLocalTrack * aLocalTrackPtr,
int aLink16_TrackQuality,
std::string & aTrackNumberString,
bool & aIsR2_Switch )
protected

Handle reporting responsibility (R2) rules for this track.

Parameters
aSimTime[input] The current simulation time.
aTrackPtr[input] The pointer of the track for which we will test R2. This may or may not be the same as aLocalTrackPtr.
aLocalTrackPtr[input] The correlated track pointer for the tested R2 track. This may or may not be the same track as aTrackPtr.
aLink16_TrackQuality[input] The calculated track quality of aTrackPtr.
aTrackNumberString[output] The link-16 track number of aTrackPtr.
aIsR2_Switch[output] true if the reporting responsibility has been changed (new acquired or relinquished.) false if no change in reporting responsibility
Returns
True if this platform has reporting responsibility; false otherwise.

References WsfTrack::cPROCESSED, WsfAuxDataEnabled::GetAuxData(), WsfAuxDataEnabled::GetAuxDataConst(), WsfL16::ComputerPart::GetComputer(), WsfL16::ComputerPart::GetPlatform(), WsfLocalTrack::GetRawTrackIds(), WsfMeasurement::GetSpatialDomain(), WsfTrack::GetTrackType(), WsfTrack::GetUpdateTime(), HaveReportingResponsibility(), WSF_SPATIAL_DOMAIN_LAND, and WSF_SPATIAL_DOMAIN_SPACE.

Referenced by HandleSend(), HaveReportingResponsibility(), and ~SurveillancePart().

◆ Initialize()

◆ IsSensorTrackSuppressed()

bool WsfL16::SurveillancePart::IsSensorTrackSuppressed ( const WsfTrack & aTrack)
protected

◆ IsTrackReportable()

bool WsfL16::SurveillancePart::IsTrackReportable ( const WsfTrack & aTrack)
protected

◆ OwningPlatformWantsTrackRefNumber()

bool WsfL16::SurveillancePart::OwningPlatformWantsTrackRefNumber ( const WsfTrack & aTrack)
protected

◆ ProcessInput()

bool WsfL16::SurveillancePart::ProcessInput ( UtInput & aInput)
overridevirtual

Process input from a generic source.

Examine the current input command. If it is NOT one of the commands recognized by this class then it simply returns 'false'. If it is one of the commands recognized by this class then it processes the command and returns 'true'.

Parameters
aInputa reference to a UtInput object.
Returns
'true' if the command was one recognized by the class or 'false' if not.
Exceptions
UtInput::ExceptionBase(or an object derived from it) if the command was recognized but contains some sort of error.
Note
If a derived class does not recognize the command (i.e.: the return value is false) then it should call the base class ProcessInput method. This chain should continue until either the command is recognized or the top-level base class is encountered.

Reimplemented from WsfL16::ComputerPart.

References mDefaultTrackDomain, mIgnoreReportingResponsibility, mMaxSendInterval, mSendNonSensorReports, mSpatialDomainInput, mSuppressDeadTargets, mSuppressDomains, mSuppressSensors, mTrackNumberRange, ok, WsfL16::ComputerPart::ProcessInput(), and ProcessInput().

Referenced by ProcessInput(), and ~SurveillancePart().

◆ RawTrackDropped()

void WsfL16::SurveillancePart::RawTrackDropped ( const WsfTrack & aTrack)
protected

References RawTrackDropped(), and TrackDropped().

Referenced by RawTrackDropped().

◆ RawTrackReceived()

void WsfL16::SurveillancePart::RawTrackReceived ( const WsfTrack & aTrack)
protected

◆ SendAirTrack()

void WsfL16::SurveillancePart::SendAirTrack ( double aSimTime,
const WsfTrack & aTrack,
int aTrackNumber )

◆ SendLandTrack()

void WsfL16::SurveillancePart::SendLandTrack ( double aSimTime,
const WsfTrack & aTrack,
int aTrackNumber )
protected

◆ SendSpaceTrack()

◆ SendSubsurfaceTrack()

void WsfL16::SurveillancePart::SendSubsurfaceTrack ( double aSimTime,
const WsfTrack & aTrack,
int aTrackNumber )
protected

◆ SendSurfaceTrack()

void WsfL16::SurveillancePart::SendSurfaceTrack ( double aSimTime,
const WsfTrack & aTrack,
int aTrackNumber )
protected

◆ SuppressSensor()

bool WsfL16::SurveillancePart::SuppressSensor ( WsfStringId aSensorName,
bool aSuppress )

Suppresses or allows reporting of sensor tracks from the given sensor name. Returns whether the sensor was previously being suppressed.

References mSuppressSensors.

Referenced by ~SurveillancePart().

◆ TrackAvailableToSend()

bool WsfL16::SurveillancePart::TrackAvailableToSend ( double aSimTime)
protected

Determine whether there is a track available to send. Either there is an updated track or an unchanged track that hasn't been sent since the last send interval.

References mMaxSendInterval, mUnchangedTracks, mUpdatedTracks, and TrackAvailableToSend().

Referenced by HandleSend(), and TrackAvailableToSend().

◆ TrackCreated()

◆ TrackDropped()

void WsfL16::SurveillancePart::TrackDropped ( const WsfTrack & aTrack)
protected

◆ TrackUpdated()

void WsfL16::SurveillancePart::TrackUpdated ( const WsfTrack & aTrack)
protected

Member Data Documentation

◆ mDefaultTrackDomain

int WsfL16::SurveillancePart::mDefaultTrackDomain {WSF_SPATIAL_DOMAIN_AIR}
protected

◆ mIgnoreReportingResponsibility

bool WsfL16::SurveillancePart::mIgnoreReportingResponsibility {false}
protected

◆ mInterfacePtr

Interface* WsfL16::SurveillancePart::mInterfacePtr {nullptr}
protected

◆ mMaxSendInterval

double WsfL16::SurveillancePart::mMaxSendInterval {6.0}
protected

◆ mNextTrackNumber

int WsfL16::SurveillancePart::mNextTrackNumber
protected

Referenced by GetTrackNumber(), and Initialize().

◆ mSendNonSensorReports

bool WsfL16::SurveillancePart::mSendNonSensorReports {true}
protected

◆ mSpatialDomainInput

InputEnumeration WsfL16::SurveillancePart::mSpatialDomainInput
protected

◆ mSuppressDeadTargets

bool WsfL16::SurveillancePart::mSuppressDeadTargets {true}
protected

◆ mSuppressDomains

std::set<int> WsfL16::SurveillancePart::mSuppressDomains
protected

◆ mSuppressSensors

std::set<WsfStringId> WsfL16::SurveillancePart::mSuppressSensors
protected

◆ mTrackManager

WsfTrackManager* WsfL16::SurveillancePart::mTrackManager {nullptr}
protected

Referenced by Initialize().

◆ mTrackNumberRange

std::pair<int, int> WsfL16::SurveillancePart::mTrackNumberRange {0, 0}
protected

◆ mTracks

TrackMap WsfL16::SurveillancePart::mTracks
protected

◆ mTrackVariablePtr

UtScriptData* WsfL16::SurveillancePart::mTrackVariablePtr
protected

◆ mUnchangedTracks

TrackList WsfL16::SurveillancePart::mUnchangedTracks
protected

◆ mUpdatedTracks

TrackList WsfL16::SurveillancePart::mUpdatedTracks
protected

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