WSF
WsfSensorScheduler Class Reference

#include <WsfSensorScheduler.hpp>

Inheritance diagram for WsfSensorScheduler:
Collaboration diagram for WsfSensorScheduler:

Public Member Functions

 WsfSensorScheduler ()
virtual ~WsfSensorScheduler ()=default
virtual WsfSensorSchedulerClone () const
bool DebugEnabled () const
 Returns 'true' if debugging is enabled for the scheduler.
void SetDebugEnabled (bool aDebug)
virtual void FrameTimeChanged (double aSimTime, WsfStringId aModeNameId)
virtual int GetActiveRequestCount (WsfStringId aModeNameId) const
virtual int GetMaximumRequestCount (WsfStringId aModeNameId) const
virtual bool HaveRequestFor (const WsfTrackId &aRequestId) const
virtual bool Initialize (double aSimTime, WsfSensor *aSensorPtr, WsfSensorTracker *aTrackerPtr)
virtual void ModeDeselected (double aSimTime, WsfStringId aModeNameId)
virtual void ModeSelected (double aSimTime, WsfStringId aModeNameId)
virtual void PlatformAdded (double aSimTime, WsfPlatform *aPlatformPtr)
virtual void PlatformDeleted (WsfPlatform *aPlatformPtr)
virtual bool ProcessInput (UtInput &aInput)
virtual void RemoveTarget (double aSimTime, size_t aTargetIndex)
virtual const WsfTrackGetTrackForRequest (const WsfTrackId &aRequestId) const
virtual bool SelectTarget (double aSimTime, double &aNextSimTime, size_t &aTargetIndex, WsfTrackId &aRequestId, WsfSensor::Settings &aSettings)
virtual bool StartTracking (double aSimTime, const WsfTrack &aTrack, WsfStringId aModeNameId)
virtual bool StopTracking (double aSimTime, const WsfTrackId &aTrackId)
virtual void TrackerModeChange (double aSimTime, const WsfTrackId &aRequestId, size_t aTargetIndex, WsfPlatform *aTargetPtr, const WsfTrack *aTrackPtr, WsfStringId aModeNameId)
virtual void TurnOff (double aSimTime)
virtual void TurnOn (double aSimTime)
WsfSimulationGetSimulation () const

Protected Types

using SearchList = std::vector<size_t>
using SearchListIndex = SearchList::size_type

Protected Member Functions

 WsfSensorScheduler (const WsfSensorScheduler &aSrc)
WsfSensorScheduleroperator= (const WsfSensorScheduler &aSrc)=delete
const SearchListGetSearchList () const

Protected Attributes

WsfSensormSensorPtr
WsfSensorTrackermTrackerPtr
SearchList mSearchList

Detailed Description

Schedules detection chances for sensors.

The main task of the sensor scheduler is to schedule detection chances for a sensor. WsfSensorScheduler is a virtual interface for sensor scheduler implementations. See WsfDefaultSensorScheduler for the default scheduler implementation.

Member Typedef Documentation

◆ SearchList

using WsfSensorScheduler::SearchList = std::vector<size_t>
protected

◆ SearchListIndex

using WsfSensorScheduler::SearchListIndex = SearchList::size_type
protected

Constructor & Destructor Documentation

◆ WsfSensorScheduler() [1/2]

◆ ~WsfSensorScheduler()

virtual WsfSensorScheduler::~WsfSensorScheduler ( )
virtualdefault

References Clone(), and WsfSensorScheduler().

◆ WsfSensorScheduler() [2/2]

WsfSensorScheduler::WsfSensorScheduler ( const WsfSensorScheduler & aSrc)
protected

Member Function Documentation

◆ Clone()

◆ DebugEnabled()

◆ FrameTimeChanged()

void WsfSensorScheduler::FrameTimeChanged ( double aSimTime,
WsfStringId aModeNameId )
virtual

A notification call to indicate the frame time for the specified mode has changed.

Parameters
aSimTimeThe current simulation time.
aModeNameIdThe name (string ID) of the mode.

Reimplemented in WsfDefaultSensorScheduler.

◆ GetActiveRequestCount()

int WsfSensorScheduler::GetActiveRequestCount ( WsfStringId aModeNameId) const
virtual

Return the number of requests that are active in a specified mode.

Parameters
aModeNameIdThe name (string ID) of the mode.

Reimplemented in WsfDefaultSensorScheduler.

◆ GetMaximumRequestCount()

int WsfSensorScheduler::GetMaximumRequestCount ( WsfStringId aModeNameId) const
virtual

Return the maximum number of requests that can be processed by the indicated mode.

Parameters
aModeNameIdThe name (string ID) of the mode.

Reimplemented in WsfDefaultSensorScheduler.

◆ GetSearchList()

const SearchList & WsfSensorScheduler::GetSearchList ( ) const
inlineprotected

References mSearchList.

◆ GetSimulation()

◆ GetTrackForRequest()

const WsfTrack & WsfSensorScheduler::GetTrackForRequest ( const WsfTrackId & aRequestId) const
virtual

Returns the track data for the request, this return is of a constant type to prevent modification.

Parameters
aRequestIdThe track ID. This should be the track ID of a track submitted to StartTracking.
Returns
The track that corresponds to the request.

Reimplemented in WsfDefaultSensorScheduler.

◆ HaveRequestFor()

bool WsfSensorScheduler::HaveRequestFor ( const WsfTrackId & aRequestId) const
virtual

Does the scheduler have a request for the indicated track ID?

Parameters
aRequestIdThe track ID. This should be the track ID of a track submitted to StartTracking.

Reimplemented in WsfDefaultSensorScheduler.

◆ Initialize()

bool WsfSensorScheduler::Initialize ( double aSimTime,
WsfSensor * aSensorPtr,
WsfSensorTracker * aTrackerPtr )
virtual

Initialize the scheduler.

Parameters
aSimTimeThe current simulation time.
aSensorPtrThe sensor with which the scheduler is associated.
aTrackerPtrThe tracker that is associated with the sensor. This can be zero if there is no tracker.
Returns
'true' if successful or 'false' if not.

Reimplemented in WsfDefaultSensorScheduler, WsfPhysicalScanSensorScheduler, WsfSectorScanSensorScheduler, and WsfSpinSensorScheduler.

References mSensorPtr, and mTrackerPtr.

Referenced by WsfDefaultSensorScheduler::Initialize(), WsfPhysicalScanSensorScheduler::Initialize(), WsfSectorScanSensorScheduler::Initialize(), and WsfSpinSensorScheduler::Initialize().

◆ ModeDeselected()

void WsfSensorScheduler::ModeDeselected ( double aSimTime,
WsfStringId aModeNameId )
virtual

A mode has been explicitly deselected. This is called from WsfSensor::DeselectMode to indicate that a mode has been deselected.

Parameters
aSimTimeThe current simulation time.
aModeNameIdThe name (string ID) of the mode that has been deselected.
Note
This is not called for implicit mode deselections that occur with tracking requests.

Reimplemented in WsfDefaultSensorScheduler, WsfPhysicalScanSensorScheduler, WsfSectorScanSensorScheduler, and WsfSpinSensorScheduler.

◆ ModeSelected()

void WsfSensorScheduler::ModeSelected ( double aSimTime,
WsfStringId aModeNameId )
virtual

A mode has been explicitly selected. This is called from WsfSensor::SelectMode to indicate that a mode has been selected.

Parameters
aSimTimeThe current simulation time.
aModeNameIdThe name (string ID) of the mode that has been selected.
Note
This is not called for implicit mode selections that occur with tracking requests.

Reimplemented in WsfDefaultSensorScheduler, WsfPhysicalScanSensorScheduler, WsfSectorScanSensorScheduler, and WsfSpinSensorScheduler.

◆ operator=()

WsfSensorScheduler & WsfSensorScheduler::operator= ( const WsfSensorScheduler & aSrc)
protecteddelete

References WsfSensorScheduler().

◆ PlatformAdded()

void WsfSensorScheduler::PlatformAdded ( double aSimTime,
WsfPlatform * aPlatformPtr )
virtual

A platform has been added to the simulation.

Parameters
aSimTimeThe current simulation time.
aPlatformPtrA pointer to the platform that was added.

Reimplemented in WsfDefaultSensorScheduler, WsfPhysicalScanSensorScheduler, WsfSectorScanSensorScheduler, and WsfSpinSensorScheduler.

◆ PlatformDeleted()

void WsfSensorScheduler::PlatformDeleted ( WsfPlatform * aPlatformPtr)
virtual

A platform has been removed from the simulation.

Parameters
aPlatformPtrA pointer to the platform that was deleted.

Reimplemented in WsfDefaultSensorScheduler.

◆ ProcessInput()

◆ RemoveTarget()

void WsfSensorScheduler::RemoveTarget ( double aSimTime,
size_t aTargetIndex )
virtual

Indicate that the specified target should be removed from further consideration. This is called from the scheduler to indicate that the target should be removed from any scheduling list.

Parameters
aSimTimeThe current simulation time.
aTargetIndexThe object ID of the target to be removed.

Reimplemented in WsfDefaultSensorScheduler, WsfPhysicalScanSensorScheduler, WsfSectorScanSensorScheduler, and WsfSpinSensorScheduler.

◆ SelectTarget()

bool WsfSensorScheduler::SelectTarget ( double aSimTime,
double & aNextSimTime,
size_t & aTargetIndex,
WsfTrackId & aRequestId,
WsfSensor::Settings & aSettings )
virtual

Select a target for a detection attempt.

Parameters
aSimTime[input] The current simulation time.
aNextSimTime[output] The simulation time when the scheduler should next be called.
aTargetIndex[output] The object ID of the target to be detected (typically a platform index or some other unique ID). This will not be valid if the return value from the method is false.
aRequestId[output] The request ID (original track ID from StartTracking) associated with the target. aRequest.IsNull() will be true if the target is not associated with a track request. This will not be valid if the return value from the method is false.
aSettings[updated] The sensor settings to be used for the detection attempt. This will not be valid if the return value from the method is false.
Returns
true if a target was selected or false if no target selected.

Reimplemented in WsfDefaultSensorScheduler, WsfEOIR_Sensor::EOIR_SensorScheduler, WsfPhysicalScanSensorScheduler, WsfSectorScanSensorScheduler, and WsfSpinSensorScheduler.

◆ SetDebugEnabled()

void WsfSensorScheduler::SetDebugEnabled ( bool aDebug)
inline

◆ StartTracking()

bool WsfSensorScheduler::StartTracking ( double aSimTime,
const WsfTrack & aTrack,
WsfStringId aModeNameId )
virtual

Start tracking a target specified by a track.

Parameters
aSimTimeThe current simulation time.
aTrackThe target track cue.
aModeNameIdThe mode name (string ID) of the mode to be used. If zero then the implementation will choose an appropriate mode.
Returns
'true' if the tracking request was accepted or 'false' if not.

Reimplemented in WsfDefaultSensorScheduler.

◆ StopTracking()

bool WsfSensorScheduler::StopTracking ( double aSimTime,
const WsfTrackId & aRequestId )
virtual

Stop tracking a target.

Parameters
aSimTimeThe current simulation time.
aRequestIdThe track ID from the track that was provided to StartTracking.
Returns
'true' if the request was stopped.

Reimplemented in WsfDefaultSensorScheduler.

◆ TrackerModeChange()

void WsfSensorScheduler::TrackerModeChange ( double aSimTime,
const WsfTrackId & aRequestId,
size_t aTargetIndex,
WsfPlatform * aTargetPtr,
const WsfTrack * aTrackPtr,
WsfStringId aModeNameId )
virtual

The tracker has changed the mode for the requested target.

Parameters
aSimTimeThe current simulation time.
aRequestIdIf non-zero, the associated sensor scheduler request ID.
aTargetIndexThe index of the target of interest. For a platform this should be its platform ID and for other objects it should be their unique ID.
aTargetPtrThe pointer of the target of interest.
aTrackPtrPointer to the current track associated with the target (may be zero).
aModeNameIdThe name (ID) of the new mode.

Reimplemented in WsfDefaultSensorScheduler.

◆ TurnOff()

void WsfSensorScheduler::TurnOff ( double aSimTime)
virtual

The sensor is being turned off.

Parameters
aSimTimeThe current simulation time.

Reimplemented in WsfDefaultSensorScheduler, WsfPhysicalScanSensorScheduler, WsfSectorScanSensorScheduler, WsfSensorsManagerFovSensorScheduler, and WsfSpinSensorScheduler.

◆ TurnOn()

void WsfSensorScheduler::TurnOn ( double aSimTime)
virtual

The sensor is being turned on.

Parameters
aSimTimeThe current simulation time.

Reimplemented in WsfDefaultSensorScheduler, WsfPhysicalScanSensorScheduler, WsfSectorScanSensorScheduler, WsfSensorsManagerFovSensorScheduler, and WsfSpinSensorScheduler.

Member Data Documentation

◆ mSearchList

◆ mSensorPtr

WsfSensor* WsfSensorScheduler::mSensorPtr
protected

Referenced by WsfDefaultSensorScheduler::CheckSearchModeAvailability(), WsfDefaultSensorScheduler::DeselectMode(), WsfDefaultSensorScheduler::GetActiveRequestCount(), WsfDefaultSensorScheduler::GetMaximumRequestCount(), GetSimulation(), WsfDefaultSensorScheduler::Initialize(), WsfPhysicalScanSensorScheduler::Initialize(), WsfSectorScanSensorScheduler::Initialize(), Initialize(), WsfSpinSensorScheduler::Initialize(), WsfDefaultSensorScheduler::ModeDeselected(), WsfPhysicalScanSensorScheduler::ModeDeselected(), WsfSectorScanSensorScheduler::ModeDeselected(), WsfSpinSensorScheduler::ModeDeselected(), WsfDefaultSensorScheduler::ModeSelected(), WsfPhysicalScanSensorScheduler::ModeSelected(), WsfSectorScanSensorScheduler::ModeSelected(), WsfSpinSensorScheduler::ModeSelected(), WsfSpinSensorScheduler::PlatformAdded(), WsfDefaultSensorScheduler::SelectMode(), WsfDefaultSensorScheduler::SelectTarget(), WsfEOIR_Sensor::EOIR_SensorScheduler::SelectTarget(), WsfPhysicalScanSensorScheduler::SelectTarget(), WsfSectorScanSensorScheduler::SelectTarget(), WsfSpinSensorScheduler::SelectTarget(), WsfDefaultSensorScheduler::StartTracking(), WsfDefaultSensorScheduler::StopTracking(), WsfDefaultSensorScheduler::TrackerModeChange(), WsfPhysicalScanSensorScheduler::TurnOff(), WsfSectorScanSensorScheduler::TurnOff(), WsfSpinSensorScheduler::TurnOff(), WsfDefaultSensorScheduler::TurnOn(), WsfPhysicalScanSensorScheduler::TurnOn(), WsfSectorScanSensorScheduler::TurnOn(), WsfSensorsManagerFovSensorScheduler::TurnOn(), WsfSpinSensorScheduler::TurnOn(), WsfDefaultSensorScheduler::UpdateSearchChanceInterval(), WsfDefaultSensorScheduler::UpdateSearchFrameTime(), WsfSensorScheduler(), and WsfSensorScheduler().

◆ mTrackerPtr


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