22 using DtMmsiList = std::list<DtAisDataServiceInterface::DtMmsi>;
48 virtual bool init()
override;
57 virtual const char*
type()
const override;
63 virtual void tick()
override;
66 static void setMaxEntitiesCallback(
DtSimMessage * msg,
void * usr);
82 virtual void requestPhaseTick();
85 virtual void processTrackInfoPhaseTick();
88 virtual void ownershipAcquisitionPhaseTick();
91 virtual void creationPhaseTick();
95 virtual void deletionPhaseTick();
99 virtual void generalPhaseTick();
102 virtual void requestTracksInArea();
106 virtual bool processTrackAdditionEvents();
110 virtual bool processTrackRemovalEvents();
113 virtual void processTrackOwnershipResponse(
const DtMmsiSet& tracks);
116 virtual void updateKnownTracks(
const DtMmsiSet& tracks);
120 virtual void calculateAdditionAndRemovalTimes();
123 virtual bool requestTrackOwnership(DtMmsiSet& tracks);
126 virtual void releaseTrackOwnership(
const DtMmsiSet& tracks);
129 virtual bool createEntitiesForTracks();
133 virtual void monitorNewEntities();
136 virtual void processEntityDeleted(
const DtSimObject* entity);
139 virtual void processEntityPromoted(
const DtSimObject* entity);
142 void cleanupRemovedEntities();
145 void recordPromotedEntities();
154 virtual bool calculateTrackPositionAtTime(
double simTime,
const DtAisTrack& track,
159 virtual bool findLastBorderCrossingTime(
161 std::vector<DtVector>& areaBorder,
162 const DtMmsi trackId,
double& crossingTime);
165 virtual bool locationNear2IsInside(
const DtVector& location1,
173 virtual void trackPositionAtPoint(
const DtAisTrack& track,
174 const DtAisPathPointMap::const_iterator point,
184 virtual bool approximateBorderCrossings(
double startTime,
const DtVector& startLocation,
185 double endTime,
const DtVector& endLocation, std::vector<DtVector>& areaBorder,
186 DtBorderCrossingList& borderLocations)
const;
189 virtual void markAllEntitiesForDeletion();
193 virtual void markEntitiesOutsideOfAreaForDeletion();
197 virtual void markExcessEntitiesForDeletion();
200 virtual void deleteMarkedEntities();
203 virtual bool isTimeToRequestTracks(
double simTime)
const;
206 virtual bool isTimeForTrackAdditionEvent(
double simTime)
const;
209 virtual bool isTimeForTrackRemovalEvent(
double simTime)
const;
212 virtual void logEntityCreationStatistics();
218 virtual void setPhase(ProcessingPhase);
std::vector< DtVector > myPreCreatePts
Definition: shipClutterAreaController.h:277
Instances of DtShipClutterAreaPSR are used to hold the checkpointable state data for the DtShipClutte...
Definition: shipClutterAreaPSR.h:15
DtMmsiSet myRemovedEntities
Definition: shipClutterAreaController.h:247
Definition: shipClutterAreaController.h:34
#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:276
Definition: shipClutterAreaController.h:32
DtTrackEventMap myTrackAdditionTimes
Definition: shipClutterAreaController.h:235
unsigned myNumberSkippedRecently
Definition: shipClutterAreaController.h:273
DtTime myDataEndTime
Definition: shipClutterAreaController.h:244
DtAisDataServiceInterface::DtMmsiSet DtMmsiSet
Definition: shipClutterAreaController.h:23
std::vector< DtVector > myPostEnterPts
Definition: shipClutterAreaController.h:286
Definition: shipClutterAreaController.h:36
virtual bool postAddComponentsInit() override
Calls enableTaskTypes()
int DtMmsi
Definition: aisDataServiceInterface.h:33
DtAisDataServiceInterface::DtAisDataJob::Ptr myAisOwnershipReq
Definition: shipClutterAreaController.h:266
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:283
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:258
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:232
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:249
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:265
DtMmsiSet myPromotedEntities
Definition: shipClutterAreaController.h:250
EntityDeletionSignalMap myEntityDeletionSignals
Definition: shipClutterAreaController.h:259
std::set< DtMmsi > DtMmsiSet
Definition: aisDataServiceInterface.h:34
std::vector< DtVector > myPostExitPts
Definition: shipClutterAreaController.h:282
Definition: objectType.h:27
std::vector< DtVector > myPreExitPts
Definition: shipClutterAreaController.h:281
virtual void updateTaskVisualizations()
Called to update task visualizations after every tick. Implemented by subclasses. ...
Definition: simComponent.h:437
virtual bool init() override
Calls setRadio()
std::shared_ptr< DtAisDataJob > Ptr
Definition: aisDataServiceInterface.h:43
tbb::spin_mutex myRemovedEntitiesMutex
Definition: shipClutterAreaController.h:246
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:33
ProcessingPhase myPhase
Definition: shipClutterAreaController.h:268
std::set< DtObjectType > excludedModels
Definition: shipClutterAreaController.h:256
std::list< DtUUID > myEntitiesToDelete
Definition: shipClutterAreaController.h:241
DtMmsiList myKnownTracksToProcess
Definition: shipClutterAreaController.h:234
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:94
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:91
DtMmsiList myTracksToCreate
Definition: shipClutterAreaController.h:240
DtMmsiSet myTracksToRequest
Definition: shipClutterAreaController.h:238
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:88
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:255
std::vector< DtVector > myCreatePts
Definition: shipClutterAreaController.h:279
std::vector< DtVector > myPostCreatePts
Definition: shipClutterAreaController.h:278
std::list< DtUUID > myNewEntities
Definition: shipClutterAreaController.h:242
/******************************************************************************* ** Copyright (c) 202...
Definition: shipClutterAreaControllerDescriptor.h:18
DtTrackEventMap myDelayedAdditionTimes
Definition: shipClutterAreaController.h:237
bool myCreatingEntitiesFromSave
Definition: shipClutterAreaController.h:269
Definition: shipClutterAreaController.h:31
Definition: shipClutterAreaController.h:35
DtMmsiSet myTracksRequested
Definition: shipClutterAreaController.h:239
DtShipClutterAreaController is a controller that runs on an area tactical graphic to create and manag...
Definition: shipClutterAreaController.h:18
DtShipClutterAreaControllerDescriptor * myShipClutterAreaDescriptor
Definition: shipClutterAreaController.h:230
EntityPromotedSignalMap myEntityPromotedSignals
Definition: shipClutterAreaController.h:262
class DtLocalVertexList:
Definition: localVertexList.h:20
std::vector< DtVector > myEnterPts
Definition: shipClutterAreaController.h:287
std::vector< DtBorderCrossing > DtBorderCrossingList
sim time and world location to cross a border
Definition: shipClutterAreaController.h:26
DtTrackEventMap myTrackRemovalTimes
Definition: shipClutterAreaController.h:236
std::map< DtMmsi, boost::signals2::connection > EntityPromotedSignalMap
Definition: shipClutterAreaController.h:261
A locally simulated VRF object. Holds all internal and external data for the object, and provides access to both the current frame and next frame state data for the object. All current frame data is read-only, and next-frame data can be written to. No thread safety guarantees are made on this object during the simulation frame and it should only be accessed by the thread that is simulating the object.
Definition: localObject.h:86
std::vector< DtVector > myPreEnterPts
Definition: shipClutterAreaController.h:285
unsigned myNumberCreatedRecently
For logging purposes only.
Definition: shipClutterAreaController.h:272