13 #include <tbb/mutex.h>
39 virtual bool init()
override;
43 virtual const char*
type()
const override;
47 virtual void tick()
override;
60 virtual bool createPSR();
62 static void syncMatrixRenameRequestCallback(
const DtVrfObjectMessage * msg,
void* usr);
65 static void syncMatrixRemovePhaseRequestCallback(
const DtVrfObjectMessage * msg,
void* usr);
71 static void syncMatrixAddObjectsRequestCallback(
const DtVrfObjectMessage * msg,
void* usr);
74 static void syncMatrixRemoveObjectRequestCallback(
const DtVrfObjectMessage * msg,
void* usr);
80 static void syncMatrixSetPlanRequestCallback(
const DtVrfObjectMessage * msg,
void* usr);
83 static void syncMatrixRemovePlanRequestCallback(
const DtVrfObjectMessage * msg,
void* usr);
86 static void syncMatrixPhaseInfoRequestCallback(
const DtVrfObjectMessage * msg,
void* usr);
89 static void syncMatrixActivatePlanRequestCallback(
const DtVrfObjectMessage * msg,
void* usr);
92 static void planStatementMessageCallback(
DtSimMessage* msg,
void* usr);
93 virtual void processPlanStatementMessage(
DtSimMessage* msg);
96 virtual void sendSyncMatrixRenameResponse();
99 virtual void sendSyncMatrixRemoveResponse();
102 virtual void sendSyncMatrixRemovePhaseResponse(
const DtString& phaseName);
105 virtual void sendSyncMatrixInfoResponse();
108 virtual void sendSyncMatrixObjectsListResponse(
bool refreshPlans);
111 virtual void sendSyncMatrixPhaseInfoResponse(
const DtString& origName,
int phaseIndex,
DtRwSyncMatrixPhase* phase,
bool endConditionSpecified =
true);
114 virtual void sendSyncMatrixMoveToPhase(
const DtString& requestedPhase,
115 const DtString& previousPhase =
"",
bool previousPhaseCompleted =
false);
123 virtual bool isObjectSuperior(
const DtUUID& object1,
const DtUUID& object2,
bool direct =
false);
126 virtual void mergeRequestedObjects(
const std::vector<DtUUID>& requestedObjects);
137 virtual void removeObjectByUUID(
const DtUUID& uuid,
bool mergeSubordinates);
140 virtual void processSuperiorChanged(
const DtSimObject*
object,
const DtUUID& oldSuperior,
const DtUUID& newSuperior);
142 virtual void executePhasePlans();
143 virtual void processPhasePlansStatus();
145 virtual DtPlan* createAndInitPlan(
const DtUUID&
object);
147 virtual void activatePlan(
const DtUUID& uuid,
const DtString& phaseName,
bool activate);
150 virtual void abandonPlan(
const DtUUID& uuid);
151 virtual void registerToPlanStatus(
const DtUUID& uuid);
153 virtual void proceedToNextPhase();
155 void initSuperiorChangedCallbacksMap();
156 void resetSuperiorChangedCallbacksMap();
157 void registerSuperiorChangedCallbacks();
160 virtual void initPlanPhaseCallbacks();
UUID is a unique ID wrapper class.
Definition: uuid.h:59
class DtRwSyncMatrixPlan:
Definition: rwSyncMatrixPlan.h:23
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
const DtControllerComponent & operator=(const DtControllerComponent &orig)
assignment operator
virtual void preFirstTickInit()
This function can be overridden to initialize a component before it is ticked for the first time...
DtSyncMatrixControllerPSR * myProcessState
Definition: syncMatrixController.h:178
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:49
virtual const char * type() const override=0
This returns a string from compTypes.h, and identifies the type of component.
Definition: readerWriterRegistry.h:39
tbb::mutex myRemovalMutex
Definition: syncMatrixController.h:184
This class controls a synchronization matrix by assigning its objects with plans according to its pha...
Definition: syncMatrixController.h:25
virtual bool init() override
Calls setRadio()
File: simMsg.h.
Definition: simMessage.h:35
std::map< DtUUID, boost::signals2::scoped_connection > SuperiorChangedCallbacksMap
Definition: syncMatrixController.h:19
virtual void tick()
This gives the thread of control to the component. The component is ticked once each simulation from ...
boost::signals2::scoped_connection mySimObjectDeletedConnection
Definition: syncMatrixController.h:180
The base class for all messages to/from a specific DtVrfObject. Various subclasses of this class will...
Definition: vrfObjectMessage.h:30
End User Description: DtControllerComponent is the base class for all controllers components...
Definition: controllerComponent.h:31
class DtPlan:
Definition: plan.h:92
SuperiorChangedCallbacksMap mySuperiorChangedCallbacksMap
Definition: syncMatrixController.h:182
class DtRwSyncMatrixPhase:
Definition: rwSyncMatrixPhase.h:23
DtSyncMatrixControllerPSR is a process state repository which holds state variables for the DtSyncMat...
Definition: syncMatrixControllerPSR.h:20
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:96
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:89
Represents a single simulation object in the exercise. Object may be VRF simulation, or non-VRF simulated, and may be simulated by the local sim engine, or by a remote sim engine. Only public (external) state of the object is available. All data is read-only. All access to data of the object is thread safe within the simulation frame.
Definition: simObject.h:80
bool mySuperiorChangedRegistrationIsComplete
Definition: syncMatrixController.h:183
A locally simulated VRF object.
Definition: localObject.h:98
This list stores entries of DtRwSyncMatrixPlan.
Definition: rwSyncMatrixPlanList.h:17