12 #include <legionStandardOM/sets/readRadioReceiverRepository.hpp>
13 #include <legionStandardOM/sets/writeRadioReceiverRepository.hpp>
20 : myHostId(
DtUUID::nullUUID())
21 , myTransmitterId(
DtUUID::nullUUID())
29 : myHostId(orig.myHostId)
30 , myTransmitterId(orig.myTransmitterId)
31 , myReceiverState(orig.myReceiverState)
32 , myReceivedPower(orig.myReceivedPower)
33 , myRadioId(orig.myRadioId)
56 DtUUID myTransmitterId;
57 unsigned int myReceiverState;
58 float myReceivedPower;
70 : DtFrameStateInterface(storage)
91 virtual const DtUUID hostId()
const override;
93 virtual const DtUUID& transmitterId()
const override;
94 virtual void setTransmitterId(
const DtUUID&)
override;
96 virtual const unsigned int receiverState()
const override;
97 virtual void setReceiverState(
const unsigned int&)
override;
99 virtual const UInt64 radioId()
const override;
100 virtual void setRadioId(
const UInt64&)
override;
102 virtual const float receivedPower()
const override;
103 virtual void setReceivedPower(
const float&)
override;
106 virtual void makeWritable()
override;
109 virtual void makeReadOnly()
override;
111 virtual Legion::WriteStateInstance writeStateInstance()
override;
112 virtual void updateStateData(
DtStateData*)
override;
114 void cleanupWriteState();
115 void setPublishingOnLegionNetwork(
bool b);
132 virtual const DtUUID hostId()
const override;
133 virtual const DtUUID& transmitterId()
const override;
134 virtual const unsigned int receiverState()
const override;
135 virtual const UInt64 radioId()
const override;
136 virtual const float receivedPower()
const override;
138 bool readComponentValid()
const;
139 bool findReadComponent();
141 virtual void updateStateData(
DtStateData*)
override;
149 virtual void handleDataUpdated();
171 if (myNextFrameState.isWritable())
173 myCurrentFrameState.advanceFrame(myNextFrameState.frameState());
175 myCurrentFrameState.emitComponentUpdated();
179 virtual bool forceAdvance()
override;
182 virtual void firstFrameAdvance()
override;
186 myCurrentFrameState.updateStateData(sd);
187 myNextFrameState.updateStateData(sd);
193 myCurrentFrameState.aboutToBeDeleted();
194 myNextFrameState.aboutToBeDeleted();
197 virtual void completeSetup()
override;
198 virtual void removeAdditionalStateComponents()
override;
199 virtual void setPublishingOnLegionNetwork(
bool b)
override;
UUID is a unique ID wrapper class.
Definition: uuid.h:59
DtStateComponentCreator< DtRadioReceiverStateComponentImplementation > DtRadioReceiverStateComponentCreator
5) Define the creator. This will need to be registered with the REGISTER_STATE_COMPONENT macro in the...
Definition: radioReceiverStateComponent.h:209
virtual void aboutToBeDeleted() override
Definition: radioReceiverStateComponent.h:190
DtRadioReceiverStateComponentNextFrame myNextFrameState
Definition: radioReceiverStateComponent.h:203
const DtRadioReceiverStateComponentData & frameState() const
Definition: radioReceiverStateComponent.h:130
float myReceivedPower
Definition: radioReceiverStateComponent.h:58
UInt64 myRadioId
Definition: radioReceiverStateComponent.h:59
bool myFoundComponent
Definition: radioReceiverStateComponent.h:204
bool isDoubleBuffered()
Definition: radioReceiverStateComponent.h:164
DtRadioReceiverStateComponentData(const DtRadioReceiverStateComponentData &orig)
Definition: radioReceiverStateComponent.h:28
Definition: stateComponent.h:269
DtUUID myTransmitterId
Definition: radioReceiverStateComponent.h:56
2) Define the next frame class. This will be used for write access.
Definition: radioReceiverStateComponent.h:82
3) Define the current frame class. This will be used for read access.
Definition: radioReceiverStateComponent.h:124
virtual void updateStateData(DtStateData *sd) override
Implement to update data storage to the new state data.
Definition: radioReceiverStateComponent.h:184
#define UNDEFINED_RETURNVALUE_ACCESSOR(ReturnType, Member)
Definition: doubleBufferedDataStorage.h:31
Contains the DtUUID class declaration.
DtRadioReceiverStateComponentData myData
Definition: radioReceiverStateComponent.h:118
unsigned long long UInt64
Definition: stateDataTypes.h:17
DtRadioReceiverStateComponentData()
Definition: radioReceiverStateComponent.h:19
const DtRadioReceiverStateComponentData & frameState() const
Definition: radioReceiverStateComponent.h:88
The overall structure of the DtStateData mechanism is: The DtStateData contains a list of double buff...
Definition: stateData.h:398
virtual DtFrameStateInterface * nextFrameState() override
Definition: radioReceiverStateComponent.h:166
LOM::WriteRadioReceiverRepository myWriteRadioReceiverRepository
Definition: radioReceiverStateComponent.h:119
#define DEFINE_STATE_COMPONENT_TYPE(CreatedComponent)
Definition: stateComponent.h:231
Subclass from this to indicate that this will be a double buffered state component.
Definition: stateComponent.h:384
LOM::ReadRadioReceiverRepository myReadRadioReceiverRepository
Definition: radioReceiverStateComponent.h:153
void advanceFrame(const DtRadioReceiverStateComponentData &data)
Definition: radioReceiverStateComponent.h:145
4) Define the state component that will contain the wrappers to the next and current frame states tha...
Definition: radioReceiverStateComponent.h:159
#define UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(Type, Member, Set)
Definition: doubleBufferedDataStorage.h:53
virtual void aboutToBeDeleted()
Definition: radioReceiverStateComponent.h:17
DtRadioReceiverStateComponentData & operator=(const DtRadioReceiverStateComponentData &orig)
Definition: radioReceiverStateComponent.h:37
#define UNDEFINED_RETURNREF_ACCESSOR_MUTATOR(Type, Member, Set)
Definition: doubleBufferedDataStorage.h:57
virtual const DtFrameStateInterface * nextFrameState() const override
Definition: radioReceiverStateComponent.h:167
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: radioReceiverStateComponent.h:64
#define DEFINE_ACCESSOR_MUTATOR(ReturnType, Accessor, Mutator)
Definition: doubleBufferedDataStorage.h:23
virtual const DtFrameStateInterface * currentFrameState() const override
Definition: radioReceiverStateComponent.h:165
DtUUID myHostId
Definition: radioReceiverStateComponent.h:55
virtual void updateDataStorage() override
Implement to update data storage. Called from advanceFrame.
Definition: radioReceiverStateComponent.h:169
#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
bool myPublishingOnLegionNetwork
Definition: radioReceiverStateComponent.h:120
DtRadioReceiverStateComponentData & frameState()
Definition: radioReceiverStateComponent.h:89
Contains the DtStateComponent class declaration.
DtRadioReceiverStateComponentData myData
Definition: radioReceiverStateComponent.h:152
This is a simple base class that will be used to return a pointer to current or next frame state...
Definition: stateComponent.h:294
unsigned int myReceiverState
Definition: radioReceiverStateComponent.h:57
Definition: stateComponent.h:94
DtRadioReceiverStateComponentCurrentFrame myCurrentFrameState
Definition: radioReceiverStateComponent.h:202
int myCallbackHandle
Definition: radioReceiverStateComponent.h:154