10 #include "legionDataStore/writeStateInstance.h"
12 #include <vlutil/vlString.h>
138 : DtFrameStateInterface(storage)
176 virtual const int antiCollisionLightsDayNight()
const override;
177 virtual void setAntiCollisionLightsDayNight(
const int&)
override;
179 virtual const int antiCollisionLightsFlashing()
const override;
180 virtual void setAntiCollisionLightsFlashing(
const int&)
override;
182 virtual const int formationLightsLuminance()
const override;
183 virtual void setFormationLightsLuminance(
const int&)
override;
185 virtual const int navigationLightsFlashing()
const override;
186 virtual void setNavigationLightsFlashing(
const int&)
override;
188 virtual const int nvgMode()
const override;
189 virtual void setNvgMode(
const int&)
override;
191 virtual const bool taxiwayLightsOn()
const override;
192 virtual void setTaxiwayLightsOn(
const bool&)
override;
194 virtual const bool hduLightsOn()
const override;
195 virtual void setHduLightsOn(
const bool&)
override;
197 virtual const bool refuelingStation1LightsOn()
const override;
198 virtual void setRefuelingStation1LightsOn(
const bool&)
override;
200 virtual const int refuelingStation1LightsColor()
const override;
201 virtual void setRefuelingStation1LightsColor(
const int&)
override;
203 virtual const bool refuelingStation1LightsFlashing()
const override;
204 virtual void setRefuelingStation1LightsFlashing(
const bool&)
override;
206 virtual const int refuelingStation1DayNight()
const override;
207 virtual void setRefuelingStation1DayNight(
const int&)
override;
209 virtual const bool refuelingStation2LightsOn()
const override;
210 virtual void setRefuelingStation2LightsOn(
const bool&)
override;
212 virtual const int refuelingStation2LightsColor()
const override;
213 virtual void setRefuelingStation2LightsColor(
const int&)
override;
215 virtual const bool refuelingStation2LightsFlashing()
const override;
216 virtual void setRefuelingStation2LightsFlashing(
const bool&)
override;
218 virtual const int refuelingStation2DayNight()
const override;
219 virtual void setRefuelingStation2DayNight(
const int&)
override;
221 virtual const bool refuelingStation3LightsOn()
const override;
222 virtual void setRefuelingStation3LightsOn(
const bool&)
override;
224 virtual const int refuelingStation3LightsColor()
const override;
225 virtual void setRefuelingStation3LightsColor(
const int&)
override;
227 virtual const bool refuelingStation3LightsFlashing()
const override;
228 virtual void setRefuelingStation3LightsFlashing(
const bool&)
override;
230 virtual const int refuelingStation3DayNight()
const override;
231 virtual void setRefuelingStation3DayNight(
const int&)
override;
237 virtual void makeReadOnly()
override {};
255 virtual const int antiCollisionLightsDayNight()
const override;
256 virtual const int antiCollisionLightsFlashing()
const override;
257 virtual const int formationLightsLuminance()
const override;
258 virtual const int navigationLightsFlashing()
const override;
259 virtual const int nvgMode()
const override;
260 virtual const bool taxiwayLightsOn()
const override;
261 virtual const bool hduLightsOn()
const override;
262 virtual const bool refuelingStation1LightsOn()
const override;
263 virtual const int refuelingStation1LightsColor()
const override;
264 virtual const bool refuelingStation1LightsFlashing()
const override;
265 virtual const int refuelingStation1DayNight()
const override;
266 virtual const bool refuelingStation2LightsOn()
const override;
267 virtual const int refuelingStation2LightsColor()
const override;
268 virtual const bool refuelingStation2LightsFlashing()
const override;
269 virtual const int refuelingStation2DayNight()
const override;
270 virtual const bool refuelingStation3LightsOn()
const override;
271 virtual const int refuelingStation3LightsColor()
const override;
272 virtual const bool refuelingStation3LightsFlashing()
const override;
273 virtual const int refuelingStation3DayNight()
const override;
275 friend class DtAircraftLightingStateImplementation;
299 if (myNextFrameState.isWritable())
301 myCurrentFrameState.advanceFrame(myNextFrameState.frameState());
304 myCurrentFrameState.emitComponentUpdated();
309 myCurrentFrameState.updateStateData(sd);
310 myNextFrameState.updateStateData(sd);
316 myCurrentFrameState.aboutToBeDeleted();
317 myNextFrameState.aboutToBeDeleted();
int myRefuelingStation2LightsColor
Definition: aircraftLightingStateComponent.h:115
int myRefuelingStation3DayNight
Definition: aircraftLightingStateComponent.h:119
int myRefuelingStation2DayNight
Definition: aircraftLightingStateComponent.h:118
bool myRefuelingStation3LightsOn
Definition: aircraftLightingStateComponent.h:124
Definition: stateComponent.h:269
bool myRefuelingStation3LightsFlashing
Definition: aircraftLightingStateComponent.h:127
bool myTaxiwayLightsOn
Definition: aircraftLightingStateComponent.h:120
bool myRefuelingStation1LightsFlashing
Definition: aircraftLightingStateComponent.h:125
bool myHduLightsOn
Definition: aircraftLightingStateComponent.h:121
virtual void aboutToBeDeleted() override
Definition: aircraftLightingStateComponent.h:313
DtStateComponentCreator< DtAircraftLightingStateComponentImplementation > DtAircraftLightingStateComponentCreator
5) Define the creator. This will need to be registered with the REGISTER_STATE_COMPONENT macro in the...
Definition: aircraftLightingStateComponent.h:327
const DtAircraftLightingStateComponentData & frameState() const
Next frame access write access. Ensure this is only used in a single thread (i.e.a controller thread)...
Definition: aircraftLightingStateComponent.h:173
int myRefuelingStation3LightsColor
Definition: aircraftLightingStateComponent.h:116
int myNavigationLightsFlashing
Definition: aircraftLightingStateComponent.h:112
DtAircraftLightingStateComponentData myData
Definition: aircraftLightingStateComponent.h:282
DtAircraftLightingStateComponentNextFrame myNextFrameState
Definition: aircraftLightingStateComponent.h:322
virtual const DtFrameStateInterface * currentFrameState() const override
Definition: aircraftLightingStateComponent.h:293
int myRefuelingStation1LightsColor
Definition: aircraftLightingStateComponent.h:114
int myNvgMode
Definition: aircraftLightingStateComponent.h:113
Definition: aircraftLightingStateComponent.h:16
DtAircraftLightingStateComponentData & operator=(const DtAircraftLightingStateComponentData &orig)
Definition: aircraftLightingStateComponent.h:63
2) Define the next frame class. This will be used for write access.
Definition: aircraftLightingStateComponent.h:165
The overall structure of the DtStateData mechanism is: The DtStateData contains a list of double buff...
Definition: stateData.h:398
#define DEFINE_STATE_COMPONENT_TYPE(CreatedComponent)
Definition: stateComponent.h:231
bool myRefuelingStation1LightsOn
Definition: aircraftLightingStateComponent.h:122
DtAircraftLightingStateComponentCurrentFrame myCurrentFrameState
Definition: aircraftLightingStateComponent.h:321
Subclass from this to indicate that this will be a double buffered state component.
Definition: stateComponent.h:384
int myAntiCollisionLightsFlashing
Definition: aircraftLightingStateComponent.h:110
bool myRefuelingStation2LightsOn
Definition: aircraftLightingStateComponent.h:123
virtual DtFrameStateInterface * nextFrameState() override
Definition: aircraftLightingStateComponent.h:294
#define UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(Type, Member, Set)
Definition: doubleBufferedDataStorage.h:53
virtual void updateStateData(DtStateData *sd) override
Implement to update data storage to the new state data.
Definition: aircraftLightingStateComponent.h:307
virtual void makeWritable() override
Override to make component writable.
Definition: aircraftLightingStateComponent.h:234
virtual void aboutToBeDeleted()
bool myRefuelingStation2LightsFlashing
Definition: aircraftLightingStateComponent.h:126
DtAircraftLightingStateComponentData & frameState()
Definition: aircraftLightingStateComponent.h:174
bool isDoubleBuffered()
Definition: aircraftLightingStateComponent.h:292
Definition: stateComponent.h:99
int myAntiCollisionLightsDayNight
Definition: aircraftLightingStateComponent.h:109
#define DEFINE_ACCESSOR_MUTATOR(ReturnType, Accessor, Mutator)
Definition: doubleBufferedDataStorage.h:23
3) Define the current frame class. This will be used for read access.
Definition: aircraftLightingStateComponent.h:245
virtual const DtFrameStateInterface * nextFrameState() const override
Definition: aircraftLightingStateComponent.h:295
DtAircraftLightingStateComponentData(const DtAircraftLightingStateComponentData &orig)
Definition: aircraftLightingStateComponent.h:40
#define DT_DLL_vrfStateData
This file is used to determine how to build Disable inconsistent dll linkage warning Visual Studio 6...
Definition: vrfStateDataDefines.h:26
4) Define the state component that will contain the wrappers to the next and current frame states tha...
Definition: aircraftLightingStateComponent.h:287
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: aircraftLightingStateComponent.h:132
void advanceFrame(const DtAircraftLightingStateComponentData &data)
Definition: aircraftLightingStateComponent.h:276
Contains the DtStateComponent class declaration.
const DtAircraftLightingStateComponentData & frameState() const
Current frame state only can access current frame buffers. This ensures thread safety.
Definition: aircraftLightingStateComponent.h:253
This is a simple base class that will be used to return a pointer to current or next frame state...
Definition: stateComponent.h:294
DtAircraftLightingStateComponentData()
Definition: aircraftLightingStateComponent.h:18
int myRefuelingStation1DayNight
Definition: aircraftLightingStateComponent.h:117
int myFormationLightsLuminance
Definition: aircraftLightingStateComponent.h:111
virtual void updateDataStorage() override
Implement to update data storage. Called from advanceFrame.
Definition: aircraftLightingStateComponent.h:297