10 #include <matrix/vlVector.h>
48 : DtFrameStateInterface(storage)
66 virtual const double& internalCoreTemperature()
const override;
67 virtual void setInternalCoreTemperature(
const double&)
override;
73 virtual void makeReadOnly()
override {};
90 virtual const double& internalCoreTemperature()
const override;
94 void updateVrfStateComponentParameters();
96 void updateInternalTemperatureData();
125 if (myNextFrameState.isWritable())
127 myCurrentFrameState.advanceFrame(myNextFrameState.frameState());
130 myCurrentFrameState.emitComponentUpdated();
135 myCurrentFrameState.updateStateData(sd);
136 myNextFrameState.updateStateData(sd);
142 myCurrentFrameState.aboutToBeDeleted();
143 myNextFrameState.aboutToBeDeleted();
double myInternalCoreTemperature
Definition: internalTemperatureStateComponent.h:35
2) Define the next frame class. This will be used for write access.
Definition: internalTemperatureStateComponent.h:56
DtInternalTemperatureStateComponentCurrentFrame myCurrentFrameState
Definition: internalTemperatureStateComponent.h:147
DtInternalTemperatureStateComponentData & frameState()
Definition: internalTemperatureStateComponent.h:64
DtStateData * myStateData
Definition: internalTemperatureStateComponent.h:107
const DtInternalTemperatureStateComponentData & frameState() const
Next frame access write access. Ensure this is only used in a single thread (i.e.a controller thread)...
Definition: internalTemperatureStateComponent.h:63
Default creator implementation for a state component type. T_StateComponent is the concrete component...
Definition: stateComponent.h:326
virtual void updateStateData(DtStateData *sd) override
Implement to update data storage to the new state data.
Definition: internalTemperatureStateComponent.h:133
DtInternalTemperatureStateComponentData myData
Definition: internalTemperatureStateComponent.h:77
virtual void makeWritable() override
Override to make component writable.
Definition: internalTemperatureStateComponent.h:70
3) Define the current frame class. This will be used for read access.
Definition: internalTemperatureStateComponent.h:81
const unsigned int InternalTemperatureStateComponent
Definition: internalTemperatureStateComponent.h:37
const DtInternalTemperatureStateComponentData & frameState() const
Current frame state only can access current frame buffers. This ensures thread safety.
Definition: internalTemperatureStateComponent.h:88
The overall structure of the DtStateData mechanism is: The DtStateData contains a list of double buff...
Definition: stateData.h:513
void advanceFrame(const DtInternalTemperatureStateComponentData &data)
Definition: internalTemperatureStateComponent.h:99
#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
Definition: internalTemperatureStateComponent.h:14
DtInternalTemperatureStateComponentNextFrame myNextFrameState
Definition: internalTemperatureStateComponent.h:148
Subclass from this to indicate that this will be a double buffered state component.
Definition: stateComponent.h:489
virtual void aboutToBeDeleted() override
Called when the component is about to be deleted; emits signal_stateComponentAboutToBeDeleted.
Definition: internalTemperatureStateComponent.h:139
virtual void aboutToBeDeleted()
Called when the component is about to be deleted; emits signal_stateComponentAboutToBeDeleted.
boost::signals2::scoped_connection myVrfStateComponentChangedConnection
Definition: internalTemperatureStateComponent.h:105
DtInternalTemperatureStateComponentData(const DtInternalTemperatureStateComponentData &orig)
Definition: internalTemperatureStateComponent.h:20
#define UNDEFINED_RETURNREF_ACCESSOR_MUTATOR(Type, Member, Set)
Defines an undefined virtual const-reference accessor and an undefined virtual setter, both throwing DtUnimplementedMethod and requiring overrides in a derived class.
Definition: doubleBufferedDataStorage.h:112
DtInternalTemperatureStateComponentData()
Definition: internalTemperatureStateComponent.h:16
#define DEFINE_ACCESSOR_MUTATOR(ReturnType, Accessor, Mutator)
Defines a const reference accessor and an inline setter for a member variable.
Definition: doubleBufferedDataStorage.h:37
DtInternalTemperatureStateComponentData myData
Definition: internalTemperatureStateComponent.h:108
1) Define the interface class that will be used to represent the next and current frames...
Definition: internalTemperatureStateComponent.h:42
virtual DtFrameStateInterface * nextFrameState() override
Returns the writable next frame state. Throws if not double-buffered.
Definition: internalTemperatureStateComponent.h:120
DtStateComponentCreator< DtInternalTemperatureStateComponentImplementation > DtInternalTemperatureStateComponentCreator
5) Define the creator. This will need to be registered with the REGISTER_STATE_COMPONENT macro in the...
Definition: internalTemperatureStateComponent.h:153
virtual const DtFrameStateInterface * nextFrameState() const override
Returns the read-only next frame state. Throws if not double-buffered.
Definition: internalTemperatureStateComponent.h:121
boost::signals2::scoped_connection myCompleteSetupConnection
Definition: internalTemperatureStateComponent.h:106
DtInternalTemperatureStateComponentData & operator=(const DtInternalTemperatureStateComponentData &orig)
Definition: internalTemperatureStateComponent.h:25
Contains the DtStateComponent class declaration.
virtual void updateDataStorage() override
Implement to update data storage. Called from advanceFrame.
Definition: internalTemperatureStateComponent.h:123
virtual const DtFrameStateInterface * currentFrameState() const override
Returns the read-only current frame state. Throws if not double-buffered.
Definition: internalTemperatureStateComponent.h:119
Base interface for accessing current or next frame state in a double-buffered state component...
Definition: stateComponent.h:354
4) Define the state component that will contain the wrappers to the next and current frame states tha...
Definition: internalTemperatureStateComponent.h:113
bool isDoubleBuffered()
Definition: internalTemperatureStateComponent.h:118