VR-Forces 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() override;
58 
61  virtual const char* type() const override;
62 
64  virtual void tick() override;
65 
69  virtual bool tickWhileDestroyed() const override;
70 
74  virtual bool init() override;
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);
94 
96  static DtReaderWriter* provideEmitterId(void* ctrlr);
98 
102  static DtSimComponent* creator(const DtString &name,
103  DtLocalObject* owner,
104  DtSimulationServices *simManager,
105  DtComponentDescriptor *desc = 0,
106  DtReaderWriterRegistry* parentRegistry = 0);
107 
109  virtual void setOn(bool onOff);
110  virtual bool on() const;
111 
112  virtual void setMountLocation(const DtVector &location);
113  virtual DtVector mountLocation() const;
114 
115  virtual void setSystemNameEnum(DtEmitterSysName nameEnum);
116  virtual DtEmitterSysName systemNameEnum() const;
117 
118  virtual void setSystemFunction(DtEmissionFunc functionEnum);
119  virtual DtEmissionFunc systemFunction() const;
120 
126  virtual DtVrfEmitterSystem* emitterSystem();
127 
128  virtual void enable() override;
130  virtual void disable() override;
131 
132 protected:
134  virtual bool createAndInitEmitterSystem();
135 
137  virtual void updateFromDescriptor();
138 
140  virtual std::vector<makVrf::DtEmitterSystemBeamStateData>& beamList();
141 
146  static void setEmitterRequestCallback(DtSimMessage *msg, void * usrData);
147 
150  virtual void processSetEmitterRequestMessage(DtSimMessage *msg);
152 
158  static void requestRadarModesAdminCallback(
159  const DtVrfObjectMessage* msg, void* usr);
160 
161  void processRequestRadarModesAdmin(const DtUUID& receiver,
162  const DtUUID& sender,
163  const DtVrfObjectMessage* msg);
165 
171  virtual bool createPSR();
172 
174  virtual const DtJammerEmitterDescriptor* getDescriptor();
175 
177  virtual DtJammerPSR* getPSR();
178 
179 protected:
180 
183 
191 
192 };
193 
194 
UUID is a unique ID wrapper class.
Definition: uuid.h:59
#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:182
virtual void enable() override
Enables the component and resends capable tasks and sets.
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
virtual const char * type() const override=0
This returns a string from compTypes.h, and identifies the type of component.
Definition: readerWriterRegistry.h:39
DtJammerPSR * myProcessState
Definition: jammerController.h:181
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
virtual bool init() override
Calls setRadio()
DtVrfEmitterSystem * myEmitterSystem
Local copies of the emitter information. Not saved in the PSR, but restored on scenario reload...
Definition: jammerController.h:187
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
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:96
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:89
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:189
A locally simulated VRF object.
Definition: localObject.h:98

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)