10 #include "legionDataStore/writeStateInstance.h"
12 #include <vlutil/vlString.h>
159 : DtFrameStateInterface(storage)
197 virtual const int antiCollisionLightsDayNight()
const override;
198 virtual void setAntiCollisionLightsDayNight(
const int&)
override;
200 virtual const int antiCollisionLightsFlashing()
const override;
201 virtual void setAntiCollisionLightsFlashing(
const int&)
override;
203 virtual const int formationLightsLuminance()
const override;
204 virtual void setFormationLightsLuminance(
const int&)
override;
206 virtual const int navigationLightsFlashing()
const override;
207 virtual void setNavigationLightsFlashing(
const int&)
override;
209 virtual const int nvgMode()
const override;
210 virtual void setNvgMode(
const int&)
override;
212 virtual const bool taxiwayLightsOn()
const override;
213 virtual void setTaxiwayLightsOn(
const bool&)
override;
215 virtual const bool hduLightsOn()
const override;
216 virtual void setHduLightsOn(
const bool&)
override;
218 virtual const bool refuelingStation1LightsOn()
const override;
219 virtual void setRefuelingStation1LightsOn(
const bool&)
override;
221 virtual const int refuelingStation1LightsColor()
const override;
222 virtual void setRefuelingStation1LightsColor(
const int&)
override;
224 virtual const bool refuelingStation1LightsFlashing()
const override;
225 virtual void setRefuelingStation1LightsFlashing(
const bool&)
override;
227 virtual const int refuelingStation1DayNight()
const override;
228 virtual void setRefuelingStation1DayNight(
const int&)
override;
230 virtual const bool refuelingStation2LightsOn()
const override;
231 virtual void setRefuelingStation2LightsOn(
const bool&)
override;
233 virtual const int refuelingStation2LightsColor()
const override;
234 virtual void setRefuelingStation2LightsColor(
const int&)
override;
236 virtual const bool refuelingStation2LightsFlashing()
const override;
237 virtual void setRefuelingStation2LightsFlashing(
const bool&)
override;
239 virtual const int refuelingStation2DayNight()
const override;
240 virtual void setRefuelingStation2DayNight(
const int&)
override;
242 virtual const bool refuelingStation3LightsOn()
const override;
243 virtual void setRefuelingStation3LightsOn(
const bool&)
override;
245 virtual const int refuelingStation3LightsColor()
const override;
246 virtual void setRefuelingStation3LightsColor(
const int&)
override;
248 virtual const bool refuelingStation3LightsFlashing()
const override;
249 virtual void setRefuelingStation3LightsFlashing(
const bool&)
override;
251 virtual const int refuelingStation3DayNight()
const override;
252 virtual void setRefuelingStation3DayNight(
const int&)
override;
258 virtual void makeReadOnly()
override {};
277 virtual const int antiCollisionLightsDayNight()
const override;
278 virtual const int antiCollisionLightsFlashing()
const override;
279 virtual const int formationLightsLuminance()
const override;
280 virtual const int navigationLightsFlashing()
const override;
281 virtual const int nvgMode()
const override;
282 virtual const bool taxiwayLightsOn()
const override;
283 virtual const bool hduLightsOn()
const override;
284 virtual const bool refuelingStation1LightsOn()
const override;
285 virtual const int refuelingStation1LightsColor()
const override;
286 virtual const bool refuelingStation1LightsFlashing()
const override;
287 virtual const int refuelingStation1DayNight()
const override;
288 virtual const bool refuelingStation2LightsOn()
const override;
289 virtual const int refuelingStation2LightsColor()
const override;
290 virtual const bool refuelingStation2LightsFlashing()
const override;
291 virtual const int refuelingStation2DayNight()
const override;
292 virtual const bool refuelingStation3LightsOn()
const override;
293 virtual const int refuelingStation3LightsColor()
const override;
294 virtual const bool refuelingStation3LightsFlashing()
const override;
295 virtual const int refuelingStation3DayNight()
const override;
297 friend class DtAircraftLightingStateImplementation;
319 if (myNextFrameState.isWritable())
321 myCurrentFrameState.advanceFrame(myNextFrameState.frameState());
324 myCurrentFrameState.emitComponentUpdated();
329 myCurrentFrameState.updateStateData(sd);
330 myNextFrameState.updateStateData(sd);
336 myCurrentFrameState.aboutToBeDeleted();
337 myNextFrameState.aboutToBeDeleted();
int myRefuelingStation2LightsColor
Light color for aerial refueling station 2.
Definition: aircraftLightingStateComponent.h:124
int myRefuelingStation3DayNight
Day/night mode for aerial refueling station 3 lights.
Definition: aircraftLightingStateComponent.h:132
int myRefuelingStation2DayNight
Day/night mode for aerial refueling station 2 lights.
Definition: aircraftLightingStateComponent.h:130
bool myRefuelingStation3LightsOn
Whether aerial refueling station 3 lights are on.
Definition: aircraftLightingStateComponent.h:142
Default creator implementation for a state component type. T_StateComponent is the concrete component...
Definition: stateComponent.h:326
bool myRefuelingStation3LightsFlashing
Whether aerial refueling station 3 lights are flashing.
Definition: aircraftLightingStateComponent.h:148
bool myTaxiwayLightsOn
Whether taxiway lights are on.
Definition: aircraftLightingStateComponent.h:134
bool myRefuelingStation1LightsFlashing
Whether aerial refueling station 1 lights are flashing.
Definition: aircraftLightingStateComponent.h:144
bool myHduLightsOn
Whether HDU (Heads-Down Unit) lights are on.
Definition: aircraftLightingStateComponent.h:136
virtual void aboutToBeDeleted() override
Called when the component is about to be deleted; emits signal_stateComponentAboutToBeDeleted.
Definition: aircraftLightingStateComponent.h:333
DtStateComponentCreator< DtAircraftLightingStateComponentImplementation > DtAircraftLightingStateComponentCreator
5) Define the creator. This will need to be registered with the REGISTER_STATE_COMPONENT macro in the...
Definition: aircraftLightingStateComponent.h:349
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:194
int myRefuelingStation3LightsColor
Light color for aerial refueling station 3.
Definition: aircraftLightingStateComponent.h:126
int myNavigationLightsFlashing
Flashing mode for navigation lights.
Definition: aircraftLightingStateComponent.h:118
DtAircraftLightingStateComponentNextFrame myNextFrameState
Next frame state providing write access from the controller thread.
Definition: aircraftLightingStateComponent.h:344
virtual const DtFrameStateInterface * currentFrameState() const override
Returns the read-only current frame state. Throws if not double-buffered.
Definition: aircraftLightingStateComponent.h:313
int myRefuelingStation1LightsColor
Light color for aerial refueling station 1.
Definition: aircraftLightingStateComponent.h:122
int myNvgMode
Night-vision goggle (NVG) compatibility mode.
Definition: aircraftLightingStateComponent.h:120
Data container for aircraft lighting state, including anti-collision, formation, navigation, NVG mode, taxiway, HDU, and aerial refueling station light properties.
Definition: aircraftLightingStateComponent.h:18
DtAircraftLightingStateComponentData & operator=(const DtAircraftLightingStateComponentData &orig)
Definition: aircraftLightingStateComponent.h:65
2) Define the next frame class. This will be used for write access.
Definition: aircraftLightingStateComponent.h:186
The overall structure of the DtStateData mechanism is: The DtStateData contains a list of double buff...
Definition: stateData.h:513
#define DEFINE_STATE_COMPONENT_TYPE(CreatedComponent)
Macro to define all required static and virtual state component type methods. Place in the public sec...
Definition: stateComponent.h:272
bool myRefuelingStation1LightsOn
Whether aerial refueling station 1 lights are on.
Definition: aircraftLightingStateComponent.h:138
DtAircraftLightingStateComponentCurrentFrame myCurrentFrameState
Current frame state providing thread-safe read access.
Definition: aircraftLightingStateComponent.h:342
Subclass from this to indicate that this will be a double buffered state component.
Definition: stateComponent.h:489
int myAntiCollisionLightsFlashing
Flashing mode for anti-collision lights.
Definition: aircraftLightingStateComponent.h:114
bool myRefuelingStation2LightsOn
Whether aerial refueling station 2 lights are on.
Definition: aircraftLightingStateComponent.h:140
virtual DtFrameStateInterface * nextFrameState() override
Returns the writable next frame state. Throws if not double-buffered.
Definition: aircraftLightingStateComponent.h:314
#define UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(Type, Member, Set)
Defines an undefined virtual by-value accessor and an undefined virtual setter, both throwing DtUnimp...
Definition: doubleBufferedDataStorage.h:103
virtual void updateStateData(DtStateData *sd) override
Implement to update data storage to the new state data.
Definition: aircraftLightingStateComponent.h:327
virtual void makeWritable() override
Override to make component writable.
Definition: aircraftLightingStateComponent.h:255
virtual void aboutToBeDeleted()
Called when the component is about to be deleted; emits signal_stateComponentAboutToBeDeleted.
bool myRefuelingStation2LightsFlashing
Whether aerial refueling station 2 lights are flashing.
Definition: aircraftLightingStateComponent.h:146
DtAircraftLightingStateComponentData & frameState()
Definition: aircraftLightingStateComponent.h:195
bool isDoubleBuffered()
Definition: aircraftLightingStateComponent.h:312
Definition: stateComponent.h:99
int myAntiCollisionLightsDayNight
Day/night mode for anti-collision lights.
Definition: aircraftLightingStateComponent.h:112
#define DEFINE_ACCESSOR_MUTATOR(ReturnType, Accessor, Mutator)
Defines a const reference accessor and an inline setter for a member variable.
Definition: doubleBufferedDataStorage.h:37
3) Define the current frame class. This will be used for read access.
Definition: aircraftLightingStateComponent.h:267
virtual const DtFrameStateInterface * nextFrameState() const override
Returns the read-only next frame state. Throws if not double-buffered.
Definition: aircraftLightingStateComponent.h:315
DtAircraftLightingStateComponentData(const DtAircraftLightingStateComponentData &orig)
Definition: aircraftLightingStateComponent.h:42
#define DT_DLL_vrfStateData
This file is used to determine how to build Disable inconsistent dll linkage warning Visual Studio 6...
Definition: vrfStateDataDefines.h:29
4) Define the state component that will contain the wrappers to the next and current frame states tha...
Definition: aircraftLightingStateComponent.h:307
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:153
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:275
Base interface for accessing current or next frame state in a double-buffered state component...
Definition: stateComponent.h:354
DtAircraftLightingStateComponentData()
Definition: aircraftLightingStateComponent.h:20
int myRefuelingStation1DayNight
Day/night mode for aerial refueling station 1 lights.
Definition: aircraftLightingStateComponent.h:128
int myFormationLightsLuminance
Luminance level for formation lights.
Definition: aircraftLightingStateComponent.h:116
virtual void updateDataStorage() override
Implement to update data storage. Called from advanceFrame.
Definition: aircraftLightingStateComponent.h:317