VR-Forces 4.0.4 Class Documentation
include/vrfmodel/aggregatedPatrolController.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 2004 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 /*******************************************************************************
00006 ** $RCSfile: aggregatedPatrolController.h,v $ $Revision: 1.2 $ $State: Exp $
00007 *******************************************************************************/
00008 
00011 
00015 
00016 #ifndef aggregatedPatrolController_H_
00017 #define aggregatedPatrolController_H_
00018 
00019 #include "vrfobjcore/singleTaskControllerComponent.h"
00020 #include "vrfmodel/vrfmodelDefines.h"
00021 
00022 class DtFormationState;
00023 class DtAggregatedPatrolPSR;
00024 class DtVrfObjectManager;
00025 
00036 class DT_DLL_vrfmodel DtAggregatedPatrolController : public DtSingleTaskControllerComponent
00037 {
00038 public:
00039 
00040    enum DtPatrolAlongState
00041    {
00042       DtMovingAlongRoute = 0,
00043       DtReversingDirection = 1
00044    };
00045 
00048    DtAggregatedPatrolController(const DtString& name, 
00049       DtVrfObject* owner,
00050       DtSimManager* simManager, 
00051       DtComponentDescriptor* desc = 0,
00052       DtReaderWriterRegistry* parentRegistry = 0);
00053 
00055    virtual ~DtAggregatedPatrolController();
00056 
00059    virtual DtString type() const;
00060 
00063    virtual bool init();
00064 
00066    virtual void registerTaskMsgCallbacks();
00067 
00070    DtSimTaskStatePtr currentTaskState() const;
00071 
00076    static void patrolTwoPointsTaskCallback(DtSimMessage * msg, void * usr, DtSimTaskStatePtr taskStatePtr);
00077 
00081    static void patrolAlongTaskCallback(DtSimMessage * msg, void * usr, DtSimTaskStatePtr taskStatePtr);
00082 
00087    static void taskCompleteReportCallback(DtSimMessage * msg, void * usr);
00088 
00092    static DtSimComponent * creator(const DtString& name, 
00093       DtVrfObject* owner,
00094       DtSimManager* simManager, 
00095       DtComponentDescriptor* desc = 0,
00096       DtReaderWriterRegistry* parentRegistry = 0);
00097 
00098 protected:
00099 
00104    virtual void onPatrolTwoPointsTask(DtSimMessage * msg, DtSimTaskStatePtr taskStatePtr);
00105 
00113    virtual void onTaskComplete(DtSimMessage * msg);
00114 
00122    virtual bool moveTo(const DtString& controlPointName);
00123 
00127    virtual void processPatrolAlongTask(DtSimMessage * msg, DtSimTaskStatePtr taskStatePtr);
00128 
00134    virtual bool createPSR();
00135 
00143    virtual DtIteratorDirection initialTraversalDirection(
00144       const DtString& routeName, const DtVector& initialWorldPosition) const;
00145 
00154    virtual void sendMoveAlongToSelf(const DtString& routeName,
00155       enum DtIteratorDirection traversalDirection, bool startAtClosestPoint);
00156 
00157 private:
00158 
00160    DtAggregatedPatrolController(const DtAggregatedPatrolController& orig);
00161 
00163    DtAggregatedPatrolController& operator=(const DtAggregatedPatrolController& orig);
00164 protected:
00165 
00168    DtAggregatedPatrolPSR* myProcessState;
00169 };
00170 
00171 #endif

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)