VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
waitController.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 1999 MaK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
11 
12 #pragma once
13 
15 #include "vrfutil/simClock.h"
16 
17 class DtString;
19 class DtTaskMessage;
20 class DtSimMessage;
21 class DtWaitingPSR;
22 
33 {
34 public:
35 
38  DtWaitController(const DtString& name,
39  DtLocalObject* owner,
40  DtSimulationServices* simManager,
41  DtComponentDescriptor* desc = 0,
42  DtReaderWriterRegistry* parentRegistry = 0);
43 
45  virtual ~DtWaitController() override;
46 
49  virtual const char* type() const override;
50 
52  virtual bool init() override;
53 
62  virtual void tick() override;
63 
65  virtual void enable() override;
66  virtual void registerTaskMsgCallbacks() override;
67 
69  virtual void disable() override;
70 
71  static void waitCallback(DtSimMessage* msg, void* usr, DtSimTaskStatePtr taskStatePtr);
72 
74  virtual DtSimTaskStatePtr currentTaskState() const override;
75 
79  static DtSimComponent * creator(const DtString& name,
80  DtLocalObject* owner,
81  DtSimulationServices* simManager,
82  DtComponentDescriptor* desc = 0,
83  DtReaderWriterRegistry* parentRegistry = 0);
84 
85 protected:
86  virtual bool tickWhileDestroyed() const override;
87 
88  virtual void processWait(const DtTaskMessage& msg, DtSimTaskStatePtr taskStatePtr);
89 
93 
96  virtual void processWaitTask(DtSimTask* task, DtSimTaskStatePtr taskState);
97 
102  virtual void processWaitDurationTask(DtSimTask* task, DtSimTaskStatePtr taskState);
103 
107  virtual void processWaitElapsedTask(DtSimTask* task, DtSimTaskStatePtr taskState);
108 
112 
114  DtWaitController(const DtWaitController & orig);
115 
117  const DtWaitController & operator=(const DtWaitController & orig);
118 
124  virtual bool createPSR();
125 
129 };
130 
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
Definition: waitingPSR.h:34
virtual void disable() override
Overridden to allow tasks controllers that can be disabled to call task complete. ...
virtual const char * type() const override=0
Returns a string identifies the class type of component. Type values are defined in compTypes...
virtual void registerTaskMsgCallbacks()
This class provides a base class for all controllers that are capable of executing a DtSimTask...
Definition: singleTaskControllerComponent.h:22
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:49
Definition: readerWriterRegistry.h:39
std::shared_ptr< DtSimTaskState > DtSimTaskStatePtr
Definition: taskAndTaskStateDefines.h:18
virtual bool init() override
Calls setRadio()
DtWaitingPSR * myProcessState
Container for state data associated with this component. This state is saved and restored as part of ...
Definition: waitController.h:128
File: simMsg.h.
Definition: simMessage.h:35
File: vlClock.h.
virtual void tick()
This gives the thread of control to the component. The component is ticked once each simulation from ...
DtWaitController is a controller that models waiting behavior ground and surface entities.
Definition: waitController.h:32
virtual bool tickWhileDestroyed() const
If the component returns true here, it will be ticked regardless of the destroyed state of the host e...
virtual DtSimTaskStatePtr currentTaskState() const
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
const DtTaskControllerComponent & operator=(const DtTaskControllerComponent &orig)
assignment operator
virtual void enable() override
Overridden to call registerTaskMsgCallbacks().
DtSimTask is an abstract base class from which real tasks can derive. It manages the read/write capab...
Definition: simTask.h:30
A DtTaskMsg is a DtRadioMsg with a pointer to a task. The type of the taskMsg is just the type of the...
Definition: taskMessage.h:21
A locally simulated VRF object.
Definition: localObject.h:98

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)