VR-Forces 4.0.4 Class Documentation
include/vrfmodel/waitCntlr.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 1999 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 /*******************************************************************************
00006 ** $RCSfile: waitCntlr.h,v $ $Revision: 1.21 $ $State: Exp $
00007 *******************************************************************************/
00008 
00011 
00014 
00015 
00016 #ifndef DtWaitController_H_
00017 #define DtWaitController_H_
00018 
00019 #include "vrfobjcore/singleTaskControllerComponent.h"
00020 #include "vrfutil/vlClock.h"
00021 
00022 class DtString;
00023 class DtSimManager;
00024 class DtTaskMessage;
00025 class DtSimMessage;
00026 class DtWaitingPSR;
00027 
00036 #include "vrfmodel/vrfmodelDefines.h"
00037 class DT_DLL_vrfmodel DtWaitController : public DtSingleTaskControllerComponent
00038 {
00039 public:
00040 
00043    DtWaitController(const DtString& name, 
00044       DtVrfObject* owner,
00045       DtSimManager* simManager, 
00046       DtComponentDescriptor* desc = 0,
00047       DtReaderWriterRegistry* parentRegistry = 0);
00048 
00050    virtual ~DtWaitController();
00051 
00054    virtual DtString type() const;
00055 
00057    virtual bool init();
00058 
00067    virtual void tick();
00068 
00070    virtual void registerTaskMsgCallbacks();
00071 
00075 
00078    virtual void processWaitTask(DtSimMessage * msg, DtSimTaskStatePtr taskState);
00079 
00084    virtual void processWaitDurationTask(DtSimMessage * msg, DtSimTaskStatePtr taskState);
00085 
00089    virtual void processWaitElapsedTask(DtSimMessage * msg, DtSimTaskStatePtr taskState);
00090 
00092    virtual DtSimTaskStatePtr currentTaskState() const;
00093 
00094 public:
00095 
00096    static void waitCallback(DtSimMessage * msg, void * usr, DtSimTaskStatePtr taskState);
00097 
00098    static void waitDurationCallback(DtSimMessage * msg, void * usr, DtSimTaskStatePtr taskState);
00099 
00100    static void waitElapsedCallback(DtSimMessage * msg, void * usr, DtSimTaskStatePtr taskState);
00101 
00105    static DtSimComponent * creator(const DtString& name, 
00106       DtVrfObject* owner,
00107       DtSimManager* simManager, 
00108       DtComponentDescriptor* desc = 0,
00109       DtReaderWriterRegistry* parentRegistry = 0);
00110 
00111 protected:
00114    DtWaitController();
00115 
00117    DtWaitController(const DtWaitController & orig);
00118 
00120    const DtWaitController & operator=(const DtWaitController & orig);
00121 
00127    virtual bool createPSR();
00128 
00129 protected:
00130 
00133    DtWaitingPSR* myProcessState;
00134 };
00135 
00136 #endif
00137 

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)