VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
iffControllerComponent.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2012 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 #pragma once
12 
15 
16 class DtString;
18 class DtSimMessage;
19 class DtSetIffRequest;
20 class DtVrfIffPSR;
21 
22 namespace makVrf
23 {
24  class DtIffStateComponent;
25 }
26 
32 {
33 public:
34 
38  DtLocalObject* owner,
39  DtSimulationServices* simManager,
40  DtComponentDescriptor* desc = 0,
41  DtReaderWriterRegistry* parentRegistry = 0);
42 
44  virtual ~DtIffControllerComponent();
45 
46  virtual bool init();
47 
50  virtual void preFirstTickInit();
51 
54  virtual void tick();
55 
58  virtual const char* type() const;
59 
63  static DtSimComponent * creator(const DtString& name,
64  DtLocalObject* owner,
65  DtSimulationServices* simManager,
66  DtComponentDescriptor* desc = 0,
67  DtReaderWriterRegistry* parentRegistry = 0);
68 
70  virtual void registerSetIffRequestMsgCallbacks();
71 
72  static void setIffRequestCallback(DtSimMessage *msg, void * usrData);
73 
74  virtual void processSetIffRequestMessage(DtSimMessage *msg);
75 
79  virtual DtVrfIffPSR* getPsr();
81 
85  virtual void registerAttributeFunctions();
86 
90  static DtReaderWriter* provideSystemOn(void* controller);
91  static DtReaderWriter* provideMode1On(void* controller);
92  static DtReaderWriter* provideMode1Code(void* controller);
93  static DtReaderWriter* provideMode2On(void* controller);
94  static DtReaderWriter* provideMode2Code(void* controller);
95  static DtReaderWriter* provideMode3On(void* controller);
96  static DtReaderWriter* provideMode3Code(void* controller);
97  static DtReaderWriter* provideMode4On(void* controller);
98  static DtReaderWriter* provideMode4Code(void* controller);
99  static DtReaderWriter* provideAltMode4Value(void* controller);
100  static DtReaderWriter* provideModeCOn(void* controller);
101  static DtReaderWriter* provideAltModeCOn(void* controller);
102  static DtReaderWriter* provideModeSOn(void* controller);
103  static DtReaderWriter* provideModeSTcasI(void* controller);
104  static DtReaderWriter* provideEmergency(void* controller);
105  static DtReaderWriter* provideFlash(void* controller);
106  static DtReaderWriter* provideSTI(void* controller);
107 
110 
111 protected:
112 
116 
119  orig);
120 
122  const DtIffControllerComponent & operator=(const
123  DtIffControllerComponent & orig);
124 
126  virtual void setRadio(DtSimRadio * radio);
127 
128  virtual bool createPublisher();
130  virtual void updateFromDescriptor();
132  virtual void updateFromSetRequest(DtSetIffRequest *setReq, bool updateInPSR = true);
135  virtual void updateDynamicData();
136 
142  virtual bool createPSR();
143 
145  virtual void setIsEnabled(bool yesNo) override;
146 
147 protected:
148  virtual void enable() override;
149  virtual void disable() override;
150 
151 protected:
153 
156 
160 };
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
DtIffControllerComponent is a controller that manages a IFF publisher for an entity.
Definition: iffControllerComponent.h:31
const DtControllerComponent & operator=(const DtControllerComponent &orig)
assignment operator
Definition: simRadio.h:30
virtual void setRadio(DtSimRadio *radio)
bool myUseAltModeC
True if we are currently using alternate mode C.
Definition: iffControllerComponent.h:155
virtual void setIsEnabled(bool yesNo)
Is this component enabled or not. If enabled, component's tick function will be called, otherwise it will not. Default is true (enabled).
virtual void preFirstTickInit()
This function can be overridden to initialize a component before it is ticked for the first time...
virtual const char * type() const =0
This returns a string from compTypes.h, and identifies the type of component.
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
virtual bool init()
Calls setRadio()
virtual void disable()
Is this component enabled or not. If enabled, component's tick function will be called, otherwise it will not. Default is true (enabled).
makVrf::DtIffStateComponent * myIffComponent
Definition: iffControllerComponent.h:152
class DtSetIffRequest
Definition: setIffRequest.h:57
virtual void enable()
Is this component enabled or not. If enabled, component'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 ...
DtVrfIffPSR * myProcessState
Container for state data associated with this component. This state is saved and restored as part of ...
Definition: iffControllerComponent.h:159
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
virtual void registerAttributeFunctions()
Called to register functions that provide system attribute values. Called by init(). Empty in this class. Overridden in different components to add attribute provider functions.
Definition: simComponent.h:112
1) Define the interface class that will be used to represent the next and curent frames. The UNDEFINED_ macros are convenience macros that will define methods that throw exceptions (until they are implemented)
Definition: iffStateComponent.h:428
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
class DtVrfIffPSR:
Definition: vrfIffPSR.h:24

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)