|
WSF
|
#include <WsfDefaultSensorScheduler.hpp>


Classes | |
| class | Request |
| class | CompareRequestId |
| A Functor for locating a track request. More... | |
Public Types | |
| using | RequestList = std::vector<Request> |
| using | RequestListIndex = RequestList::size_type |
Public Member Functions | |
| WsfDefaultSensorScheduler () | |
| ~WsfDefaultSensorScheduler () override=default | |
| WsfSensorScheduler * | Clone () const override |
| void | FrameTimeChanged (double aSimTime, WsfStringId aModeNameId) override |
| int | GetActiveRequestCount (WsfStringId aModeNameId) const override |
| int | GetMaximumRequestCount (WsfStringId aModeNameId) const override |
| bool | HaveRequestFor (const WsfTrackId &aRequestId) const override |
| bool | Initialize (double aSimTime, WsfSensor *aSensorPtr, WsfSensorTracker *aTrackerPtr) override |
| void | ModeDeselected (double aSimTime, WsfStringId aModeNameId) override |
| void | ModeSelected (double aSimTime, WsfStringId aModeNameId) override |
| void | PlatformAdded (double aSimTime, WsfPlatform *aPlatformPtr) override |
| void | PlatformDeleted (WsfPlatform *aPlatformPtr) override |
| bool | ProcessInput (UtInput &aInput) override |
| void | RemoveTarget (double aSimTime, size_t aTargetIndex) override |
| const WsfTrack & | GetTrackForRequest (const WsfTrackId &aRequestId) const override |
| bool | SelectTarget (double aSimTime, double &aNextSimTime, size_t &aTargetIndex, WsfTrackId &aRequestId, WsfSensor::Settings &aSettings) override |
| bool | StartTracking (double aSimTime, const WsfTrack &aTrack, WsfStringId aModeNameId) override |
| bool | StopTracking (double aSimTime, const WsfTrackId &aRequestId) override |
| void | TrackerModeChange (double aSimTime, const WsfTrackId &aRequestId, size_t aTargetIndex, WsfPlatform *aTargetPtr, const WsfTrack *aTrackPtr, WsfStringId aModeNameId) override |
| void | TurnOff (double aSimTime) override |
| void | TurnOn (double aSimTime) override |
| const RequestList & | GetRequestList () const |
| Public Member Functions inherited from WsfSensorScheduler | |
| WsfSensorScheduler () | |
| virtual | ~WsfSensorScheduler ()=default |
| bool | DebugEnabled () const |
| Returns 'true' if debugging is enabled for the scheduler. | |
| void | SetDebugEnabled (bool aDebug) |
| WsfSimulation * | GetSimulation () const |
Static Public Member Functions | |
| static std::unique_ptr< WsfSensorScheduler > | ObjectFactory (const std::string &aTypeName) |
Protected Types | |
| enum | ScanSchedulingMethod { cSSM_RANDOM , cSSM_INPUT_ORDER , cSSM_REVERSE_INPUT_ORDER } |
| Protected Types inherited from WsfSensorScheduler | |
| using | SearchList = std::vector<size_t> |
| using | SearchListIndex = SearchList::size_type |
Protected Member Functions | |
| WsfDefaultSensorScheduler (const WsfDefaultSensorScheduler &aSrc) | |
| WsfDefaultSensorScheduler & | operator= (const WsfDefaultSensorScheduler &)=delete |
| void | CheckSearchModeAvailability () |
| Check if the current mode selections provide for the ability to process search chances. | |
| void | DeselectMode (double aSimTime, Request &aRequest) |
| Deselect the mode associated with the current request if it is not in use by other requests. | |
| void | SelectMode (double aSimTime, Request &aRequest) |
| void | ResetTrackList () |
| void | ResetSearchList () |
| size_t | SelectTargetForRequest (Request &aRequest) |
| bool | TargetHasActiveRequest (size_t aTargetIndex) const |
| Returns true if the target has an active request against it. | |
| void | UpdateNextTrackVisitTime () |
| void | UpdateSearchChanceInterval () |
| void | UpdateSearchFrameTime (double aSimTime) |
| Protected Member Functions inherited from WsfSensorScheduler | |
| WsfSensorScheduler (const WsfSensorScheduler &aSrc) | |
| WsfSensorScheduler & | operator= (const WsfSensorScheduler &aSrc)=delete |
| const SearchList & | GetSearchList () const |
Protected Attributes | |
| std::vector< WsfSensorMode * > | mModeList |
| The pointers to the sensor modes, indexed by mode index. | |
| double | mDwellEndTime |
| double | mNextSearchVisitTime |
| double | mNextTrackVisitTime |
| double | mSearchChanceInterval |
| double | mSearchFrameTime |
| SearchListIndex | mSearchIndex |
| The vector index of the next search chance to be performed. | |
| RequestList | mRequestList |
| A list of active track requests. | |
| RequestListIndex | mRequestIndex |
| The index of the next request to be performed. | |
| size_t | mLastExplicitModeIndex |
| The last mode explicitly selected (i.e.: via WsfSensor::SelectMode). | |
| size_t | mSearchModeIndex |
| bool | mSearchAllowed |
| 'true' if search chances can be processed. | |
| bool | mCheckSearchList |
| ScanSchedulingMethod | mScanSchedulingMethod |
| How scan chances are added to the search list. | |
| Protected Attributes inherited from WsfSensorScheduler | |
| WsfSensor * | mSensorPtr |
| WsfSensorTracker * | mTrackerPtr |
| SearchList | mSearchList |
The default sensor scheduler given to sensors.
In search mode, this schedules detection chances for a sensor using a statistical scan. Times of detection chances are random and independent of the target's location, but still constrained by the 'frame_time'.
| using WsfDefaultSensorScheduler::RequestList = std::vector<Request> |
| using WsfDefaultSensorScheduler::RequestListIndex = RequestList::size_type |
|
protected |
| WsfDefaultSensorScheduler::WsfDefaultSensorScheduler | ( | ) |
References cSSM_RANDOM, mCheckSearchList, mDwellEndTime, mLastExplicitModeIndex, mModeList, mNextSearchVisitTime, mNextTrackVisitTime, mRequestIndex, mRequestList, mScanSchedulingMethod, mSearchAllowed, mSearchChanceInterval, mSearchFrameTime, mSearchIndex, mSearchModeIndex, and WsfSensorScheduler::WsfSensorScheduler().
Referenced by Clone(), operator=(), WsfDefaultSensorScheduler(), WsfSensorsManagerFovSensorScheduler::WsfSensorsManagerFovSensorScheduler(), WsfSensorsManagerFovSensorScheduler::WsfSensorsManagerFovSensorScheduler(), and WsfSensorsManagerFovSensorScheduler::WsfSensorsManagerFovSensorScheduler().
|
overridedefault |
References ObjectFactory(), and WsfSensorScheduler::WsfSensorScheduler().
|
protected |
References mCheckSearchList, mDwellEndTime, mLastExplicitModeIndex, mModeList, mNextSearchVisitTime, mNextTrackVisitTime, mRequestIndex, mRequestList, mScanSchedulingMethod, mSearchAllowed, mSearchChanceInterval, mSearchFrameTime, mSearchIndex, mSearchModeIndex, WsfDefaultSensorScheduler(), and WsfSensorScheduler::WsfSensorScheduler().
|
protected |
Check if the current mode selections provide for the ability to process search chances.
References WsfSensorMode::CanSearchWhileTrack(), WsfSensorMode::DisablesSearch(), WsfMode::IsSelected(), mLastExplicitModeIndex, mModeList, mSearchAllowed, mSearchModeIndex, and WsfSensorScheduler::mSensorPtr.
Referenced by ModeDeselected(), ModeSelected(), operator=(), TurnOn(), and WsfSensorsManagerFovSensorScheduler::TurnOn().
|
overridevirtual |
Reimplemented from WsfSensorScheduler.
Reimplemented in WsfSensorsManagerFovSensorScheduler.
References WsfDefaultSensorScheduler(), and WsfSensorScheduler::WsfSensorScheduler().
|
protected |
Deselect the mode associated with the current request if it is not in use by other requests.
References WsfNamed::GetNameId(), WsfDefaultSensorScheduler::Request::mModeIndex, mModeList, WsfDefaultSensorScheduler::Request::mRequestId, mRequestList, and WsfSensorScheduler::mSensorPtr.
Referenced by operator=(), StartTracking(), StopTracking(), and TrackerModeChange().
|
overridevirtual |
A notification call to indicate the frame time for the specified mode has changed.
| aSimTime | The current simulation time. |
| aModeNameId | The name (string ID) of the mode. |
Reimplemented from WsfSensorScheduler.
References UpdateSearchFrameTime().
|
overridevirtual |
Return the number of requests that are active in a specified mode.
| aModeNameId | The name (string ID) of the mode. |
Reimplemented from WsfSensorScheduler.
References mModeList, mRequestList, and WsfSensorScheduler::mSensorPtr.
|
overridevirtual |
Return the maximum number of requests that can be processed by the indicated mode.
| aModeNameId | The name (string ID) of the mode. |
Reimplemented from WsfSensorScheduler.
References mModeList, and WsfSensorScheduler::mSensorPtr.
Referenced by StartTracking().
|
inline |
References mRequestList.
Referenced by WsfXIO_SensorService::HandleRequest().
|
overridevirtual |
Returns the track data for the request, this return is of a constant type to prevent modification.
| aRequestId | The track ID. This should be the track ID of a track submitted to StartTracking. |
Reimplemented from WsfSensorScheduler.
References mRequestList.
|
overridevirtual |
Does the scheduler have a request for the indicated track ID?
| aRequestId | The track ID. This should be the track ID of a track submitted to StartTracking. |
Reimplemented from WsfSensorScheduler.
References mRequestList.
|
overridevirtual |
Initialize the scheduler.
| aSimTime | The current simulation time. |
| aSensorPtr | The sensor with which the scheduler is associated. |
| aTrackerPtr | The tracker that is associated with the sensor. This can be zero if there is no tracker. |
Reimplemented from WsfSensorScheduler.
References WsfModeList::GetDerivedModeList(), WsfSensor::GetModeList(), WsfSensorScheduler::Initialize(), mLastExplicitModeIndex, mModeList, WsfSensorScheduler::mSensorPtr, and ok.
|
overridevirtual |
A mode has been explicitly deselected. This is called from WsfSensor::DeselectMode to indicate that a mode has been deselected.
| aSimTime | The current simulation time. |
| aModeNameId | The name (string ID) of the mode that has been deselected. |
Reimplemented from WsfSensorScheduler.
References CheckSearchModeAvailability(), mCheckSearchList, mLastExplicitModeIndex, mModeList, mSearchAllowed, and WsfSensorScheduler::mSensorPtr.
|
overridevirtual |
A mode has been explicitly selected. This is called from WsfSensor::SelectMode to indicate that a mode has been selected.
| aSimTime | The current simulation time. |
| aModeNameId | The name (string ID) of the mode that has been selected. |
Reimplemented from WsfSensorScheduler.
References CheckSearchModeAvailability(), mCheckSearchList, mLastExplicitModeIndex, mModeList, mSearchAllowed, WsfSensorScheduler::mSensorPtr, and UpdateSearchFrameTime().
|
static |
Factory method for WsfSensorSchedulerTypes to determine if a scheduler represented by this class is being requested.
Referenced by WsfSensorTypes::WsfSensorTypes(), and ~WsfDefaultSensorScheduler().
|
protecteddelete |
|
overridevirtual |
A platform has been added to the simulation.
| aSimTime | The current simulation time. |
| aPlatformPtr | A pointer to the platform that was added. |
Reimplemented from WsfSensorScheduler.
References cSSM_INPUT_ORDER, cSSM_RANDOM, cSSM_REVERSE_INPUT_ORDER, WsfPlatform::GetIndex(), WsfPlatform::GetSimulation(), mScanSchedulingMethod, mSearchIndex, WsfSensorScheduler::mSearchList, and UpdateSearchChanceInterval().
|
overridevirtual |
A platform has been removed from the simulation.
| aPlatformPtr | A pointer to the platform that was deleted. |
Reimplemented from WsfSensorScheduler.
References WsfPlatform::GetIndex(), mCheckSearchList, mSearchAllowed, and WsfSensorScheduler::mSearchList.
|
overridevirtual |
Reimplemented from WsfSensorScheduler.
References cSSM_INPUT_ORDER, cSSM_RANDOM, cSSM_REVERSE_INPUT_ORDER, mScanSchedulingMethod, and WsfSensorScheduler::ProcessInput().
|
overridevirtual |
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.
| aSimTime | The current simulation time. |
| aTargetIndex | The object ID of the target to be removed. |
Reimplemented from WsfSensorScheduler.
References mSearchIndex, WsfSensorScheduler::mSearchList, and UpdateSearchChanceInterval().
|
protected |
References mNextSearchVisitTime, mSearchIndex, and WsfSensorScheduler::mSearchList.
Referenced by operator=(), TurnOff(), WsfSensorsManagerFovSensorScheduler::TurnOff(), TurnOn(), and WsfSensorsManagerFovSensorScheduler::TurnOn().
|
protected |
References mNextTrackVisitTime, mRequestIndex, and mRequestList.
Referenced by operator=(), and TurnOff().
|
protected |
References WsfNamed::GetNameId(), WsfMode::IsSelected(), WsfDefaultSensorScheduler::Request::mModeIndex, mModeList, and WsfSensorScheduler::mSensorPtr.
Referenced by operator=(), StartTracking(), and TrackerModeChange().
|
overridevirtual |
Select a target for a detection attempt.
| 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. |
Reimplemented from WsfSensorScheduler.
References WsfEM_Util::ComputeApparentPosition(), WsfSensorScheduler::DebugEnabled(), WsfSensorMode::GetDwellTime(), WsfMeasurement::GetExtrapolatedLocationWCS(), WsfSimulation::GetPlatformByIndex(), WsfSimulation::GetPlatformNameId(), WsfSensorMode::GetRevisitTime(), mCheckSearchList, mDwellEndTime, WsfSensorTracker::TargetState::mLocationWCS, WsfSensor::Settings::mLockonTime, WsfSensorTracker::TargetState::mLockonTime, WsfDefaultSensorScheduler::Request::mModeIndex, WsfSensor::Settings::mModeIndex, mModeList, mNextSearchVisitTime, mNextTrackVisitTime, WsfDefaultSensorScheduler::Request::mNextVisitTime, WsfDefaultSensorScheduler::Request::mRequestId, mRequestIndex, mRequestList, mSearchAllowed, mSearchChanceInterval, mSearchIndex, WsfSensorScheduler::mSearchList, mSearchModeIndex, WsfSensorScheduler::mSensorPtr, WsfDefaultSensorScheduler::Request::mTrack, WsfSensorScheduler::mTrackerPtr, WsfTrackId::Null(), SelectTargetForRequest(), TargetHasActiveRequest(), targetIndex(), and UpdateNextTrackVisitTime().
|
protected |
References WsfTrack::GetTargetIndex(), WsfDefaultSensorScheduler::Request::mTargetIndex, WsfDefaultSensorScheduler::Request::mTrack, and targetIndex().
Referenced by operator=(), and SelectTarget().
|
overridevirtual |
Start tracking a target specified by a track.
| aSimTime | The current simulation time. |
| aTrack | The target track cue. |
| aModeNameId | The mode name (string ID) of the mode to be used. If zero then the implementation will choose an appropriate mode. |
Reimplemented from WsfSensorScheduler.
References WsfSensorScheduler::DebugEnabled(), DeselectMode(), WsfSensorMode::GetFrameTime(), GetMaximumRequestCount(), WsfTrack::GetTrackId(), WsfTrack::GetUpdateTime(), WsfDefaultSensorScheduler::Request::mModeIndex, mModeList, mNextSearchVisitTime, mNextTrackVisitTime, WsfDefaultSensorScheduler::Request::mNextVisitTime, mRequestList, WsfSensorScheduler::mSensorPtr, WsfDefaultSensorScheduler::Request::mTrack, SelectMode(), WsfObserver::SensorRequestInitiated(), WsfObserver::SensorRequestUpdated(), and UpdateNextTrackVisitTime().
|
overridevirtual |
Stop tracking a target.
| aSimTime | The current simulation time. |
| aRequestId | The track ID from the track that was provided to StartTracking. |
Reimplemented from WsfSensorScheduler.
References WsfSensorScheduler::DebugEnabled(), DeselectMode(), mRequestList, WsfSensorScheduler::mSensorPtr, WsfDefaultSensorScheduler::Request::mTrack, WsfSensorScheduler::mTrackerPtr, WsfObserver::SensorRequestCanceled(), and UpdateNextTrackVisitTime().
|
protected |
Returns true if the target has an active request against it.
References mRequestList.
Referenced by operator=(), and SelectTarget().
|
overridevirtual |
The tracker has changed the mode for the requested target.
| aSimTime | The current simulation time. |
| aRequestId | If non-zero, the associated sensor scheduler request ID. |
| aTargetIndex | The 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. |
| aTargetPtr | The pointer of the target of interest. |
| aTrackPtr | Pointer to the current track associated with the target (may be zero). |
| aModeNameId | The name (ID) of the new mode. |
Reimplemented from WsfSensorScheduler.
References WsfSensorScheduler::DebugEnabled(), DeselectMode(), WsfSensorMode::GetFrameTime(), WsfDefaultSensorScheduler::Request::mModeIndex, mModeList, WsfDefaultSensorScheduler::Request::mNextVisitTime, WsfDefaultSensorScheduler::Request::mRequestId, mRequestList, WsfSensorScheduler::mSensorPtr, WsfDefaultSensorScheduler::Request::mTrack, SelectMode(), WsfObserver::SensorRequestUpdated(), and UpdateNextTrackVisitTime().
|
overridevirtual |
The sensor is being turned off.
| aSimTime | The current simulation time. |
Reimplemented from WsfSensorScheduler.
Reimplemented in WsfSensorsManagerFovSensorScheduler.
References ResetSearchList(), and ResetTrackList().
|
overridevirtual |
The sensor is being turned on.
| aSimTime | The current simulation time. |
Reimplemented from WsfSensorScheduler.
Reimplemented in WsfSensorsManagerFovSensorScheduler.
References CheckSearchModeAvailability(), WsfSimulation::GetPlatformCount(), WsfSimulation::GetPlatformEntry(), mCheckSearchList, mDwellEndTime, mModeList, mNextSearchVisitTime, mRequestList, WsfSensorScheduler::mSensorPtr, ResetSearchList(), UpdateNextTrackVisitTime(), and UpdateSearchChanceInterval().
|
protected |
Update the time when the next track revisit should occur. Note that the 'next visit time' is the time that would occur if there were no interference. What we look for is the 'oldest' request (the one with the smallest next visit time). The visit time is then adjusted as required.
References mDwellEndTime, mNextTrackVisitTime, mRequestIndex, and mRequestList.
Referenced by operator=(), SelectTarget(), StartTracking(), StopTracking(), TrackerModeChange(), TurnOn(), and WsfSensorsManagerFovSensorScheduler::TurnOn().
|
protected |
Update the interval between scan sensing chances. This should be called whenever the scan sensing chance entry is added or deleted or whenever the search mode is changed.
References mModeList, mSearchAllowed, mSearchChanceInterval, mSearchFrameTime, WsfSensorScheduler::mSearchList, mSearchModeIndex, and WsfSensorScheduler::mSensorPtr.
Referenced by operator=(), PlatformAdded(), RemoveTarget(), TurnOn(), WsfSensorsManagerFovSensorScheduler::TurnOn(), and UpdateSearchFrameTime().
|
protected |
References mDwellEndTime, mModeList, mNextSearchVisitTime, mNextTrackVisitTime, mSearchAllowed, mSearchChanceInterval, mSearchFrameTime, mSearchModeIndex, WsfSensorScheduler::mSensorPtr, and UpdateSearchChanceInterval().
Referenced by FrameTimeChanged(), ModeSelected(), and operator=().
|
protected |
'true' if SelectTarget should check the search list for tracks or targets that need to be delete. This is done only when a search mode is not active.
Referenced by ModeDeselected(), ModeSelected(), PlatformDeleted(), SelectTarget(), TurnOn(), WsfSensorsManagerFovSensorScheduler::TurnOn(), WsfDefaultSensorScheduler(), and WsfDefaultSensorScheduler().
|
protected |
|
protected |
The last mode explicitly selected (i.e.: via WsfSensor::SelectMode).
Referenced by CheckSearchModeAvailability(), Initialize(), ModeDeselected(), ModeSelected(), WsfDefaultSensorScheduler(), and WsfDefaultSensorScheduler().
|
protected |
The pointers to the sensor modes, indexed by mode index.
Referenced by CheckSearchModeAvailability(), DeselectMode(), GetActiveRequestCount(), GetMaximumRequestCount(), Initialize(), ModeDeselected(), ModeSelected(), SelectMode(), SelectTarget(), StartTracking(), TrackerModeChange(), TurnOn(), WsfSensorsManagerFovSensorScheduler::TurnOn(), UpdateSearchChanceInterval(), UpdateSearchFrameTime(), WsfDefaultSensorScheduler(), and WsfDefaultSensorScheduler().
|
protected |
|
protected |
|
protected |
The index of the next request to be performed.
Referenced by ResetTrackList(), SelectTarget(), UpdateNextTrackVisitTime(), WsfDefaultSensorScheduler(), and WsfDefaultSensorScheduler().
|
protected |
A list of active track requests.
Referenced by DeselectMode(), GetActiveRequestCount(), GetRequestList(), GetTrackForRequest(), HaveRequestFor(), ResetTrackList(), SelectTarget(), StartTracking(), StopTracking(), TargetHasActiveRequest(), TrackerModeChange(), TurnOn(), WsfSensorsManagerFovSensorScheduler::TurnOn(), UpdateNextTrackVisitTime(), WsfDefaultSensorScheduler(), and WsfDefaultSensorScheduler().
|
protected |
How scan chances are added to the search list.
Referenced by PlatformAdded(), ProcessInput(), WsfDefaultSensorScheduler(), and WsfDefaultSensorScheduler().
|
protected |
'true' if search chances can be processed.
Referenced by CheckSearchModeAvailability(), ModeDeselected(), ModeSelected(), PlatformDeleted(), SelectTarget(), UpdateSearchChanceInterval(), UpdateSearchFrameTime(), WsfDefaultSensorScheduler(), and WsfDefaultSensorScheduler().
|
protected |
|
protected |
|
protected |
The vector index of the next search chance to be performed.
Referenced by PlatformAdded(), RemoveTarget(), ResetSearchList(), SelectTarget(), WsfDefaultSensorScheduler(), and WsfDefaultSensorScheduler().
|
protected |
The mode index to be used for searching. If greater than the mode count then searching is disabled.
Referenced by CheckSearchModeAvailability(), SelectTarget(), UpdateSearchChanceInterval(), UpdateSearchFrameTime(), WsfDefaultSensorScheduler(), and WsfDefaultSensorScheduler().