10 #include <legionStandardOM/sets/readDesignatorRepository.hpp>
11 #include <legionStandardOM/sets/writeDesignatorRepository.hpp>
13 #include <matrix/vlVector.h>
23 : myDesignatedObject(
DtUUID::nullUUID())
24 , myDesignatorId(
DtUUID::nullUUID())
29 : myDesignatedObject(orig.myDesignatedObject)
30 , myDesignatorId(orig.myDesignatorId)
31 , myGlobalId(orig.myGlobalId)
49 DtUUID myDesignatedObject;
50 DtUUID myDesignatorId;
62 : DtFrameStateInterface(storage)
89 const DtUUID& designatedObject()
const;
90 void setDesignatedObject(
const DtUUID&);
92 const DtUUID& designatorId()
const;
93 void setDesignatorId(
const DtUUID&);
95 const unsigned int designatorCode()
const;
96 void setDesignatorCode(
const unsigned int&);
98 const unsigned int drAlgorithm()
const;
99 void setDrAlgorithm(
const unsigned int&);
101 const unsigned int codeName()
const;
102 void setCodeName(
const unsigned int&);
104 const DtVector spotLinearAcceleration()
const;
105 void setSpotLinearAcceleration(
const DtVector&);
107 const double designatorPower()
const;
108 void setDesignatorPower(
const double&);
110 const double designatorWavelength()
const;
111 void setDesignatorWavelength(
const double&);
113 const DtVector designatorSpotLocation()
const;
114 void setDesignatorSpotLocation(
const DtVector&);
116 const DtString& globalId()
const;
117 void setGlobalId(
const DtString&);
120 virtual void makeWritable();
123 virtual void makeReadOnly();
124 void cleanupWriteState();
142 const DtUUID& designatedObject()
const;
143 const DtUUID& designatorId()
const;
144 const unsigned int designatorCode()
const;
145 const double designatorPower()
const;
146 const double designatorWavelength()
const;
147 const DtVector designatorSpotLocation()
const;
148 const unsigned int codeName()
const;
149 const DtVector spotLinearAcceleration()
const;
150 const unsigned int drAlgorithm()
const;
153 bool readComponentValid()
const;
154 bool findReadComponent();
157 void handleDataUpdated();
184 virtual bool forceAdvance()
override;
188 if (myNextFrameState.isWritable())
190 myCurrentFrameState.advanceFrame(myNextFrameState.frameState());
193 myCurrentFrameState.emitComponentUpdated();
198 myCurrentFrameState.updateStateData(sd);
199 myNextFrameState.updateStateData(sd);
205 myCurrentFrameState.aboutToBeDeleted();
206 myNextFrameState.aboutToBeDeleted();
209 virtual void firstFrameAdvance()
override;
210 virtual void removeAdditionalStateComponents()
override;
UUID is a unique ID wrapper class.
Definition: rwUUID.h:226
const DtLaserDesignatorStateComponentData & frameState() const
Current frame state only can access current frame buffers. This ensures thread safety.
Definition: laserDesignatorStateComponent.h:140
void updateStateData(DtStateData *sd)
Implement to update data storage to the new state data.
Definition: laserDesignatorStateComponent.h:196
Definition: stateComponent.h:79
DtLaserDesignatorStateComponentData myData
Definition: laserDesignatorStateComponent.h:166
DtUUID myDesignatedObject
Definition: laserDesignatorStateComponent.h:49
DtStateData * myStateData
Definition: laserDesignatorStateComponent.h:169
LOM::ReadDesignatorRepository myReadDesignatorRepository
Definition: laserDesignatorStateComponent.h:167
Definition: stateComponent.h:257
DtStateComponentCreator< DtLaserDesignatorStateComponentImplementation > DtLaserDesignatorStateComponentCreator
5) Define the creator. This will need to be registered with the REGISTER_STATE_COMPONENT macro in the...
Definition: laserDesignatorStateComponent.h:220
DtLaserDesignatorStateComponentData & operator=(const DtLaserDesignatorStateComponentData &rhs)
Definition: laserDesignatorStateComponent.h:35
DtLaserDesignatorStateComponentNextFrame myNextFrameState
Definition: laserDesignatorStateComponent.h:214
Contains the DtUUID class declaration.
4) Define the state component that will contain the wrappers to the next and current frame states tha...
Definition: laserDesignatorStateComponent.h:174
void updateDataStorage()
Implement to update data storage. Called from advanceFrame.
Definition: laserDesignatorStateComponent.h:186
DtStateData * myStateData
Definition: laserDesignatorStateComponent.h:129
virtual DtFrameStateInterface * nextFrameState()
Definition: laserDesignatorStateComponent.h:181
The DtLaserDesignatorStateComponentList is a collection of laser designators. Each laser designator m...
Definition: laserDesignatorStateComponent.h:20
DtLaserDesignatorStateComponentData()
Definition: laserDesignatorStateComponent.h:22
The overall structure of the DtStateData mechanism is: The DtStateData contains a list of double buff...
Definition: stateData.h:336
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: laserDesignatorStateComponent.h:56
#define DEFINE_STATE_COMPONENT_TYPE(CreatedComponent)
Definition: stateComponent.h:219
Subclass from this to indicate that this will be a double buffered state component.
Definition: stateComponent.h:365
#define UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(Type, Member, Set)
Definition: doubleBufferedDataStorage.h:53
LOM::WriteDesignatorRepository myWriteDesignatorRepository
Definition: laserDesignatorStateComponent.h:128
DtUUID myDesignatorId
Definition: laserDesignatorStateComponent.h:50
DtLaserDesignatorStateComponentData & frameState()
Definition: laserDesignatorStateComponent.h:87
2) Define the next frame class. This will be used for write access.
Definition: laserDesignatorStateComponent.h:79
virtual void aboutToBeDeleted()
bool isDoubleBuffered()
Definition: laserDesignatorStateComponent.h:179
3) Define the current frame class. This will be used for read access.
Definition: laserDesignatorStateComponent.h:133
#define UNDEFINED_RETURNREF_ACCESSOR_MUTATOR(Type, Member, Set)
Definition: doubleBufferedDataStorage.h:57
#define DEFINE_ACCESSOR_MUTATOR(ReturnType, Accessor, Mutator)
Definition: doubleBufferedDataStorage.h:23
DtLaserDesignatorStateComponentData myData
Definition: laserDesignatorStateComponent.h:127
virtual void aboutToBeDeleted() override
Definition: laserDesignatorStateComponent.h:202
int myCallbackHandle
Definition: laserDesignatorStateComponent.h:168
#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
const DtLaserDesignatorStateComponentData & frameState() const
Next frame access write access. Ensure this is only used in a single thread (i.e.a controller thread)...
Definition: laserDesignatorStateComponent.h:86
const DtFrameStateInterface * currentFrameState() const
Definition: laserDesignatorStateComponent.h:180
DtLaserDesignatorStateComponentCurrentFrame myCurrentFrameState
Definition: laserDesignatorStateComponent.h:213
Contains the DtStateComponent class declaration.
bool myFoundComponent
Definition: laserDesignatorStateComponent.h:215
DtString myGlobalId
Definition: laserDesignatorStateComponent.h:51
DtLaserDesignatorStateComponentData(const DtLaserDesignatorStateComponentData &orig)
Definition: laserDesignatorStateComponent.h:28
This is a simple base class that will be used to return a pointer to current or next frame state...
Definition: stateComponent.h:282
void advanceFrame(const DtLaserDesignatorStateComponentData &data)
Definition: laserDesignatorStateComponent.h:160
virtual const DtFrameStateInterface * nextFrameState() const
Definition: laserDesignatorStateComponent.h:182