10 #include <matrix/vlVector.h>
74 : DtFrameStateInterface(storage)
113 const DtUUID& hostId()
const;
117 void setHostId(
const DtUUID& uuid);
126 const unsigned systemId()
const;
130 void setSystemId(
const unsigned&
id);
139 const unsigned modelNumber()
const;
143 void setModelNumber(
const unsigned& mn);
154 virtual void makeReadOnly() {};
181 const DtUUID& hostId()
const;
185 const unsigned systemId()
const;
189 const unsigned modelNumber()
const;
205 virtual void handleDataUpdated();
248 if (myNextFrameState.isWritable())
250 myCurrentFrameState.advanceFrame(myNextFrameState.frameState());
252 myCurrentFrameState.emitComponentUpdated();
259 myCurrentFrameState.updateStateData(sd);
260 myNextFrameState.updateStateData(sd);
272 myCurrentFrameState.aboutToBeDeleted();
273 myNextFrameState.aboutToBeDeleted();
UUID is a unique ID wrapper class.
Definition: uuid.h:59
void updateStateData(DtStateData *sd)
Updates the state data reference for both frame instances.
Definition: exampleEmbeddedSystemStateComponent.h:257
DtUUID myHostId
Generates accessor/mutator methods for hostId.
Definition: exampleEmbeddedSystemStateComponent.h:55
DtExampleEmbeddedSystemStateComponentData & operator=(const DtExampleEmbeddedSystemStateComponentData &orig)
Assignment operator.
Definition: exampleEmbeddedSystemStateComponent.h:38
const DtExampleEmbeddedSystemStateComponentData & frameState() const
Provides read-only access to the complete current frame state data.
Definition: exampleEmbeddedSystemStateComponent.h:174
Default creator implementation for a state component type. T_StateComponent is the concrete component...
Definition: stateComponent.h:326
DtExampleEmbeddedSystemStateComponentCurrentFrame myCurrentFrameState
Current frame state instance (read-only access)
Definition: exampleEmbeddedSystemStateComponent.h:280
Contains the DtUUID class declaration.
unsigned mySystemId
Unique identifier of this embedded system.
Definition: exampleEmbeddedSystemStateComponent.h:56
const DtExampleEmbeddedSystemStateComponentData & frameState() const
Provides read-only access to the complete frame state data.
Definition: exampleEmbeddedSystemStateComponent.h:100
Next frame class providing write access to embedded system state. Used by controller components to up...
Definition: exampleEmbeddedSystemStateComponent.h:88
DtExampleEmbeddedSystemStateComponentData myData
Internal storage for the current frame state data.
Definition: exampleEmbeddedSystemStateComponent.h:209
Implementation class that manages the double-buffered state component. Maintains both current frame a...
Definition: exampleEmbeddedSystemStateComponent.h:214
DtExampleEmbeddedSystemStateComponentData()
Default constructor - initializes all fields to default values.
Definition: exampleEmbeddedSystemStateComponent.h:20
DtExampleEmbeddedSystemStateComponentData & frameState()
Provides read-write access to the complete frame state data.
Definition: exampleEmbeddedSystemStateComponent.h:104
virtual void aboutToBeDeleted() override
Called when the component is about to be deleted.
Definition: exampleEmbeddedSystemStateComponent.h:269
The overall structure of the DtStateData mechanism is: The DtStateData contains a list of double buff...
Definition: stateData.h:513
bool isDoubleBuffered()
Indicates this component uses double buffering.
Definition: exampleEmbeddedSystemStateComponent.h:226
#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
virtual DtFrameStateInterface * nextFrameState()
Provides access to the next (read-write) frame state.
Definition: exampleEmbeddedSystemStateComponent.h:234
Subclass from this to indicate that this will be a double buffered state component.
Definition: stateComponent.h:489
Current frame class providing read-only access to embedded system state. Used by systems to read the ...
Definition: exampleEmbeddedSystemStateComponent.h:165
virtual void makeWritable()
Override to enable write access to this component.
Definition: exampleEmbeddedSystemStateComponent.h:151
#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
void advanceFrame(const DtExampleEmbeddedSystemStateComponentData &data)
Advances the current frame data with new state from next frame.
Definition: exampleEmbeddedSystemStateComponent.h:199
virtual void aboutToBeDeleted()
Called when the component is about to be deleted; emits signal_stateComponentAboutToBeDeleted.
const unsigned int ExampleEmbeddedSystemStateComponent
Unique component type identifier for the example embedded system state component. ...
Definition: exampleEmbeddedSystemStateComponent.h:61
#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
#define DEFINE_ACCESSOR_MUTATOR(ReturnType, Accessor, Mutator)
Defines a const reference accessor and an inline setter for a member variable.
Definition: doubleBufferedDataStorage.h:37
DtExampleEmbeddedSystemStateComponentData(const DtExampleEmbeddedSystemStateComponentData &orig)
Copy constructor.
Definition: exampleEmbeddedSystemStateComponent.h:28
Data structure containing all state information for an example embedded system. Holds host ID...
Definition: exampleEmbeddedSystemStateComponent.h:17
Base interface class for the example embedded system state component. Defines the common interface us...
Definition: exampleEmbeddedSystemStateComponent.h:65
const DtFrameStateInterface * currentFrameState() const
Provides access to the current (read-only) frame state.
Definition: exampleEmbeddedSystemStateComponent.h:230
DtExampleEmbeddedSystemStateComponentNextFrame myNextFrameState
Next frame state instance (read-write access)
Definition: exampleEmbeddedSystemStateComponent.h:283
void updateDataStorage()
Updates the data storage by advancing current frame with next frame data.
Definition: exampleEmbeddedSystemStateComponent.h:246
unsigned myModelNumber
Model/type identifier for this system.
Definition: exampleEmbeddedSystemStateComponent.h:57
DtStateComponentCreator< DtExampleEmbeddedSystemStateComponentImplementation > DtExampleEmbeddedSystemStateComponentCreator
Factory creator for the example embedded system state component.
Definition: exampleEmbeddedSystemStateComponent.h:287
Contains the DtStateComponent class declaration.
virtual const DtFrameStateInterface * nextFrameState() const
Provides const access to the next frame state.
Definition: exampleEmbeddedSystemStateComponent.h:238
Base interface for accessing current or next frame state in a double-buffered state component...
Definition: stateComponent.h:354