10 #include "legionDataStore/writeStateInstance.h"
12 #include <vlutil/vlString.h>
68 : DtFrameStateInterface(storage)
92 const int mmsi()
const;
93 void setMmsi(
const int&);
95 const int imo()
const;
96 void setImo(
const int&);
98 const int eta()
const;
99 void setEta(
const int&);
101 const DtString destination()
const;
102 void setDestination(
const DtString&);
104 const int status()
const;
105 void setStatus(
const int&);
111 virtual void makeReadOnly() {};
130 const int mmsi()
const;
131 const int imo()
const;
132 const int eta()
const;
134 const int status()
const;
136 friend class DtAisDataStateImplementation;
161 if (myNextFrameState.isWritable())
163 myCurrentFrameState.advanceFrame(myNextFrameState.frameState());
166 myCurrentFrameState.emitComponentUpdated();
171 myCurrentFrameState.updateStateData(sd);
172 myNextFrameState.updateStateData(sd);
178 myCurrentFrameState.aboutToBeDeleted();
179 myNextFrameState.aboutToBeDeleted();
DtAisDataStateComponentData myData
Definition: aisDataStateComponent.h:116
int myImo
Definition: aisDataStateComponent.h:54
bool isDoubleBuffered()
Definition: aisDataStateComponent.h:154
const DtFrameStateInterface * currentFrameState() const
Definition: aisDataStateComponent.h:155
3) Define the current frame class. This will be used for read access.
Definition: aisDataStateComponent.h:120
Definition: stateComponent.h:266
const DtAisDataStateComponentData & frameState() const
Next frame access write access. Ensure this is only used in a single thread (i.e.a controller thread)...
Definition: aisDataStateComponent.h:89
virtual void aboutToBeDeleted() override
Definition: aisDataStateComponent.h:175
4) Define the state component that will contain the wrappers to the next and current frame states tha...
Definition: aisDataStateComponent.h:149
virtual DtFrameStateInterface * nextFrameState()
Definition: aisDataStateComponent.h:156
DtStateComponentCreator< DtAisDataStateComponentImplementation > DtAisDataStateComponentCreator
5) Define the creator. This will need to be registered with the REGISTER_STATE_COMPONENT macro in the...
Definition: aisDataStateComponent.h:189
DtAisDataStateComponentData()
Definition: aisDataStateComponent.h:18
int myStatus
Definition: aisDataStateComponent.h:56
The overall structure of the DtStateData mechanism is: The DtStateData contains a list of double buff...
Definition: stateData.h:339
#define DEFINE_STATE_COMPONENT_TYPE(CreatedComponent)
Definition: stateComponent.h:228
Subclass from this to indicate that this will be a double buffered state component.
Definition: stateComponent.h:379
DtStateData * myStateData
Definition: aisDataStateComponent.h:143
void advanceFrame(const DtAisDataStateComponentData &data)
Definition: aisDataStateComponent.h:137
#define UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(Type, Member, Set)
Definition: doubleBufferedDataStorage.h:53
void updateStateData(DtStateData *sd)
Implement to update data storage to the new state data.
Definition: aisDataStateComponent.h:169
virtual void aboutToBeDeleted()
virtual void makeWritable()
Override to make component writable.
Definition: aisDataStateComponent.h:108
DtAisDataStateComponentData & frameState()
Definition: aisDataStateComponent.h:90
Definition: aisDataStateComponent.h:16
int myMmsi
Definition: aisDataStateComponent.h:53
#define DEFINE_ACCESSOR_MUTATOR(ReturnType, Accessor, Mutator)
Definition: doubleBufferedDataStorage.h:23
virtual const DtFrameStateInterface * nextFrameState() const
Definition: aisDataStateComponent.h:157
Definition: stateComponent.h:95
const DtAisDataStateComponentData & frameState() const
Current frame state only can access current frame buffers. This ensures thread safety.
Definition: aisDataStateComponent.h:128
DtAisDataStateComponentData & operator=(const DtAisDataStateComponentData &orig)
Definition: aisDataStateComponent.h:35
DtAisDataStateComponentNextFrame myNextFrameState
Definition: aisDataStateComponent.h:184
void updateDataStorage()
Implement to update data storage. Called from advanceFrame.
Definition: aisDataStateComponent.h:159
#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
DtString myDestination
Definition: aisDataStateComponent.h:57
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: aisDataStateComponent.h:62
2) Define the next frame class. This will be used for write access.
Definition: aisDataStateComponent.h:81
DtAisDataStateComponentData(const DtAisDataStateComponentData &orig)
Definition: aisDataStateComponent.h:26
Contains the DtStateComponent class declaration.
int myEta
Definition: aisDataStateComponent.h:55
DtAisDataStateComponentData myData
Definition: aisDataStateComponent.h:144
This is a simple base class that will be used to return a pointer to current or next frame state...
Definition: stateComponent.h:291
DtAisDataStateComponentCurrentFrame myCurrentFrameState
Definition: aisDataStateComponent.h:183