|
WSF
|
SurveillancePart is responsible for sending tracks. More...
#include <SurveillancePart.hpp>


Classes | |
| struct | TrackInfo |
Public Member Functions | |
| SurveillancePart (WsfScenario &aScenario) | |
| SurveillancePart (const SurveillancePart &aSrc) | |
| ~SurveillancePart () override=default | |
| ComputerPart * | Clone () 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) |
| WsfSimulation * | GetSimulation () 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) |
| WsfCommandChain * | GetCommandChain () const |
| ComputerProcessor * | GetComputer () |
| WsfPlatform * | GetPlatform () |
| WsfSimulation * | GetSimulation () |
| const SlotParameters & | GetSlotParameters () 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 TypeList & | GetTypeList () const |
| bool | IsA_TypeOf (WsfStringId aType) const |
| WsfObject & | operator= (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, ScriptData > | ScriptMap |
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} |
| WsfTrackManager * | mTrackManager {nullptr} |
| std::pair< int, int > | mTrackNumberRange {0, 0} |
| int | mNextTrackNumber |
| int | mDefaultTrackDomain {WSF_SPATIAL_DOMAIN_AIR} |
| std::set< int > | mSuppressDomains |
| std::set< WsfStringId > | mSuppressSensors |
| InputEnumeration | mSpatialDomainInput |
| UtScriptData * | mTrackVariablePtr |
| Interface * | mInterfacePtr {nullptr} |
| Protected Attributes inherited from WsfL16::ComputerPart | |
| IntervalUpdater | mSendInterval |
| int | mDebugMore |
| UtCallbackHolder | mCallbacks |
| SlotParameters | mSlotParameters |
| WsfScriptContext * | mContextPtr |
| ScriptMap | mSendScripts |
Additional Inherited Members | |
| Public Types inherited from WsfObject | |
| typedef std::vector< WsfStringId > | TypeList |
| The list of types returned by GetTypeList. | |
SurveillancePart is responsible for sending tracks.
|
protected |
|
protected |
|
protected |
| WsfL16::SurveillancePart::SurveillancePart | ( | WsfScenario & | aScenario | ) |
References WsfL16::ComputerPart::ComputerPart(), WsfL16::ComputerPart::mContextPtr, WsfL16::ComputerPart::mSendInterval, mSpatialDomainInput, mTrackVariablePtr, WSF_SPATIAL_DOMAIN_AIR, WSF_SPATIAL_DOMAIN_LAND, WSF_SPATIAL_DOMAIN_SPACE, WSF_SPATIAL_DOMAIN_SUBSURFACE, and WSF_SPATIAL_DOMAIN_SURFACE.
Referenced by Clone(), and SurveillancePart().
| WsfL16::SurveillancePart::SurveillancePart | ( | const SurveillancePart & | aSrc | ) |
References WsfL16::ComputerPart::ComputerPart(), WsfL16::ComputerPart::mContextPtr, mDefaultTrackDomain, mIgnoreReportingResponsibility, mInterfacePtr, mMaxSendInterval, mSendNonSensorReports, mSpatialDomainInput, mSuppressDeadTargets, mSuppressDomains, mSuppressSensors, mTrackNumberRange, mTrackVariablePtr, and SurveillancePart().
|
overridedefault |
|
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().
|
protected |
References FindTrackToSend(), mTracks, mUnchangedTracks, and mUpdatedTracks.
Referenced by FindTrackToSend(), and HandleSend().
| WsfSimulation * WsfL16::SurveillancePart::GetSimulation | ( | ) | const |
References GetSimulation(), and mInterfacePtr.
Referenced by GetSimulation(), HandleSend(), Initialize(), OwningPlatformWantsTrackRefNumber(), SendSpaceTrack(), and ~SurveillancePart().
| 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().
|
overridevirtual |
Handle an incoming message.
Implements WsfL16::ComputerPart.
References HandleReceive().
Referenced by HandleReceive(), and ~SurveillancePart().
|
overridevirtual |
This method is called when the a slot is open.
This method is called when a slot is open.
Reimplemented from WsfL16::ComputerPart.
References WsfL16::ComputerPart::Debug(), FindTrackToSend(), WsfAuxDataEnabled::GetAuxData(), WsfL16::ComputerPart::GetComputer(), WsfPlatform::GetDamageFactor(), WsfNonExportableUtil::GetLink16_TrackQuality(), WsfL16::ComputerPart::GetPlatform(), GetSimulation(), GetTrackNumber(), HandleSend(), HaveReportingResponsibility(), IsSensorTrackSuppressed(), mDefaultTrackDomain, mIgnoreReportingResponsibility, mSendNonSensorReports, mSuppressDeadTargets, mTracks, mTrackVariablePtr, SendAirTrack(), SendLandTrack(), SendSpaceTrack(), SendSubsurfaceTrack(), SendSurfaceTrack(), TrackAvailableToSend(), trackPtr, WSF_SPATIAL_DOMAIN_AIR, WSF_SPATIAL_DOMAIN_LAND, WSF_SPATIAL_DOMAIN_SPACE, WSF_SPATIAL_DOMAIN_SUBSURFACE, WSF_SPATIAL_DOMAIN_SURFACE, and WSF_SPATIAL_DOMAIN_UNKNOWN.
Referenced by HandleSend(), and ~SurveillancePart().
|
protected |
Handle reporting responsibility (R2) rules for this track.
| 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 |
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().
|
overridevirtual |
Reimplemented from WsfL16::ComputerPart.
References WsfComponentList::GetComponent(), WsfL16::ComputerProcessor::GetInterface(), WsfL16::ComputerPart::GetPlatform(), WsfSimulation::GetRandom(), GetSimulation(), WsfPlatform::GetTrackManager(), WsfL16::ComputerPart::Initialize(), WsfL16::ComputerPart::mCallbacks, mInterfacePtr, mNextTrackNumber, mSuppressSensors, mTrackManager, mTrackNumberRange, mTrackVariablePtr, ok, and std::swap().
Referenced by ~SurveillancePart().
|
protected |
References WsfTrack::GetSensorNameId(), IsSensorTrackSuppressed(), and mSuppressSensors.
Referenced by HandleSend(), and IsSensorTrackSuppressed().
|
protected |
References WsfL16::ComputerPart::GetPlatform(), WsfMeasurement::GetSpatialDomain(), IsTrackReportable(), and mSuppressDomains.
Referenced by IsTrackReportable(), and TrackCreated().
|
protected |
|
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'.
| aInput | a reference to a UtInput object. |
| UtInput::ExceptionBase | (or an object derived from it) if the command was recognized but contains some sort of error. |
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().
|
protected |
References RawTrackDropped(), and TrackDropped().
Referenced by RawTrackDropped().
|
protected |
References WsfTrack::GetTrackId(), mTracks, RawTrackReceived(), TrackCreated(), and TrackUpdated().
Referenced by RawTrackReceived().
| void WsfL16::SurveillancePart::SendAirTrack | ( | double | aSimTime, |
| const WsfTrack & | aTrack, | ||
| int | aTrackNumber ) |
References WsfAuxDataEnabled::GetAuxDataConst(), GetLocationLLA(), WsfTrack::GetTrackQuality(), mInterfacePtr, SendAirTrack(), and WsfL16::ComputerPart::SendJMessage().
Referenced by HandleSend(), SendAirTrack(), and ~SurveillancePart().
|
protected |
References WsfAuxDataEnabled::GetAuxDataConst(), GetLocationLLA(), WsfTrack::GetTrackQuality(), mInterfacePtr, WsfL16::ComputerPart::SendJMessage(), and SendLandTrack().
Referenced by HandleSend(), and SendLandTrack().
|
protected |
References WsfTrack::cIFF_FOE, WsfTrack::cIFF_FRIEND, WsfTrack::cIFF_UNKNOWN, WsfAuxDataEnabled::GetAuxData(), WsfAuxDataEnabled::GetAuxDataConst(), WsfTrack::GetIFF_Status(), GetSimulation(), WsfTrack::GetTargetIndex(), WsfTrack::Is3D(), mInterfacePtr, WsfL16::ComputerPart::SendJMessage(), and SendSpaceTrack().
Referenced by HandleSend(), and SendSpaceTrack().
|
protected |
References mInterfacePtr, WsfL16::ComputerPart::SendJMessage(), and SendSubsurfaceTrack().
Referenced by HandleSend(), and SendSubsurfaceTrack().
|
protected |
References WsfAuxDataEnabled::GetAuxDataConst(), WsfTrack::GetTrackQuality(), mInterfacePtr, WsfL16::ComputerPart::SendJMessage(), and SendSurfaceTrack().
Referenced by HandleSend(), and SendSurfaceTrack().
| 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().
|
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().
|
protected |
References WsfTrack::GetTrackId(), IsTrackReportable(), WsfL16::SurveillancePart::TrackInfo::mIsUpdated, WsfL16::SurveillancePart::TrackInfo::mIterator, WsfL16::SurveillancePart::TrackInfo::mLastSendTime, mTracks, mUpdatedTracks, and TrackCreated().
Referenced by RawTrackReceived(), and TrackCreated().
|
protected |
References WsfTrack::GetTrackId(), mTracks, mUnchangedTracks, mUpdatedTracks, and TrackDropped().
Referenced by RawTrackDropped(), and TrackDropped().
|
protected |
References WsfTrack::GetTrackId(), mTracks, mUnchangedTracks, mUpdatedTracks, and TrackUpdated().
Referenced by RawTrackReceived(), and TrackUpdated().
|
protected |
Referenced by HandleSend(), ProcessInput(), and SurveillancePart().
|
protected |
Referenced by HandleSend(), ProcessInput(), and SurveillancePart().
|
protected |
Referenced by GetSimulation(), Initialize(), SendAirTrack(), SendLandTrack(), SendSpaceTrack(), SendSubsurfaceTrack(), SendSurfaceTrack(), and SurveillancePart().
|
protected |
Referenced by ProcessInput(), SurveillancePart(), and TrackAvailableToSend().
|
protected |
Referenced by GetTrackNumber(), and Initialize().
|
protected |
Referenced by HandleSend(), ProcessInput(), and SurveillancePart().
|
protected |
Referenced by ProcessInput(), SurveillancePart(), and SurveillancePart().
|
protected |
Referenced by HandleSend(), ProcessInput(), and SurveillancePart().
|
protected |
Referenced by IsTrackReportable(), ProcessInput(), and SurveillancePart().
|
protected |
Referenced by Initialize(), IsSensorTrackSuppressed(), ProcessInput(), SuppressSensor(), and SurveillancePart().
|
protected |
Referenced by Initialize().
|
protected |
Referenced by GetTrackNumber(), Initialize(), ProcessInput(), and SurveillancePart().
|
protected |
Referenced by FindTrackToSend(), HandleSend(), RawTrackReceived(), TrackCreated(), TrackDropped(), and TrackUpdated().
|
protected |
Referenced by HandleSend(), Initialize(), SurveillancePart(), and SurveillancePart().
|
protected |
Referenced by FindTrackToSend(), TrackAvailableToSend(), TrackDropped(), and TrackUpdated().
|
protected |
Referenced by FindTrackToSend(), TrackAvailableToSend(), TrackCreated(), TrackDropped(), and TrackUpdated().