VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
localEntitySetController.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2021 MAK Technologies, Inc.
3  * All rights reserved.
4  ****************************************************************************/
5 
8 
9 #pragma once
10 
12 #include "vrfmodel/setController.h"
15 
16 class DtSimMessage;
17 
27 {
28 
29 public:
30 
34  DtLocalObject* owner,
35  DtSimulationServices* simManager,
36  DtComponentDescriptor* desc = 0,
37  DtReaderWriterRegistry* parentRegistry = 0);
38 
40  virtual ~DtLocalEntitySetController();
41 
43  virtual bool init();
44 
47  virtual const char* type() const;
48 
52  virtual void processSetStateProperties(DtSimMessage * msg);
53 
54  virtual void processSetForce(DtSimMessage * msg);
55  virtual void processSetAppearance(DtSimMessage * msg);
56  virtual void processSetCapabilities(DtSimMessage * msg);
57  virtual void processSetAltitude(DtSimMessage * msg);
58  virtual void processSetResource(DtSimMessage * msg);
59  virtual void processSetSOR(DtSimMessage * msg);
60  virtual void processSetSpeed(DtSimMessage * msg);
61  virtual void processSetCurrentSpeed(DtSimMessage * msg);
62  virtual void processSetEngagementRules(DtSimMessage * msg);
63  virtual void processSetRestore(DtSimMessage * msg);
64  virtual void processSetConcealed(DtSimMessage * msg);
65  virtual void processSetInvisible(DtSimMessage * msg);
66  virtual void processSetAiEnabled(DtSimMessage * msg);
67  virtual void processSetEngagementZones(DtSimMessage* msg);
68  virtual void processSetHideOccupants(DtSimMessage* msg);
69  virtual void processSetSkillLevel(DtSimMessage * msg);
70  virtual void processSetTargetPriorityList(DtSimMessage* msg);
71  virtual void processSetUndetectable(DtSimMessage * msg);
72  virtual void processSetUrgency(DtSimMessage* msg);
73  virtual void processSetPromoteFromClutter(DtSimMessage* msg);
74  virtual void processSetCallsign(DtSimMessage* msg);
75 
82  virtual void processSetLocation(DtSimMessage * msg);
83 
84  virtual void processSetSuperior(DtSimMessage * msg);
85 
88  virtual void setLocation(DtVector geocentricLocation, bool keepOnGround);
89 
91  virtual void setLocation(DtVector geocentricLocation, bool keepOnGround, bool& dataAvailable);
92 
99  virtual void processSetHeading(DtSimMessage * msg);
100 
102  virtual void setHeading(DtReal heading);
103 
106  virtual void tick();
107 
111  virtual bool tickWhileDestroyed() const { return true; }
112 
120  virtual bool createPSR();
121 
123  virtual void isClutterChanged();
124 
125 public:
131  static void setStatePropertiesCallback(DtSimMessage * msg, void * usr);
132 
133  static void setHeadingCallback(DtSimMessage * msg, void * usrData);
134 
135  static void setForceCallback(DtSimMessage * msg, void * usrData);
136  static void setLocationCallback(DtSimMessage * msg, void * usrData);
137  static void setSuperiorCallback(DtSimMessage * msg, void * usrData);
138  static void setAppearanceCallback(DtSimMessage * msg, void * usrData);
139  static void setCapabilitiesCallback(DtSimMessage * msg, void * usrData);
140  static void setAltitudeCallback(DtSimMessage * msg, void * usrData);
141  static void setResourceCallback(DtSimMessage * msg, void * usrData);
142  static void setSORCallback(DtSimMessage * msg, void * usrData);
143  static void setSpeedCallback(DtSimMessage * msg, void * usrData);
144  static void setCurrentSpeedCallback(DtSimMessage * msg, void * usrData);
145  static void setEngagementRulesCallback(DtSimMessage * msg, void * usrData);
146  static void setRestoreCallback(DtSimMessage * msg, void * usrData);
147  static void setConcealedCallback(DtSimMessage * msg, void * usrData);
148  static void setInvisibleCallback(DtSimMessage * msg, void * usrData);
149  static void setAiEnabledCallback(DtSimMessage * msg, void * usrData);
150  static void setEngagementZonesCallback(DtSimMessage * msg, void * usrData);
151  static void setHideOccupantsCallback(DtSimMessage *msg, void* usrData);
152  static void setSkillLevelCallback(DtSimMessage * msg, void * usrData);
153  static void setTargetPriorityListCallback(DtSimMessage * msg, void * usrData);
154  static void setUndetectableCallback(DtSimMessage * msg, void * usrData);
155  static void setUrgencyCallback(DtSimMessage* msg, void* usrData);
156  static void setPromoteFromClutterCallback(DtSimMessage* msg, void* usrData);
157  static void setCallsignCallback(DtSimMessage* msg, void* usrData);
158 
162  static DtSimComponent * creator(const DtString& name,
163  DtLocalObject* owner,
164  DtSimulationServices* simManager,
165  DtComponentDescriptor* desc = 0,
166  DtReaderWriterRegistry* parentRegistry = 0);
167 
168 protected:
172 
175 
179 
180 
181 protected:
183  virtual void initializeSetsToRegister();
184  virtual void checkReorgDueToForceChange();
185 
186 protected:
193 };
194 
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
DtLocalEntitySetControllerPSR * myProcessState
Container for state data associated with this component. This state is saved and restored as part of ...
Definition: localEntitySetController.h:189
class DtLocalEntitySetControllerPSR:
Definition: localEntitySetControllerPSR.h:23
virtual bool init()
Calls setRadio()
int myCheckReorgDueToForceChange
Definition: localEntitySetController.h:192
const DtSetController & operator=(const DtSetController &orig)
assignment operator; not implemented
virtual const char * type() const =0
This returns a string from compTypes.h, and identifies the type of component.
bool myWarnedLocationOnce
Definition: localEntitySetController.h:191
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
DtMovementLocalObjectFacade myMovementLocalObjectFacade
Definition: localEntitySetController.h:190
File: simMsg.h.
Definition: simMessage.h:35
virtual void tick()
This gives the thread of control to the component. The component is ticked once each simulation from ...
virtual bool tickWhileDestroyed() const
Tick while destroyed so that sets that do some processing during tick can be resolved while the entit...
Definition: localEntitySetController.h:111
This class will define a basic set controller that will allow for adding sets of that can be register...
Definition: setController.h:21
virtual void isClutterChanged()
Called when the is-clutter setting changes.
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:95
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:91
void processSetLocation(DtSetDataRequest *set, const DtVertexList &vertices, double position, DtMoveAlongRouteTimeEstimator *est)
void processSetCurrentSpeed(DtSetDataRequest *set, const DtVertexList &vertices, double position, DtMoveAlongRouteTimeEstimator *est)
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
DtLocalEntitySetController is a controller that handles all DtSetDataRequest messages for an entity a...
Definition: localEntitySetController.h:26

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)