VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
jammerController.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2014 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
11 
12 #pragma once
13 
16 #include <vlutil/vlString.h>
17 
18 class DtVrfEmitterSystem;
20 class DtJammerPSR;
21 
22 namespace makVrf
23 {
24  struct DtEmitterSystemBeamStateData;
25 }
26 
34 {
35 private:
40  const DtJammerController & operator=(const DtJammerController & orig);
42 
43 public:
44 
50  DtJammerController(const DtString& name,
51  DtLocalObject* owner,
52  DtSimulationServices* simManager,
53  DtComponentDescriptor* desc = 0,
54  DtReaderWriterRegistry* parentRegistry = 0);
55 
57  virtual ~DtJammerController();
58 
61  virtual const char* type() const;
62 
64  virtual void tick();
65 
69  virtual bool tickWhileDestroyed() const;
70 
74  bool init();
75 
80  static DtReaderWriter* provideIsJammerOn(void* ctrlr);
81 
83  static DtReaderWriter* provideJammingStrength(void* ctrlr);
84 
86  static DtReaderWriter* provideJammingRange(void* ctrlr);
87 
89  static DtReaderWriter* provideJammerType(void* ctrlr);
90 
93  static DtReaderWriter* provideAllowedPostures(void* ctrlr);
95 
99  static DtSimComponent* creator(const DtString &name,
100  DtLocalObject* owner,
101  DtSimulationServices *simManager,
102  DtComponentDescriptor *desc = 0,
103  DtReaderWriterRegistry* parentRegistry = 0);
104 
106  virtual void setOn(bool onOff);
107  virtual bool on() const;
108 
109  virtual void setMountLocation(const DtVector &location);
110  virtual DtVector mountLocation() const;
111 
112  virtual void setSystemNameEnum(DtEmitterSysName nameEnum);
113  virtual DtEmitterSysName systemNameEnum() const;
114 
115  virtual void setSystemFunction(DtEmissionFunc functionEnum);
116  virtual DtEmissionFunc systemFunction() const;
117 
123  virtual DtVrfEmitterSystem* emitterSystem();
124 
125  virtual void enable();
127  virtual void disable();
128 
129 protected:
131  virtual bool createAndInitEmitterSystem();
132 
134  virtual void updateFromDescriptor();
135 
137  virtual std::vector<makVrf::DtEmitterSystemBeamStateData>& beamList();
138 
143  static void setEmitterRequestCallback(DtSimMessage *msg, void * usrData);
144 
147  virtual void processSetEmitterRequestMessage(DtSimMessage *msg);
149 
155  static void requestRadarModesAdminCallback(
156  const DtVrfObjectMessage* msg, void* usr);
157 
158  void processRequestRadarModesAdmin(const DtUUID& receiver,
159  const DtUUID& sender,
160  const DtVrfObjectMessage* msg);
162 
168  virtual bool createPSR();
169 
171  virtual const DtJammerEmitterDescriptor* getDescriptor();
172 
174  virtual DtJammerPSR* getPSR();
175 
176 protected:
177 
180 
188 
189 };
190 
191 
UUID is a unique ID wrapper class.
Definition: rwUUID.h:229
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
const DtControllerComponent & operator=(const DtControllerComponent &orig)
assignment operator
const DtJammerEmitterDescriptor * myDescriptor
Definition: jammerController.h:179
virtual const char * type() const =0
This returns a string from compTypes.h, and identifies the type of component.
TMP #include &quot;vrftasks/setJammer.h&quot;.
Definition: jammerPSR.h:22
Definition: readerWriter.h:85
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
DtJammerPSR * myProcessState
Definition: jammerController.h:178
virtual bool init()
Calls setRadio()
virtual void disable()
Is this component enabled or not. If enabled, component&#39;s tick function will be called, otherwise it will not. Default is true (enabled).
DtVrfEmitterSystem manages a VR-Link emitter system publisher, and sets all the values associated wit...
Definition: vrfEmitterSystem.h:40
DtVrfEmitterSystem * myEmitterSystem
Local copies of the emitter information. Not saved in the PSR, but restored on scenario reload...
Definition: jammerController.h:184
End User Description: DtJammerController turns the jammer on and off using Set commands. It also publishes emitter info. Developer Description: The DtJammerController class extends the base DtControllerComponent. It does not implement any tasks, but implements sets for turning comms and radar jamming on and off. It uses some of the same code as DtEmmitterComponent.
Definition: jammerController.h:33
virtual void enable()
Is this component enabled or not. If enabled, component&#39;s tick function will be called, otherwise it will not. Default is true (enabled).
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...
The base class for all messages to/from a specific DtVrfObject. Various subclasses of this class will...
Definition: vrfObjectMessage.h:30
End User Description: DtControllerComponent is the base class for all controllers components...
Definition: controllerComponent.h:31
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:90
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:70
DtJammerEmitterDescriptor is a descriptor for an emitter with additional parameters for comms and rad...
Definition: jammerEmitterDescriptor.h:18
bool myStateRestored
Set to true once previously checkpointed state (if any) is restored.
Definition: jammerController.h:186
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

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)