VR-Forces 5.0.1 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
emitterComponent.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2004 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 
12 #pragma once
13 
14 
17 
18 class DtString;
20 class DtSimMessage;
21 class DtSimRadio;
23 class DtEmitterPSR;
24 class DtVrfEmitterSystem;
25 class DtVrfObjectMessage;
27 
29 
30 namespace makVrf
31 {
32  struct DtEmitterSystemBeamStateData;
33 }
34 
55 {
56 public:
57 
60  DtEmitterComponent(const DtString& name, DtLocalObject* owner, DtSimulationServices* simManager,
61  DtComponentDescriptor* desc = 0, DtReaderWriterRegistry* parentRegistry = 0);
62 
64  virtual ~DtEmitterComponent();
65 
67  virtual void tick();
68 
72  virtual bool tickWhileDestroyed() const;
73 
76  bool init();
77 
79  virtual void preFirstTickInit();
80 
83  virtual const char* type() const;
84 
88  static DtSimComponent* creator(const DtString& name, DtLocalObject* owner,DtSimulationServices* simManager,
89  DtComponentDescriptor* desc = 0,DtReaderWriterRegistry* parentRegistry = 0);
90 
92  virtual void registerSetRequestMsgCallbacks();
93 
94  static void setEmitterRequestCallback(DtSimMessage* msg, void* usrData);
95  virtual void processSetEmitterRequestMessage(DtSimMessage* msg);
96 
97  static void setRadarModeRequestCallback(DtSimMessage* msg, void* usrData);
98  virtual void processSetRadarModeRequestMessage(DtSimMessage* msg);
99 
100  static void setEmitterTrackJamTargetsCallback(DtSimMessage* msg, void* usrData);
101  virtual void procesSetEmitterTrackJamTargetsRequestMessage(DtSimMessage* msg);
102 
103  static void requestRadarModesAdminCallback(const DtVrfObjectMessage* msg, void* usr);
104  virtual void processRequestRadarModesAdmin(
105  const DtUUID& receiver, const DtUUID& sender,const DtVrfObjectMessage* msg);
106 
109  virtual void setSystemName(DtEmitterSysName nameEnum);
110  virtual DtEmitterSysName systemName() const;
111 
112  virtual void setSystemFunction(DtEmissionFunc functionEnum);
113  virtual DtEmissionFunc systemFunction() const;
114 
115  virtual void setMountLocation(const DtVector &location);
116  virtual DtVector mountLocation() const;
117 
120  virtual void setOn(bool onOff);
121  virtual bool on() const;
122 
127  virtual void setUseHighDensityTracking(bool useHdMode);
128  virtual bool useHighDensityTracking() const;
129  virtual void setUseHighDensityJamming(bool useHdMode);
130  virtual bool useHighDensityJamming() const;
132 
134  virtual void setRadarMode(const DtString& mode);
136  virtual DtString radarMode() const;
138 
140  virtual void setTrackTargetList(const std::vector<DtUUID>& strings);
141 
143  virtual void setJamTargetList(const std::vector<DtUUID>& strings);
144 
147  virtual void addTrackTarget(const DtUUID& target);
148 
151  virtual void removeTrackTarget(const DtUUID& target);
152 
155  virtual void addJamTarget(const DtUUID& target);
156 
159  virtual void removeJamTarget(const DtUUID& target);
160 
162  virtual void clearTrackTargets();
163 
165  virtual void clearJamTargets();
166 
169  virtual makVrf::DtEmitterSystemBeamStateData* addBeam();
170 
172  virtual void removeBeam(DtU8 id);
173 
176  virtual makVrf::DtEmitterSystemBeamStateData* beam(DtU8 id = 0);
177 
179  virtual int numBeams() const;
180 
182  virtual std::vector<makVrf::DtEmitterSystemBeamStateData>& beamList();
183 
189  virtual DtVrfEmitterSystem* emitterSystem();
190 
191 protected:
192  virtual void setRadio(DtSimRadio * radio);
194  virtual DtSimRadio * radio();
195 
197  virtual bool createAndInitEmitterSystem();
198 
200  virtual void updateEmitterFromDescriptor();
201 
203  virtual void updateEmitterFromPsr();
204 
206  virtual void determineTrackJamAbility();
207 
213  virtual bool createPSR();
214 
215 private:
218 
221 
223  const DtEmitterComponent & operator=(const DtEmitterComponent & orig);
224 
225 
226 protected:
229 
233 
237 };
238 
DtSimRadio * myRadio
Definition: emitterComponent.h:227
UUID is a unique ID wrapper class.
Definition: rwUUID.h:226
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
bool myRegisterForTrackMessages
Set up in init by determineTrackJamAbility.
Definition: emitterComponent.h:231
Definition: simRadio.h:30
DtEmitterPSR * myProcessState
Container for state data associated with this component. This state is saved and restored as part of ...
Definition: emitterComponent.h:236
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:49
class DtEmitterPSR:
Definition: emitterPSR.h:24
Definition: readerWriterRegistry.h:39
virtual bool init()
Calls createPorts and createPortGroups Initializes myLastTickSimTime.
DtVrfEmitterSystem manages a VR-Link emitter system publisher, and sets all the values associated wit...
Definition: vrfEmitterSystem.h:37
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
If the component returns true here, it will be ticked regardless of the destroyed state of the host e...
DtSimComponent & operator=(const DtSimComponent &orig)
assignment operator, not implemented
The base class for all messages to/from a specific DtVrfObject. Various subclasses of this class will...
Definition: vrfObjectMessage.h:30
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:89
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:70
The central class of a DtLocalObject for all communications to and from the object. This class manages all communications on a specific DtLocalObject, though both simulation internal communication, and communication though the simulated radios of the object. All communication is done though the use of the DtVrfObjectMessage class and its subclasses. Callbacks can be registered on this interface which will be called on receipt of a message by this entity. Messages can be sent from this entity by using the message sending functions. These messages may be sent though the SimInternal message mechanism, or the radio message system. Radios will not exist until createRadiosFromDescriptorList() or createRadiosFromDescriptorList(const DtRadioDescriptorList&amp; descList) is called.
Definition: vrfObjectCommunicationInterface.h:40
Contains the DtSimComponent class declaration.
const char int mode
Definition: ioapi.h:38
DtEmitterComponent maintains an electromagnetic emissions publisher for a single system with one or m...
Definition: emitterComponent.h:54
Arguments passed by the DtLocalObjectManager::addNameChangedCallback callbacks.
Definition: localObjectManager.h:111
DtVrfEmitterSystem * myEmitterSystem
Definition: emitterComponent.h:228
The DtEmitterSystemStateComponentList is a collection of emitter systems and the beams they represent...
Definition: emitterSystemStateComponent.h:24
virtual const char * type() const =0
Returns a string identifies the class type of component. Type values are defined in compTypes...
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
bool myRegisterForJamMessages
Definition: emitterComponent.h:232

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)