12#ifndef WSFTRACKSTATECONTROLLER_HPP
13#define WSFTRACKSTATECONTROLLER_HPP
15#include "wsf_export.h"
21#include "UtCallbackHolder.hpp"
22#include "UtGenericMappedList.hpp"
64 virtual bool Initialize(
double aSimTime,
68 virtual bool ProcessInput(
const WsfScenario& aScenario, UtInput& aInput);
69 virtual bool ProcessMessage(
double aSimTime,
const WsfMessage& aMessage);
72 virtual void TurnOff(
double aSimTime);
73 virtual void TurnOn(
double aSimTime);
75 void ConnectCallbacks();
90 virtual void TracksInState(
WsfStringId aStateName, std::vector<WsfLocalTrack*>& aTrackList);
101 virtual void EnterState(
int aStateIndex);
102 virtual void ExitState(
int aStateIndex);
104 virtual double EvaluationComplete(
double aSimTime,
const WsfTrackId& aLocalTrackId,
unsigned int aEvaluationEpoch);
106 virtual void RequestEvaluation(
double aSimTime,
const WsfTrackId& aLocalTrackId,
unsigned int aEvaluationEpoch);
112 : mControllerPtr(nullptr)
118 , mControllerPtr(aControllerPtr)
123 , mControllerPtr(aControllerPtr)
126 void EnterStateNotify(
int aStateIndex)
override { mControllerPtr->EnterState(aStateIndex); }
127 void ExitStateNotify(
int aStateIndex)
override { mControllerPtr->ExitState(aStateIndex); }
137 void DeleteTrack(
double aSimTime,
const WsfTrackId& aLocalTrackId);
139 void DiscoverTrack(
double aSimTime,
const WsfLocalTrack* aTrackPtr);
145 void CandidateTrackPromoted(
double aSimTime,
const WsfLocalTrack* aLocalTrackPtr);
147 void LocalTrackInitiated(
double aSimTime,
const WsfLocalTrack* aLocalTrackPtr,
const WsfTrack* aRawTrackPtr);
149 void LocalTrackDropped(
double aSimTime,
const WsfLocalTrack* aLocalTrackPtr);
151 void TrackManagerChanged(
double aSimTime,
WsfTrackManager* aNewManagerPtr);
ut::script::Data UtScriptData
Definition WsfScriptContext.hpp:47
UtStringId WsfStringId
WsfStringId – the same thing as UtStringId.
Definition WsfStringId.hpp:23
WsfTrackListT< WsfLocalTrack > WsfLocalTrackList
Definition WsfTrackList.hpp:89
#define WSF_EXPORT
Definition WsfXIO_Export.hpp:35
An auxiliary class for storing decision-making data that pertains to a local track.
Definition WsfLocalTrackStatus.hpp:28
Definition WsfLocalTrack.hpp:32
A base class for messages sent among simulation communication objects, processors and sensors.
Definition WsfMessage.hpp:33
Definition WsfProcessor.hpp:39
Contains the data required to create a simulation, and acts as the entry point for input file process...
Definition WsfScenario.hpp:111
Definition WsfScriptContext.hpp:71
WsfScriptStateMachine()=default
The main controller for a simulation.
Definition WsfSimulation.hpp:109
Definition WsfTimeDelayQueue.hpp:48
Definition WsfTrackId.hpp:33
Definition WsfTrackManager.hpp:62
Definition WsfTrackStateController.hpp:109
TrackStateMachine()
Definition WsfTrackStateController.hpp:111
void EnterStateNotify(int aStateIndex) override
Definition WsfTrackStateController.hpp:126
void ExitStateNotify(int aStateIndex) override
Definition WsfTrackStateController.hpp:127
TrackStateMachine(WsfScriptContext &aContext, WsfTrackStateController *aControllerPtr)
Definition WsfTrackStateController.hpp:116
TrackStateMachine(const TrackStateMachine &aSrc, WsfScriptContext &aContext, WsfTrackStateController *aControllerPtr)
Definition WsfTrackStateController.hpp:121
bool mEvaluateCandidateTracks
Definition WsfTrackStateController.hpp:179
WsfProcessor * GetProcessor() const
Get the processor to which the controller is attached.
Definition WsfTrackStateController.hpp:59
UtScriptData * mStatusVarPtr
Definition WsfTrackStateController.hpp:203
bool mClearSignalOnStateExit
Definition WsfTrackStateController.hpp:181
WsfPlatform * mPlatformPtr
Definition WsfTrackStateController.hpp:153
WsfTimeDelayQueue * mThinkerPtr
Definition WsfTrackStateController.hpp:155
WsfLocalTrackList * mTrackListPtr
Definition WsfTrackStateController.hpp:161
std::vector< WsfRandomVariable > mTimeToEvalByIndex
The time it takes to evaluate a state by state index.
Definition WsfTrackStateController.hpp:168
double mTransitionTime
Definition WsfTrackStateController.hpp:194
UtScriptData * mTrackVarPtr
Definition WsfTrackStateController.hpp:204
std::vector< int > mTracksInState
The number of tracks in a state, indexed by state index.
Definition WsfTrackStateController.hpp:177
UtScript * mOnTrackDropScriptPtr
Definition WsfTrackStateController.hpp:157
WsfScriptContext * mContextPtr
Definition WsfTrackStateController.hpp:156
bool mShowStateTransitions
Definition WsfTrackStateController.hpp:180
WsfTrackManager * mTrackManagerPtr
Definition WsfTrackStateController.hpp:159
WsfLocalTrack * mEvaluationTrackPtr
Definition WsfTrackStateController.hpp:200
std::map< WsfStringId, WsfRandomVariable > mTimeToEvalByName
Definition WsfTrackStateController.hpp:166
bool IsTurnedOn() const
Definition WsfTrackStateController.hpp:71
WsfPlatform * GetPlatform() const
Get the platform to which the controller is attached.
Definition WsfTrackStateController.hpp:56
std::map< WsfStringId, WsfRandomVariable > mEvalIntervalByName
Definition WsfTrackStateController.hpp:172
TrackStateMachine * mStateMachinePtr
Definition WsfTrackStateController.hpp:158
UtScriptData * mSignalVarPtr
Definition WsfTrackStateController.hpp:202
std::vector< WsfRandomVariable > mEvalIntervalByIndex
Evaluation interval by state index.
Definition WsfTrackStateController.hpp:174
double mEvaluationSimTime
Definition WsfTrackStateController.hpp:198
bool mIsTurnedOn
Definition WsfTrackStateController.hpp:182
WsfProcessor * mProcessorPtr
Definition WsfTrackStateController.hpp:154
UtCallbackHolder mCallbacks
Definition WsfTrackStateController.hpp:160
UtMappedList< WsfLocalTrackStatus, WsfTrackId > mTrackStatusList
Definition WsfTrackStateController.hpp:162
double mEvaluationInterval
Definition WsfTrackStateController.hpp:188
WsfTrackId mEvaluationTrackId
Definition WsfTrackStateController.hpp:199
void SetEvaluationInterval(double aEvaluationInterval)
Definition WsfTrackStateController.hpp:82
void SetTransitionTime(double aTransitionTime)
Definition WsfTrackStateController.hpp:86
WsfTrackStateController()
Definition WsfTrackStateController.cpp:104
An object that represents an 'track' (perception) of something.
Definition WsfTrack.hpp:120