22 using DtMmsiList = std::list<DtAisDataServiceInterface::DtMmsi>;
49 virtual bool init()
override;
58 virtual const char*
type()
const override;
64 virtual void tick()
override;
67 static void setMaxEntitiesCallback(
DtSimMessage * msg,
void * usr);
83 virtual void requestPhaseTick();
86 virtual void processTrackInfoPhaseTick();
89 virtual void ownershipAcquisitionPhaseTick();
92 virtual void creationPhaseTick();
96 virtual void deletionPhaseTick();
100 virtual void generalPhaseTick();
103 virtual void requestTracksInArea();
107 virtual bool processTrackAdditionEvents();
111 virtual bool processTrackRemovalEvents();
114 virtual void processTrackOwnershipResponse(
const DtMmsiSet& tracks);
117 virtual void updateKnownTracks(
const DtMmsiSet& tracks);
121 virtual void calculateAdditionAndRemovalTimes();
124 virtual bool requestTrackOwnership(DtMmsiSet& tracks);
127 virtual void releaseTrackOwnership(
const DtMmsiSet& tracks);
130 virtual bool createEntitiesForTracks();
134 virtual void monitorNewEntities();
137 virtual void processEntityDeleted(
const DtSimObject* entity);
140 virtual void processEntityPromoted(
const DtSimObject* entity);
143 void cleanupRemovedEntities();
146 void recordPromotedEntities();
149 virtual DtEntityType objectTypeForTrack(
const DtAisTrack& track)
const;
155 virtual bool calculateTrackPositionAtTime(
double simTime,
const DtAisTrack& track,
156 DtVector& worldLocation,
double& heading, DtVector& velocity,
160 virtual bool findLastBorderCrossingTime(
162 std::vector<DtVector>& areaBorder,
163 const DtMmsi trackId,
double& crossingTime);
166 virtual bool locationNear2IsInside(
const DtVector& location1,
167 const DtVector& location2,
174 virtual void trackPositionAtPoint(
const DtAisTrack& track,
175 const DtAisPathPointMap::const_iterator point,
176 DtVector& worldLocation,
double& heading, DtVector& worldVelocity)
const;
185 virtual bool approximateBorderCrossings(
double startTime,
const DtVector& startLocation,
186 double endTime,
const DtVector& endLocation, std::vector<DtVector>& areaBorder,
187 DtBorderCrossingList& borderLocations)
const;
190 virtual void markAllEntitiesForDeletion();
194 virtual void markEntitiesOutsideOfAreaForDeletion();
198 virtual void markExcessEntitiesForDeletion();
201 virtual void deleteMarkedEntities();
204 virtual bool isTimeToRequestTracks(
double simTime)
const;
207 virtual bool isTimeForTrackAdditionEvent(
double simTime)
const;
210 virtual bool isTimeForTrackRemovalEvent(
double simTime)
const;
213 virtual void logEntityCreationStatistics();
219 virtual void setPhase(ProcessingPhase);
std::vector< DtVector > myPreCreatePts
Definition: shipClutterAreaController.h:278
Instances of DtShipClutterAreaPSR are used to hold the checkpointable state data for the DtShipClutte...
Definition: shipClutterAreaPSR.h:15
DtMmsiSet myRemovedEntities
Definition: shipClutterAreaController.h:248
Definition: shipClutterAreaController.h:35
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
bool myDebugEnabled
The following are for debug purposes only.
Definition: shipClutterAreaController.h:277
Definition: shipClutterAreaController.h:33
DtTrackEventMap myTrackAdditionTimes
Definition: shipClutterAreaController.h:236
unsigned myNumberSkippedRecently
Definition: shipClutterAreaController.h:274
DtTime myDataEndTime
Definition: shipClutterAreaController.h:245
DtAisDataServiceInterface::DtMmsiSet DtMmsiSet
Definition: shipClutterAreaController.h:23
std::vector< DtVector > myPostEnterPts
Definition: shipClutterAreaController.h:287
Definition: shipClutterAreaController.h:37
virtual bool postAddComponentsInit() override
Calls enableTaskTypes()
Definition: shipClutterAreaController.h:32
int DtMmsi
Definition: aisDataServiceInterface.h:33
DtAisDataServiceInterface::DtAisDataJob::Ptr myAisOwnershipReq
Definition: shipClutterAreaController.h:267
virtual const char * type() const override=0
Returns a string identifies the class type of component. Type values are defined in compTypes...
std::vector< DtVector > myExitPts
Definition: shipClutterAreaController.h:284
virtual void registerTaskMsgCallbacks()
std::list< DtAisDataServiceInterface::DtMmsi > DtMmsiList
Definition: shipClutterAreaController.h:22
std::multimap< double, DtMmsi > DtTrackEventMap
Definition: shipClutterAreaController.h:27
virtual void preFirstTickInit()
This function can be overridden to initialize a component before it is ticked for the first time...
This class provides a base class for all controllers that are capable of executing a DtSimTask...
Definition: singleTaskControllerComponent.h:22
std::map< DtMmsi, boost::signals2::connection > EntityDeletionSignalMap
Definition: shipClutterAreaController.h:259
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:49
Definition: readerWriterRegistry.h:39
DtShipClutterAreaPSR * myProcessState
Definition: shipClutterAreaController.h:233
This class hold ship data that is obtained from AIS messages. It is generated initially by the proces...
Definition: aisTrack.h:24
tbb::spin_mutex myPromotedEntitiesMutex
Definition: shipClutterAreaController.h:250
ProcessingPhase
Definition: shipClutterAreaController.h:29
virtual bool taskVisualizationsActive() const override
Returns true if task visualizations are currently active for this component. Default behavior for tas...
DtAisDataServiceInterface::DtAisDataJob::Ptr myAisTrackReq
Requests to the AIS data manager.
Definition: shipClutterAreaController.h:266
DtMmsiSet myPromotedEntities
Definition: shipClutterAreaController.h:251
EntityDeletionSignalMap myEntityDeletionSignals
Definition: shipClutterAreaController.h:260
std::set< DtMmsi > DtMmsiSet
Definition: aisDataServiceInterface.h:34
std::vector< DtVector > myPostExitPts
Definition: shipClutterAreaController.h:283
std::vector< DtVector > myPreExitPts
Definition: shipClutterAreaController.h:282
virtual void updateTaskVisualizations()
Called to update task visualizations after every tick. Implemented by subclasses. ...
Definition: simComponent.h:443
virtual bool init() override
Calls setRadio()
std::shared_ptr< DtAisDataJob > Ptr
Definition: aisDataServiceInterface.h:43
tbb::spin_mutex myRemovedEntitiesMutex
Definition: shipClutterAreaController.h:247
Definition: coordSystem.h:54
std::pair< double, DtVector > DtBorderCrossing
Definition: shipClutterAreaController.h:25
File: simMsg.h.
Definition: simMessage.h:35
Class definition for one track created from AIS messages, i.e. the identifying information and time-s...
Definition: aisTrack.h:60
virtual void tick()
This gives the thread of control to the component. The component is ticked once each simulation from ...
Definition: shipClutterAreaController.h:34
std::set< DtEntityType > excludedModels
Definition: shipClutterAreaController.h:257
ProcessingPhase myPhase
Definition: shipClutterAreaController.h:269
std::list< DtUUID > myEntitiesToDelete
Definition: shipClutterAreaController.h:242
DtMmsiList myKnownTracksToProcess
Definition: shipClutterAreaController.h:235
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:96
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:89
DtMmsiList myTracksToCreate
Definition: shipClutterAreaController.h:241
DtMmsiSet myTracksToRequest
Definition: shipClutterAreaController.h:239
Represents a single simulation object in the exercise. Object may be VRF simulation, or non-VRF simulated, and may be simulated by the local sim engine, or by a remote sim engine. Only public (external) state of the object is available. All data is read-only. All access to data of the object is thread safe within the simulation frame.
Definition: simObject.h:80
const DtTaskControllerComponent & operator=(const DtTaskControllerComponent &orig)
assignment operator
tbb::spin_mutex myExcludedModelsMutex
A cache of object type patterns that are to be excluded. An empty set is also valid. This is compared against to limit the object types possible to be represented for a track.
Definition: shipClutterAreaController.h:256
std::vector< DtVector > myCreatePts
Definition: shipClutterAreaController.h:280
std::vector< DtVector > myPostCreatePts
Definition: shipClutterAreaController.h:279
std::list< DtUUID > myNewEntities
Definition: shipClutterAreaController.h:243
/******************************************************************************* ** Copyright (c) 202...
Definition: shipClutterAreaControllerDescriptor.h:18
DtTrackEventMap myDelayedAdditionTimes
Definition: shipClutterAreaController.h:238
bool myCreatingEntitiesFromSave
Definition: shipClutterAreaController.h:270
Definition: shipClutterAreaController.h:31
Definition: shipClutterAreaController.h:36
DtMmsiSet myTracksRequested
Definition: shipClutterAreaController.h:240
DtShipClutterAreaController is a controller that runs on an area tactical graphic to create and manag...
Definition: shipClutterAreaController.h:18
DtShipClutterAreaControllerDescriptor * myShipClutterAreaDescriptor
Definition: shipClutterAreaController.h:231
EntityPromotedSignalMap myEntityPromotedSignals
Definition: shipClutterAreaController.h:263
class DtLocalVertexList:
Definition: localVertexList.h:20
std::vector< DtVector > myEnterPts
Definition: shipClutterAreaController.h:288
std::vector< DtBorderCrossing > DtBorderCrossingList
sim time and world location to cross a border
Definition: shipClutterAreaController.h:26
DtTrackEventMap myTrackRemovalTimes
Definition: shipClutterAreaController.h:237
std::map< DtMmsi, boost::signals2::connection > EntityPromotedSignalMap
Definition: shipClutterAreaController.h:262
A locally simulated VRF object.
Definition: localObject.h:98
std::vector< DtVector > myPreEnterPts
Definition: shipClutterAreaController.h:286
unsigned myNumberCreatedRecently
For logging purposes only.
Definition: shipClutterAreaController.h:273