VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions
DtShipClutterAreaController Class Reference

DtShipClutterAreaController is a controller that runs on an area tactical graphic to create and manage clutter entities.

Inheritance diagram for DtShipClutterAreaController:
Inheritance graph
[legend]

Public Types

enum  ProcessingPhase {
  Idle, InitializationPhase, RequestTrackInfoPhase, ProcessTrackInfoPhase,
  OwnershipAcquisitionPhase, CreationPhase, DeletionPhase, GeneralPhase
}
 
using DtMmsiList = std::list< DtAisDataServiceInterface::DtMmsi >
 
using DtMmsiSet = DtAisDataServiceInterface::DtMmsiSet
 
using DtMmsi = DtAisDataServiceInterface::DtMmsi
 
using DtBorderCrossing = std::pair< double, DtVector >
 
using DtBorderCrossingList = std::vector< DtBorderCrossing >
 
using DtTrackEventMap = std::multimap< double, DtMmsi >
 
- Public Types inherited from DtTaskControllerComponent
enum  AcceptLevel { AcceptLevel_Accept = 0, AcceptLevel_Partial = 1, AcceptLevel_Error = 2, AcceptLevel_NoAccept = 99 }
 
- Public Types inherited from DtReaderWriter
typedef std::vector
< DtSymbolString
aliasContainer
 
typedef std::vector
< DtSymbolString >::iterator 
aliasIter
 
typedef std::vector
< DtSymbolString >
::const_iterator 
aliasConstIter
 
typedef std::vector< DtFilename > SearchPaths
 
typedef std::pair
< DtSymbolString, DtString
DtVariableNameType
 
typedef DtReaderWriterFactory *(* DtReaderWriterFactoryCreatorFcn )()
 

Public Member Functions

 DtShipClutterAreaController (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 
virtual ~DtShipClutterAreaController () override
 
virtual bool init () override
 
virtual bool postAddComponentsInit () override
 
virtual void preFirstTickInit () override
 
virtual const chartype () const override
 
virtual void registerTaskMsgCallbacks () override
 
virtual void tick () override
 
virtual void processSetMaxEntities (DtSimMessage *msg)
 
virtual bool taskVisualizationsActive () const override
 
- Public Member Functions inherited from DtSingleTaskControllerComponent
 DtSingleTaskControllerComponent (const DtString &name, DtLocalObject *owner, DtSimulationServices *simServices, DtComponentDescriptor *compDesc=nullptr, DtReaderWriterRegistry *parentRegistry=nullptr)
 
virtual ~DtSingleTaskControllerComponent () override
 
virtual void postTick () override
 
virtual bool beginProcessingTask (const DtTaskMessage &task, DtSimTaskStatePtr taskState) override
 
virtual void taskNotify (const DtSimTask &task) override
 
virtual void taskComplete (bool success=true)
 
virtual void clearTask () override
 
virtual void suspendTask ()
 
virtual int sendSubtask (DtSimTask &task)
 
virtual void clearSubtask (int subtaskId)
 
virtual void addPendingSubtaskId (int subtaskId)
 
virtual bool findPendingSubtaskId (int subtaskId)
 
virtual bool isSubtasked () const
 
virtual void removePendingSubtaskId (int subtaskId)
 
virtual void removeAllPendingSubtaskIds ()
 
virtual std::vector< intcurrentPendingSubstaskIds () const
 
virtual DtSubtaskStatusEntrysubtaskStatus (int subtaskId)
 
virtual void clearCurrentTaskMessage ()
 
virtual DtTaskMessagecurrentTaskMessage () const
 
virtual DtSimTaskStatePtr currentTaskState () const
 
virtual bool decideToGiveUpTask () const
 
virtual void giveUpTask ()
 
virtual bool taskActive (int taskId) const override
 
virtual bool clearTopLevelTasks () override
 
virtual void clearConflictingTopLevelTasks (const DtSimTaskMessageType &conflictType) override
 
virtual void clearTasksByType (const DtSimTaskMessageType &taskType) override
 
virtual void clearTaskById (int taskId) override
 
virtual DtSuspendedTaskInfosuspendTaskById (int taskId) override
 
virtual DtSuspendedTaskInfosuspendSubtaskById (int taskId, int subtaskId) override
 
virtual std::list
< DtTaskMessage * > 
currentTaskMessages () const override
 
virtual DtTaskWithTaskStateListPtr topLevelTasks () const override
 
virtual void disable () override
 
virtual void updateImgui () override
 
virtual void initializeTaskInformationStateProperty (const DtSimTaskMessageType &taskType)
 
virtual void updateCurrentTaskInformationStatusProperty (const DtString &status)
 
virtual DtString taskInformationStatusPropertyValue (const DtSimTaskMessageType &taskType) const
 
virtual DtString currentTaskInformationStatusPropertyValue () const
 
virtual DtRwPropertiesStructuretaskInformationProperty (const DtSimTaskMessageType &taskType)
 
virtual DtRwPropertiesStructurecurrentTaskInformationProperty ()
 
- Public Member Functions inherited from DtTaskControllerComponent
 DtTaskControllerComponent (const DtString &name, DtLocalObject *owner, DtSimulationServices *simServices, DtComponentDescriptor *compDesc=nullptr, DtReaderWriterRegistry *parentRegistry=nullptr)
 
virtual ~DtTaskControllerComponent () override
 
virtual AcceptLevel acceptTask (const DtTaskMessage &task)
 
virtual bool showCurrentTaskInGui () const
 
virtual void setRadio (DtSimRadio *radio) override
 
virtual void addTaskProcessorCallback (const DtSimTaskMessageType &taskType, DtTaskMessageCallbackFcn fcn, void *usr)
 
virtual void addTaskProcessorCallback (const DtSimTaskMessageType &taskType, DtMessageCallbackFcn fcn, void *usr)
 
virtual void removeTaskProcessorCallback (const DtSimTaskMessageType &taskType, DtMessageCallbackFcn fcn, void *usr)
 
virtual void removeTaskProcessorCallback (const DtSimTaskMessageType &taskType, DtTaskMessageCallbackFcn fcn, void *usr)
 
virtual void enable () override
 
virtual void sendTaskCanceled (DtTaskMessage *taskMsg)
 
virtual void setTasked (bool tasked)
 
virtual bool tasked () const
 
- Public Member Functions inherited from DtControllerComponent
 DtControllerComponent (const DtString &name, DtLocalObject *owner, DtSimulationServices *simServices, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 
virtual ~DtControllerComponent () override
 
virtual DtSimRadioradio ()
 
virtual void enableTaskTypes ()
 
virtual void enableScriptedTask (const DtString &scriptId)
 
virtual void disableTaskTypes ()
 
- Public Member Functions inherited from DtSimComponent
 DtSimComponent (const DtString &name, DtLocalObject *owner, DtSimulationServices *simServices, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 
virtual ~DtSimComponent () override
 
virtual void setParentSystem (DtComponentSystem *system)
 
DtComponentSystemparentSystem () const
 
virtual void registerAttributeFunctions ()
 
virtual void timedTick ()
 
virtual void setMinTickPeriod (double minTickPeriod, double minTickPeriodVariance)
 
virtual void setupFirstTickTime ()
 
virtual void setEntity (DtLocalObject *entity)
 
virtual DtSimComponentnextComponent ()
 
virtual DtSimComponentprevComponent ()
 
virtual void setListItem (DtListItem *item)
 
virtual DtListItem * listItem ()
 
virtual void putData (std::string &fp, int indentLevel=0) override
 
virtual DtlObjPtr getData (DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths, const DtVariableBindingsList &variableBindings) override
 
virtual void addInputPort (DtInputPort *port)
 
virtual void removeInputPort (DtInputPort *port)
 
virtual DtInputPortlookupInputPort (const DtString &portName)
 
virtual DtList inputPortList () const
 
virtual void addOutputPort (DtOutputPort *port)
 
virtual void removeOutputPort (DtOutputPort *port)
 
virtual DtOutputPortlookupOutputPort (const DtString &portName)
 
virtual DtList outputPortList () const
 
virtual void addInputPortGroup (DtInputPortGroup *group)
 
virtual void removeInputPortGroup (DtInputPortGroup *group)
 
virtual DtInputPortGrouplookupInputPortGroup (const DtString &groupName)
 
virtual DtList inputPortGroupList () const
 
virtual void addOutputPortGroup (DtOutputPortGroup *group)
 
virtual void removeOutputPortGroup (DtOutputPortGroup *group)
 
virtual DtOutputPortGrouplookupOutputPortGroup (const DtString &groupName)
 
virtual DtList outputPortGroupList () const
 
virtual int priority () const
 
virtual void setPriority (int priority)
 
double dT () const
 
virtual void setDT (double deltaT)
 
virtual void setComponentDescriptor (DtComponentDescriptor *componentDescriptor)
 
virtual const
DtComponentDescriptor
componentDescriptor () const
 
virtual bool tickWhileDestroyed () const
 
DtVrfProcessStateRepositoryManagerpsrManager ()
 
virtual const DtSymbolStringcomponentFullName () const
 
DtPhysicalWorldphysicalWorld ()
 
const DtPhysicalWorldphysicalWorld () const
 
const DtAttachedTerrainterrainAttachedTo () const
 
DtLocalObjectentity ()
 
const DtLocalObjectentity () const
 
DtSimulationServicessimulationServices ()
 
const DtSimulationServicessimulationServices () const
 
const Coordinate_SystemcoordinateSystem () const
 
virtual void isClutterChanged ()
 
virtual bool taskVisualizationsEnabled () const
 
makVrf::DtTaskVisualizationMaptaskVisualizations ()
 
virtual bool debugActive () const
 
virtual bool isEnabled ()
 
virtual void setIsEnabled (bool yesNo)
 
virtual DtOutputStream & objectConsoleDebug (const DtString &channel="") const
 
virtual DtOutputStream & objectConsoleVerbose (const DtString &channel="") const
 
virtual DtOutputStream & objectConsoleInfo (const DtString &channel="") const
 
virtual DtOutputStream & objectConsoleWarn (const DtString &channel="") const
 
virtual DtOutputStream & objectConsoleError (const DtString &channel="") const
 
virtual int notifyLevel () const
 
virtual DtSimResourceManagerresourceManager ()
 
virtual const
DtSimResourceManager
resourceManager () const
 
VRF4API_METHOD const
DtSimulationServices
simManager () const
 
- Public Member Functions inherited from DtReaderWriter
 DtReaderWriter ()
 
 DtReaderWriter (const DtString &name, DtReaderWriterRegistry *parentRegistry=NULL, bool readonly=false)
 
 DtReaderWriter (const DtSymbolString &name, DtReaderWriterRegistry *parentRegistry=NULL, bool readonly=false)
 
 DtReaderWriter (const DtString &name, const DtReaderWriter &orig, DtReaderWriterRegistry *parentRegistry=NULL)
 
 DtReaderWriter (const DtSymbolString &name, const DtReaderWriter &orig, DtReaderWriterRegistry *parentRegistry=NULL)
 
 DtReaderWriter (const DtReaderWriter &, DtReaderWriterRegistry *parentRegistry=NULL)
 
const DtReaderWriteroperator= (const DtReaderWriter &orig)
 
bool operator== (const DtReaderWriter &) const
 
bool operator!= (const DtReaderWriter &rhs) const
 
virtual ~DtReaderWriter ()
 
virtual void putSelf (std::string &fp, int indentLevel=0, bool writeUnspecified=false, const DtFilename &path=DtFilename::nullFilename())
 
virtual void postPutSelf ()
 
virtual void prePutSelf ()
 
virtual void getSelf (DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &variableBindings=nullVariableReference())
 
virtual void postGetSelf ()
 
virtual void preGetSelf ()
 
virtual void writeSelf (std::string &fp, int indentLevel=0, bool writeUnspecified=false, const DtFilename &path=DtFilename::nullFilename())
 
virtual DtSymbolString name () const
 
virtual void addAlias (const DtSymbolString &alias)
 
virtual void addAlias (const DtString &alias)
 
virtual bool hasAlias (const DtSymbolString &alias)
 
virtual const aliasContaineraliases () const
 
virtual void setReadonly (bool flag)
 
bool isReadonly () const
 
virtual void reset ()
 
virtual int alignment () const
 
virtual bool variableIsBound () const
 
virtual void unbindVariable ()
 
virtual void setName (const DtString &)
 
virtual const charreaderWriterType () const
 
virtual const charxmlType () const
 
virtual DtString prettyPrint () const
 
std::string debugText () const
 
virtual void bindVariables (DtVariableBindingsList variableBindings)
 
virtual std::list
< DtVariableNameType
unboundVariables () const
 
bool invalid () const
 
virtual bool hasChild (const DtReaderWriter *p) const
 
virtual bool hasVariableReference () const
 
virtual void bindLocalVariables (const DtVariableBindingsList &variableBindings)
 
virtual void recordUpdateTime () const
 
virtual bool changedSinceLastChecked ()
 
virtual bool peekChangedSinceLastChecked () const
 
virtual void setValueSpecified (bool specified, bool recurse=false)
 
virtual bool valueSpecified () const
 
virtual bool isVariableReference () const
 
virtual void setIsVariableReference (bool value)
 
virtual void clearAllVariableReferenceFlags ()
 
virtual DtSymbolString variableName () const
 
virtual void setVariableName (const DtSymbolString variableName)
 
virtual const DtReaderWriterdefaultRWValue () const
 
virtual DtReaderWriterdefaultRWValue ()
 
virtual void setDefaultRWValue (DtReaderWriter *)
 
virtual bool checkAndSetDefaultRWValue (DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &variableBindings=nullVariableReference())
 
const DtReaderWriterRegistryregistry () const
 
DtReaderWriterRegistryregistry ()
 
virtual DtPropertyInterfaceproperty ()
 
virtual const DtPropertyInterfaceproperty () const
 
virtual DtString toXml () const
 
virtual DtRwVariableBindingsgenerateVariableBindings () const
 
virtual bool toXml (const DtFilename &) const
 
virtual bool fromXml (const DtString &)
 
virtual bool fromXmlFile (const DtFilename &)
 
virtual void putSelf (DtEnvironmentSP, DtEnvValueSP parent) const
 
virtual void putData (DtEnvironmentSP, DtEnvValueSP value) const
 
virtual void putVariableReference (DtEnvironmentSP, DtEnvValueSP value) const
 
virtual void getSelf (const DtEnvironmentSP, const DtEnvValueSP root, const SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &bindings=DtVariableBindingsList())
 
virtual void getData (const DtEnvironmentSP, const DtEnvValueSP, const SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &bindings=DtVariableBindingsList())
 
virtual void unrecognizedItem (const DtEnvironmentSP env, const DtEnvValueSP root, const SearchPaths &searchPaths, const DtVariableBindingsList &varBindings)
 
virtual void getVariableReference (DtEnvironmentSP, DtEnvValueSP value)
 

Static Public Member Functions

static void setMaxEntitiesCallback (DtSimMessage *msg, void *usr)
 
static DtSimComponentcreator (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 
- Static Public Member Functions inherited from DtTaskControllerComponent
static void deprecatedTaskProcessorCallbackAdapter (DtSimMessage *msg, void *usr, DtSimTaskStatePtr taskState)
 
- Static Public Member Functions inherited from DtSimComponent
static DtSimComponentFactoryfactory ()
 
static void setFactory (DtSimComponentFactory *factory)
 
static DtSimComponentcreateComponent (const DtString &name, const DtString &type, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentSystem *parentSystem, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 
static void addSimComponentCreatorFcn (const DtString &type, DtSimComponentCreatorFcn fcn)
 
static VRF4API_METHOD
DtSimComponent
MarkThreadSafe (DtSimComponent *comp)
 
- Static Public Member Functions inherited from DtReaderWriter
static void putIndent (std::string &fp, int indentLevel)
 
static const
DtVariableBindingsList
nullVariableReference ()
 
static void setPostGetSelfCallback (DtGetSelfCallbackFcn fcn, void *usrData)
 
static void setPrePutSelfCallback (DtPutSelfCallbackFcn fcn, void *usrData)
 
static void setPutIndent (bool)
 
static bool putIndent ()
 
static const chartheXmlType ()
 
static const DtFilename & appPath ()
 
static void setFactoryCreatorFunction (DtReaderWriterFactoryCreatorFcn fcn)
 
static void createReaderWriterFactory ()
 
static void cleanupFactory ()
 
static DtReaderWriterFactoryfactory ()
 
static void setOutputStream (DtOutputStream *stream)
 
static DtOutputStream & outputStream ()
 
static DtReaderWritercreateFromXmlFile (const DtFilename &, bool createAsProperty=false)
 
static DtReaderWritercreateFromXml (const DtString &, bool createAsProperty=false)
 
static DtReaderWritercreateFromEnvironment (DtEnvironmentSP, bool createAsProperty=false)
 
static DtString getAttribute (DtEnvironmentSP env, const DtString &name, DtEnvValueSP root)
 

Protected Types

using EntityDeletionSignalMap = std::map< DtMmsi, boost::signals2::connection >
 
using EntityPromotedSignalMap = std::map< DtMmsi, boost::signals2::connection >
 
- Protected Types inherited from DtTaskControllerComponent
typedef std::pair
< DtTaskMessageCallbackFcn,
void * > 
DtTaskCallbackMapPair
 
typedef std::map
< DtSimTaskMessageType,
DtTaskCallbackMapPair
DtTaskCallbackMap
 
- Protected Types inherited from DtSimComponent
typedef std::map< DtString,
DtInputPort * > 
DtInputPortMap
 
typedef std::map< DtString,
DtOutputPort * > 
DtOutputPortMap
 
typedef std::map< DtString,
DtInputPortGroup * > 
DtInputPortGroupMap
 
typedef std::map< DtString,
DtOutputPortGroup * > 
DtOutputPortGroupMap
 

Protected Member Functions

bool createPSR ()
 
virtual void requestPhaseTick ()
 
virtual void processTrackInfoPhaseTick ()
 
virtual void ownershipAcquisitionPhaseTick ()
 
virtual void creationPhaseTick ()
 
virtual void deletionPhaseTick ()
 
virtual void generalPhaseTick ()
 
virtual void requestTracksInArea ()
 
virtual bool processTrackAdditionEvents ()
 
virtual bool processTrackRemovalEvents ()
 
virtual void processTrackOwnershipResponse (const DtMmsiSet &tracks)
 
virtual void updateKnownTracks (const DtMmsiSet &tracks)
 
virtual void calculateAdditionAndRemovalTimes ()
 
virtual bool requestTrackOwnership (DtMmsiSet &tracks)
 
virtual void releaseTrackOwnership (const DtMmsiSet &tracks)
 
virtual bool createEntitiesForTracks ()
 
virtual void monitorNewEntities ()
 
virtual void processEntityDeleted (const DtSimObject *entity)
 
virtual void processEntityPromoted (const DtSimObject *entity)
 
void cleanupRemovedEntities ()
 
void recordPromotedEntities ()
 
virtual DtEntityType objectTypeForTrack (const DtAisTrack &track) const
 
virtual bool calculateTrackPositionAtTime (double simTime, const DtAisTrack &track, DtVector &worldLocation, double &heading, DtVector &velocity, const DtPathPoint **previousPathPoint) const
 
virtual bool findLastBorderCrossingTime (const DtPathPoint &pt1, const DtPathPoint &pt2, std::vector< DtVector > &areaBorder, const DtMmsi trackId, double &crossingTime)
 
virtual bool locationNear2IsInside (const DtVector &location1, const DtVector &location2, const DtLocalVertexList &areaVertices, Coordinate_System *coordSys)
 
virtual void trackPositionAtPoint (const DtAisTrack &track, const DtAisPathPointMap::const_iterator point, DtVector &worldLocation, double &heading, DtVector &worldVelocity) const
 
virtual bool approximateBorderCrossings (double startTime, const DtVector &startLocation, double endTime, const DtVector &endLocation, std::vector< DtVector > &areaBorder, DtBorderCrossingList &borderLocations) const
 
virtual void markAllEntitiesForDeletion ()
 
virtual void markEntitiesOutsideOfAreaForDeletion ()
 
virtual void markExcessEntitiesForDeletion ()
 
virtual void deleteMarkedEntities ()
 
virtual bool isTimeToRequestTracks (double simTime) const
 
virtual bool isTimeForTrackAdditionEvent (double simTime) const
 
virtual bool isTimeForTrackRemovalEvent (double simTime) const
 
virtual void logEntityCreationStatistics ()
 
virtual void updateTaskVisualizations () override
 
virtual void setPhase (ProcessingPhase)
 
- Protected Member Functions inherited from DtSingleTaskControllerComponent
virtual void clearPendingSubtasks ()
 
virtual void clearSubtasksByType (const DtSimTaskMessageType &taskType)
 
virtual void cleanupInactiveSubtaskStatus ()
 
- Protected Member Functions inherited from DtTaskControllerComponent
virtual void suspendSubtasksOfTask (int taskId, DtSuspendedTaskInfo *suspendInfo)
 
virtual void suspendSubtaskOfTask (int taskId, int subtaskId, DtSuspendedTaskInfo *suspendInfo)
 
virtual DtSimTaskMessageType remapScriptId (const DtSimTaskMessageType &) const
 
- Protected Member Functions inherited from DtControllerComponent
 DtControllerComponent ()
 
 DtControllerComponent (const DtControllerComponent &orig)
 
const DtControllerComponentoperator= (const DtControllerComponent &orig)
 
virtual void onRestore () override
 
virtual void initializeTargetingControlTableFromDescriptor (const DtReaderWriter *)
 
virtual void sendCapableSetsAndTasks ()
 
- Protected Member Functions inherited from DtSimComponent
virtual void setupTimedTickLogic (double minTickPeriod, double minTickPeriodVariance)
 
virtual double computeCurrentTime ()
 
bool testInvariant () const
 
virtual bool createPortGroups ()
 
virtual bool createPorts ()
 
DtVrfProcessStateRepositorycreateComponentPsr (const DtString &defaultPsrType, const DtString &defaultPsrName, bool useDescriptorParams=true)
 
virtual void destroyTaskVisualizations ()
 
virtual void destroyTaskVisualization (const DtString &name)
 
virtual
makVrf::DtPointTaskVisualizationPtr 
pointTaskVisualization (const DtString &name)
 
virtual
makVrf::DtLineTaskVisualizationPtr 
lineTaskVisualization (const DtString &name)
 
virtual
makVrf::DtAreaTaskVisualizationPtr 
areaTaskVisualization (const DtString &name)
 
virtual
makVrf::DtTextTaskVisualizationPtr 
textTaskVisualization (const DtString &name)
 
double calculateNextTaskVisTickTime () const
 
DtVrfObjectStateRepositorylocalStateRepository ()
 
const DtVrfObjectStateRepositorylocalStateRepository () const
 
DtPropertyInterfacecachedNextFrameStateProperty (DtPropertyInterface **prop, const DtString &propName)
 
template<typename ValType >
void setCachedNextFrameStatePropertyValue (DtPropertyInterface **prop, const DtString &propName, ValType value)
 
const DtPropertyInterfacecachedCurrentFrameStateProperty (const DtPropertyInterface **prop, const DtString &propName) const
 
template<typename ValType >
bool getCachedCurrentFrameStatePropertyValue (const DtPropertyInterface **prop, const DtString &propName, ValType &value) const
 
void addSimObjectPredicateCallback (DtSimObjectReference, DtVrfObjectPredicateCallbackFunction function, const DtVrfObjectPredicate &predicate, DtTime evaluationPeriod=0, void *userData=0)
 
void removeSimObjectPredicateCallback (const DtSimObject *, DtVrfObjectPredicateCallbackFunction function, const DtVrfObjectPredicate &predicate, DtTime evaluationPeriod=0, void *userData=0)
 
void invokeSimObjectPredicateCallbacks ()
 
virtual void clearPredicateCallbacks ()
 
- Protected Member Functions inherited from DtReaderWriter
virtual void bindToRwAsVariable (const DtReaderWriter *rw)
 

Protected Attributes

DtShipClutterAreaControllerDescriptormyShipClutterAreaDescriptor
 
DtShipClutterAreaPSRmyProcessState
 
DtMmsiList myKnownTracksToProcess
 
DtTrackEventMap myTrackAdditionTimes
 
DtTrackEventMap myTrackRemovalTimes
 
DtTrackEventMap myDelayedAdditionTimes
 
DtMmsiSet myTracksToRequest
 
DtMmsiSet myTracksRequested
 
DtMmsiList myTracksToCreate
 
std::list< DtUUIDmyEntitiesToDelete
 
std::list< DtUUIDmyNewEntities
 
DtTime myDataEndTime
 
tbb::spin_mutex myRemovedEntitiesMutex
 
DtMmsiSet myRemovedEntities
 
tbb::spin_mutex myPromotedEntitiesMutex
 
DtMmsiSet myPromotedEntities
 
tbb::spin_mutex myExcludedModelsMutex
 
std::set< DtEntityType > excludedModels
 
EntityDeletionSignalMap myEntityDeletionSignals
 
EntityPromotedSignalMap myEntityPromotedSignals
 
DtAisDataServiceInterface::DtAisDataJob::Ptr myAisTrackReq
 
DtAisDataServiceInterface::DtAisDataJob::Ptr myAisOwnershipReq
 
ProcessingPhase myPhase
 
bool myCreatingEntitiesFromSave
 
unsigned myNumberCreatedRecently
 
unsigned myNumberSkippedRecently
 
bool myDebugEnabled
 
std::vector< DtVector > myPreCreatePts
 
std::vector< DtVector > myPostCreatePts
 
std::vector< DtVector > myCreatePts
 
std::vector< DtVector > myPreExitPts
 
std::vector< DtVector > myPostExitPts
 
std::vector< DtVector > myExitPts
 
std::vector< DtVector > myPreEnterPts
 
std::vector< DtVector > myPostEnterPts
 
std::vector< DtVector > myEnterPts
 
- Protected Attributes inherited from DtTaskControllerComponent
DtTaskCallbackMap myTaskCallbackMap
 
std::list
< DtTaskProcessorCallbackInfo * > 
myTaskProcessorCallbackInfoList
 
bool myTaskIsRunning
 
- Protected Attributes inherited from DtControllerComponent
DtSimRadiomyRadio
 
bool myTaskTypesEnabled
 
bool myInitialized
 
- Protected Attributes inherited from DtSimComponent
DtLocalObjectmyEntity
 
DtComponentSystemmySystem
 
DtListItem * myListItem
 
DtInputPortMap myInputPortList
 
DtOutputPortMap myOutputPortList
 
DtInputPortGroupMap myInputPortGroupList
 
DtOutputPortGroupMap myOutputPortGroupList
 
int myPriority
 
double myLastTickSimTime
 
std::unique_ptr< DtTimedTickLogicmyTimedTickLogic
 
double myDT
 
bool myIsEnabled
 
bool myFirstTick
 
const DtComponentDescriptormyComponentDescriptor
 
std::list
< DtVrfProcessStateRepository * > 
myComponentPsrs
 
makVrf::DtTaskVisualizationMap myTaskVisualizations
 
double myNextTaskVisTickTime
 
DtSymbolString myFullComponentName
 
DtSimulationServicesmySimServices
 
DtPredicateCallbackManagermyPredicateCallbackManager
 
boost::signals2::scoped_connection myIsClutterChangedConnection
 
bool myLocalDebug
 
- Protected Attributes inherited from DtReaderWriter
const DtSymbolString myName
 
DtReaderWriterRegistry myRegistry
 
DtReaderWriterRegistrymyParentRegistry
 
bool myValueSpecified
 
bool myReadOnlyFlag
 
bool myIsVariableReference
 
DtSymbolString myVariableName
 
bool myVariableIsBound
 
DtReaderWritermyDefaultValue
 
aliasContainer myAliases
 
bool myInvalid
 
bool myChangedFlag
 

Private Member Functions

 DtShipClutterAreaController ()
 
 DtShipClutterAreaController (const DtShipClutterAreaController &orig)
 
DtShipClutterAreaControlleroperator= (const DtShipClutterAreaController &orig)
 

Additional Inherited Members

- Public Attributes inherited from DtSingleTaskControllerComponent
const DtString TaskStatusRunning = "TaskRunning"
 
const DtString TaskStatusNotActive = "TaskNotActive"
 
- Static Protected Attributes inherited from DtSimComponent
static DtSimComponentFactorymyFactory
 
- Static Protected Attributes inherited from DtReaderWriter
static DtString theUnspecifiedValue
 
static DtGetSelfCallbackInfo thePostGetSelfCallback
 
static DtPutSelfCallbackInfo thePrePutSelfCallback
 
static const DtVariableBindingsList theEmptyVariableBindingsList
 
static bool theCreatorFcnSet
 
static DtReaderWriterFactorytheFactory
 
static
DtReaderWriterFactoryCreatorFcn 
theFactoryCreatorFcn
 
static bool thePutIndent
 
static DtOutputStream * theOutputStream
 

Member Typedef Documentation

sim time and world location to cross a border

using DtShipClutterAreaController::EntityDeletionSignalMap = std::map<DtMmsi, boost::signals2::connection>
protected
using DtShipClutterAreaController::EntityPromotedSignalMap = std::map<DtMmsi, boost::signals2::connection>
protected

Member Enumeration Documentation

Enumerator
Idle 
InitializationPhase 
RequestTrackInfoPhase 
ProcessTrackInfoPhase 
OwnershipAcquisitionPhase 
CreationPhase 
DeletionPhase 
GeneralPhase 

Constructor & Destructor Documentation

DtShipClutterAreaController::DtShipClutterAreaController ( const DtString name,
DtLocalObject owner,
DtSimulationServices simManager,
DtComponentDescriptor desc = 0,
DtReaderWriterRegistry parentRegistry = 0 
)

Constructor.

virtual DtShipClutterAreaController::~DtShipClutterAreaController ( )
overridevirtual

Destructor.

DtShipClutterAreaController::DtShipClutterAreaController ( )
private

Not Implemented.

DtShipClutterAreaController::DtShipClutterAreaController ( const DtShipClutterAreaController orig)
private

Not Implemented.

Member Function Documentation

virtual bool DtShipClutterAreaController::init ( )
overridevirtual

Initializes the controller and creates the PSR.

Reimplemented from DtControllerComponent.

virtual bool DtShipClutterAreaController::postAddComponentsInit ( )
overridevirtual

Initializes the maximum number of entities to create.

Reimplemented from DtControllerComponent.

virtual void DtShipClutterAreaController::preFirstTickInit ( )
overridevirtual

Ensures that on scenario load we register for deletion of any our managed ships.

Reimplemented from DtSimComponent.

virtual const char* DtShipClutterAreaController::type ( ) const
overridevirtual
Returns
DtClutterAreaControllerType

Implements DtTaskControllerComponent.

virtual void DtShipClutterAreaController::registerTaskMsgCallbacks ( )
overridevirtual

Registers callbacks for task messages.

Reimplemented from DtTaskControllerComponent.

virtual void DtShipClutterAreaController::tick ( )
overridevirtual

This component's simulation tick.

Reimplemented from DtSimComponent.

static void DtShipClutterAreaController::setMaxEntitiesCallback ( DtSimMessage msg,
void *  usr 
)
static

Processes a command to set the aiming point.

virtual void DtShipClutterAreaController::processSetMaxEntities ( DtSimMessage msg)
virtual
static DtSimComponent* DtShipClutterAreaController::creator ( const DtString name,
DtLocalObject owner,
DtSimulationServices simManager,
DtComponentDescriptor desc = 0,
DtReaderWriterRegistry parentRegistry = 0 
)
static

Static creator function for factory registration.

virtual bool DtShipClutterAreaController::taskVisualizationsActive ( ) const
overridevirtual

Generally returns false, but can be enabled for debug purposes.

Reimplemented from DtTaskControllerComponent.

bool DtShipClutterAreaController::createPSR ( )
protected

Creates the PSR for this controller.

virtual void DtShipClutterAreaController::requestPhaseTick ( )
protectedvirtual

Tick function called during the phase when we are requesting track info.

virtual void DtShipClutterAreaController::processTrackInfoPhaseTick ( )
protectedvirtual

Tick function called during the phase when we are processing received track info.

virtual void DtShipClutterAreaController::ownershipAcquisitionPhaseTick ( )
protectedvirtual

Tick function called during the phase when we are requesting track ownership.

virtual void DtShipClutterAreaController::creationPhaseTick ( )
protectedvirtual

Tick function called during the phase when we are creating entities for tracks.

virtual void DtShipClutterAreaController::deletionPhaseTick ( )
protectedvirtual

Tick function called during the phase when we must remove excess tracks, or those that are now outside the area.

virtual void DtShipClutterAreaController::generalPhaseTick ( )
protectedvirtual

Tick function called during the phase after track creation when we are monitoring for events that would require additional activity.

virtual void DtShipClutterAreaController::requestTracksInArea ( )
protectedvirtual

Initiates a request for AIS tracks in this area.

virtual bool DtShipClutterAreaController::processTrackAdditionEvents ( )
protectedvirtual

Checks known tracks to see if any should be added. Returns true if any tracks should are to be added.

virtual bool DtShipClutterAreaController::processTrackRemovalEvents ( )
protectedvirtual

Checks known tracks to see if any should be deleted. Returns true if any tracks should are to be removed.

virtual void DtShipClutterAreaController::processTrackOwnershipResponse ( const DtMmsiSet tracks)
protectedvirtual

Processes tracks we have just taken ownership of.

virtual void DtShipClutterAreaController::updateKnownTracks ( const DtMmsiSet tracks)
protectedvirtual

Updates lists of tracks that are known to enter our area.

virtual void DtShipClutterAreaController::calculateAdditionAndRemovalTimes ( )
protectedvirtual

Processes myKnownTracksToProcess list to see what time these tracks should be created and/or removed.

virtual bool DtShipClutterAreaController::requestTrackOwnership ( DtMmsiSet tracks)
protectedvirtual

Initiates a request for ownership of the specified tracks. Returns true if any were requested.

virtual void DtShipClutterAreaController::releaseTrackOwnership ( const DtMmsiSet tracks)
protectedvirtual

Releases ownership of the specified tracks.

virtual bool DtShipClutterAreaController::createEntitiesForTracks ( )
protectedvirtual

Creates entities in the queue of myTracksToCreate. Returns the true if any entities were created.

virtual void DtShipClutterAreaController::monitorNewEntities ( )
protectedvirtual

Adds monitoring for newly created entities in myNewEntities so that we know if they have been deleted or updated in a way that affects how we manage them.

virtual void DtShipClutterAreaController::processEntityDeleted ( const DtSimObject entity)
protectedvirtual

Process the deletion of a managed entity.

virtual void DtShipClutterAreaController::processEntityPromoted ( const DtSimObject entity)
protectedvirtual

Process the promotion of a managed entity entity to a non-clutter entity.

void DtShipClutterAreaController::cleanupRemovedEntities ( )
protected

Cleans up entities which have been removed and added to myRemovedEntities.

void DtShipClutterAreaController::recordPromotedEntities ( )
protected

Records entities in myPromotedEntities as having been promoted to non-clutter entities.

virtual DtEntityType DtShipClutterAreaController::objectTypeForTrack ( const DtAisTrack track) const
protectedvirtual

Maps AIS track data to an object type for creation.

virtual bool DtShipClutterAreaController::calculateTrackPositionAtTime ( double  simTime,
const DtAisTrack track,
DtVector &  worldLocation,
double heading,
DtVector &  velocity,
const DtPathPoint **  previousPathPoint 
) const
protectedvirtual

Calculates the world location, heading, and world velocity of the track at the specified sim time. Returns false if no information could be calculated for that time, perhaps because there is not data at that time. Sets the previousPathPoint pointer to point to the previous valid point in the path before the current time.

virtual bool DtShipClutterAreaController::findLastBorderCrossingTime ( const DtPathPoint pt1,
const DtPathPoint pt2,
std::vector< DtVector > &  areaBorder,
const DtMmsi  trackId,
double crossingTime 
)
protectedvirtual

TMP add comments to this function transplanted from adsb.

virtual bool DtShipClutterAreaController::locationNear2IsInside ( const DtVector &  location1,
const DtVector &  location2,
const DtLocalVertexList areaVertices,
Coordinate_System coordSys 
)
protectedvirtual

TMP here too.

virtual void DtShipClutterAreaController::trackPositionAtPoint ( const DtAisTrack track,
const DtAisPathPointMap::const_iterator  point,
DtVector &  worldLocation,
double heading,
DtVector &  worldVelocity 
) const
protectedvirtual

Gets the track location, heading, and velocity from the track data. If heading is not valid, course over ground will be used. If speed is not valid, returns a velocity of 0.

virtual bool DtShipClutterAreaController::approximateBorderCrossings ( double  startTime,
const DtVector &  startLocation,
double  endTime,
const DtVector &  endLocation,
std::vector< DtVector > &  areaBorder,
DtBorderCrossingList borderLocations 
) const
protectedvirtual

Calculates the approximate sim time and location at which the a path will enter or exit this area given the start and end path positions. All locations are in world coordinates, all times are sim times. The parameter borderLocations will be filled in with the locations and times of each border crossing. If the data appears to be invalid, returns false. Otherwise returns true, regardless of whether any crossing were found.

virtual void DtShipClutterAreaController::markAllEntitiesForDeletion ( )
protectedvirtual

Marks all clutter entities managed by this area for deletion.

virtual void DtShipClutterAreaController::markEntitiesOutsideOfAreaForDeletion ( )
protectedvirtual

Determines which tracks are no longer in the area and marks them for deletion. Called when the area is resized.

virtual void DtShipClutterAreaController::markExcessEntitiesForDeletion ( )
protectedvirtual

Marks excess entities for deletion to ensure the number of managed entities is below the maximum.

virtual void DtShipClutterAreaController::deleteMarkedEntities ( )
protectedvirtual

Performs deletion of entities marked for deletion.

virtual bool DtShipClutterAreaController::isTimeToRequestTracks ( double  simTime) const
protectedvirtual

Returns true if it is time to request track information again.

virtual bool DtShipClutterAreaController::isTimeForTrackAdditionEvent ( double  simTime) const
protectedvirtual

Returns true if it is time for a track addition.

virtual bool DtShipClutterAreaController::isTimeForTrackRemovalEvent ( double  simTime) const
protectedvirtual

Returns true if it is time for a track removal.

virtual void DtShipClutterAreaController::logEntityCreationStatistics ( )
protectedvirtual

Logs recent entity creation statistics and then resets them.

virtual void DtShipClutterAreaController::updateTaskVisualizations ( )
overrideprotectedvirtual

Debug only.

Reimplemented from DtSimComponent.

virtual void DtShipClutterAreaController::setPhase ( ProcessingPhase  )
protectedvirtual

Sets the phase to the new phase.

DtShipClutterAreaController& DtShipClutterAreaController::operator= ( const DtShipClutterAreaController orig)
private

Not Implemented.

Member Data Documentation

DtShipClutterAreaControllerDescriptor* DtShipClutterAreaController::myShipClutterAreaDescriptor
protected
DtShipClutterAreaPSR* DtShipClutterAreaController::myProcessState
protected
DtMmsiList DtShipClutterAreaController::myKnownTracksToProcess
protected
DtTrackEventMap DtShipClutterAreaController::myTrackAdditionTimes
protected
DtTrackEventMap DtShipClutterAreaController::myTrackRemovalTimes
protected
DtTrackEventMap DtShipClutterAreaController::myDelayedAdditionTimes
protected
DtMmsiSet DtShipClutterAreaController::myTracksToRequest
protected
DtMmsiSet DtShipClutterAreaController::myTracksRequested
protected
DtMmsiList DtShipClutterAreaController::myTracksToCreate
protected
std::list<DtUUID> DtShipClutterAreaController::myEntitiesToDelete
protected
std::list<DtUUID> DtShipClutterAreaController::myNewEntities
protected
DtTime DtShipClutterAreaController::myDataEndTime
protected
tbb::spin_mutex DtShipClutterAreaController::myRemovedEntitiesMutex
protected
DtMmsiSet DtShipClutterAreaController::myRemovedEntities
protected
tbb::spin_mutex DtShipClutterAreaController::myPromotedEntitiesMutex
protected
DtMmsiSet DtShipClutterAreaController::myPromotedEntities
protected
tbb::spin_mutex DtShipClutterAreaController::myExcludedModelsMutex
mutableprotected

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.

std::set<DtEntityType> DtShipClutterAreaController::excludedModels
mutableprotected
EntityDeletionSignalMap DtShipClutterAreaController::myEntityDeletionSignals
protected
EntityPromotedSignalMap DtShipClutterAreaController::myEntityPromotedSignals
protected
DtAisDataServiceInterface::DtAisDataJob::Ptr DtShipClutterAreaController::myAisTrackReq
protected

Requests to the AIS data manager.

DtAisDataServiceInterface::DtAisDataJob::Ptr DtShipClutterAreaController::myAisOwnershipReq
protected
ProcessingPhase DtShipClutterAreaController::myPhase
protected
bool DtShipClutterAreaController::myCreatingEntitiesFromSave
protected
unsigned DtShipClutterAreaController::myNumberCreatedRecently
protected

For logging purposes only.

unsigned DtShipClutterAreaController::myNumberSkippedRecently
protected
bool DtShipClutterAreaController::myDebugEnabled
protected

The following are for debug purposes only.

std::vector<DtVector> DtShipClutterAreaController::myPreCreatePts
mutableprotected
std::vector<DtVector> DtShipClutterAreaController::myPostCreatePts
mutableprotected
std::vector<DtVector> DtShipClutterAreaController::myCreatePts
mutableprotected
std::vector<DtVector> DtShipClutterAreaController::myPreExitPts
mutableprotected
std::vector<DtVector> DtShipClutterAreaController::myPostExitPts
mutableprotected
std::vector<DtVector> DtShipClutterAreaController::myExitPts
mutableprotected
std::vector<DtVector> DtShipClutterAreaController::myPreEnterPts
mutableprotected
std::vector<DtVector> DtShipClutterAreaController::myPostEnterPts
mutableprotected
std::vector<DtVector> DtShipClutterAreaController::myEnterPts
mutableprotected

The documentation for this class was generated from the following file:

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)