VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
embeddedEntitiesController.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2014 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
9 
10 #pragma once
13 
15 
17 
18 struct DtEmbeddedEntity;
19 
24 {
25 public:
27  DtVrfObject* owner,
28  DtSimManager* simManager,
29  DtComponentDescriptor* desc = 0,
30  DtReaderWriterRegistry* parentRegistry = 0);
32 
33  static DtSimComponent* creator(const DtString& name,
34  DtVrfObject* owner,
35  DtSimManager* simManager,
36  DtComponentDescriptor* desc = 0,
37  DtReaderWriterRegistry* parentRegistry = 0);
38  virtual const char* type() const;
39 
41  virtual bool init();
45  virtual void preFirstTickInit();
46 
47  virtual void registerTaskMsgCallbacks();
48  virtual DtEmbeddedEntitiesPSR* createPSR();
49 
52  virtual void clearTask(int tskId);
53 
55  virtual void tick();
56 
61  virtual void processEmbeddedEntityCurrentlyInContext(double deltaTime);
65  virtual bool checkWithinRecoveryRange();
68  virtual bool performDeployment();
70  virtual bool performRecovery();
72  virtual bool performSetForward();
74  virtual bool performTaskForward();
76  virtual DtVector calculateSpawnPosOfTarget();
79  virtual bool commandEeToReturn(const DtString& entityName);
81 
84  virtual DtUUID getObjectNameOfEmbeddedEntity(std::string eeName, bool& found);
85 
89  getStatusOfEmbeddedEntity(std::string eeName, bool& found);
90 
92  static void setForwardTaskCallback(DtSimMessage * msg, void * usrData);
94  static void taskForwardTaskCallback(DtSimMessage * msg, void * usrData);
96  virtual void processForwardTask(DtSimMessage * msg);
97 
99  static void deployTaskCallback(DtSimMessage * msg, void * usrData);
101  static void recoverTaskCallback(DtSimMessage * msg, void * usrData);
103  virtual void processTask(DtSimMessage * msg);
104 
106  virtual std::list<DtEmbeddedEntity> availableEmbeddedEntities();
107 
109 
110  static void deletionCallback(const DtVrfObject* spawnedObject, void* usrData);
111  virtual void processDeletion(const DtVrfObject* spawnedObject);
113 
115 
116  static void hostRestoreCallback(DtSimMessage* message, void* usrData);
119  virtual void processHostRestore(DtSimMessage* message);
121 
122 protected:
124  virtual void restoreEmbedded(DtRwEmbeddedEntityStatus* const eeStatus);
125 
126 protected:
129 
133 
136  std::map<std::string, DtRwEmbeddedEntity*> myNamedEntityMap;
137 
140  std::list<int> myFaultedTasks;
141 };
UUID is a unique ID wrapper class.
Definition: rwUUID.h:222
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
DtVrfObject is used to represent any type of simulated object (entities, aggregate, control objects) in a VR-Forces application.
Definition: vrfObject.h:215
Name &lt;-&gt; type pair representing the API-exposed portion of an Embedded Entity configuration.
Definition: ifEmbeddedEntityInfoCacheResponse.h:22
Contains the DtEmbeddedEntitiesDescriptor class.
std::map< std::string, DtRwEmbeddedEntity * > myNamedEntityMap
A representation of myComponentDescriptor-&gt;embeddedEntities() where DtRwEmbeddedEntity::entityName() ...
Definition: embeddedEntitiesController.h:136
DtEmbeddedEntitiesController.
Definition: embeddedEntitiesController.h:22
DtRwEmbeddedEntityTaskState * myEeCurrentlyProcessing
The task state of the Embedded Entity currently being processed All perform* methods, etc.
Definition: embeddedEntitiesController.h:132
virtual void clearTask()
Called when you want to clear out this component&#39;s task state.
const DtEmbeddedEntitiesDescriptor * myComponentDescriptor
Definition: embeddedEntitiesController.h:128
virtual void registerTaskMsgCallbacks()
virtual void preFirstTickInit()
This function can be overridden to initialize a component before it is ticked for the first time...
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:42
This class provides a base class for all controllers that are capable of executing a DtSimTask...
Definition: multiTaskControllerComponent.h:25
Definition: readerWriterRegistry.h:39
virtual const char * type() const =0
Returns a string identifies the class type of component.
Holds data and provides accessors pertinent to the task state of a single Embedded Entity...
Definition: embeddedEntitiesPSR.h:24
virtual bool init()
Calls setRadio()
File: simMsg.h.
Definition: simMessage.h:35
virtual void tick()
This gives the thread of control to the component.
DtEmbeddedEntitiesPSR * myProcessState
Definition: embeddedEntitiesController.h:127
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:67
DtEmbeddedEntityDeploymentState
The deployment state of an Embedded Entity.
Definition: rwEmbeddedEntity.h:118
The simulation engine is controlled by a single,top-level class called the Simulation Manager...
Definition: simManager.h:103
PSR for use by DtEmbeddedEntitiesController Primarily concerned with managing lists of DtRwEmbeddedEn...
Definition: embeddedEntitiesPSR.h:103
Descriptor for Embedded Entity systems.
Definition: embeddedEntitiesDescriptor.h:23
Contains data concerning one Embedded Entity&#39;s deployment state.
Definition: rwEmbeddedEntity.h:113
Contains the DtEmbeddedEntitiesPSR and DtRwEmbeddedEntityTaskState classes.
std::list< int > myFaultedTasks
Holds a list of any task ids that are uncompletable and can&#39;t be bound to any given task state such t...
Definition: embeddedEntitiesController.h:140

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)