VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
controllerComponent.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2015 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
11 
12 #pragma once
13 
15 #include "vrfobjcore/simObject.h"
16 #include <vlutil/vlString.h>
17 
18 class DtSimManager;
19 class DtSimRadio;
20 class DtSimTask;
21 
32 {
33 public:
34 
40  DtControllerComponent(const DtString& name,
41  DtLocalObject* owner,
42  DtSimulationServices* simServices,
43  DtComponentDescriptor* desc = 0,
44  DtReaderWriterRegistry* parentRegistry = 0);
45 
47  virtual ~DtControllerComponent();
48 
51  virtual const char* type() const = 0;
52 
54  virtual bool init() override;
55 
57  virtual bool postAddComponentsInit() override;
58 
60  virtual DtSimRadio* radio();
61 
65  virtual void taskNotify(const DtSimTask & task);
66 
69  virtual void clearTask();
70 
72  virtual void enableTaskTypes();
73 
74  virtual void enableScritedTask(const DtString& scriptId);
75 
77  virtual void disableTaskTypes();
78 
80  virtual void enable() override;
81 
82 protected:
85 
88 
91 
92 protected:
95  virtual void onRestore();
96 
97  virtual void initializeTargetingControlTableFromDescriptor(const DtReaderWriter*);
98 
99  virtual void setRadio(DtSimRadio * radio);
100 
102  virtual void sendCapableSetsAndTasks();
103 
104 protected:
108 
112 
115 
118 };
119 
120 
virtual bool postAddComponentsInit()
Called after all components have been created, initialized and added to the component manager...
Definition: simComponent.h:128
DtSimRadio * myRadio
Controller components can send messages. Of course, if your controller never will, you don&#39;t have to use this.
Definition: controllerComponent.h:107
Definition: simRadio.h:30
Definition: readerWriter.h:85
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
bool myInitialized
Whether task types are currently enabled.
Definition: controllerComponent.h:116
virtual bool init()
Calls createPorts and createPortGroups Initializes myLastTickSimTime.
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
virtual void enable()
Is this component enabled or not. If enabled, component&#39;s tick function will be called, otherwise it will not. Default is true (enabled).
DtSimComponent & operator=(const DtSimComponent &orig)
assignment operator, not implemented
End User Description: DtControllerComponent is the base class for all controllers components...
Definition: controllerComponent.h:31
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:94
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:91
Contains the DtSimComponent class declaration.
DtSimTask is an abstract base class from which real tasks can derive. It manages the read/write capab...
Definition: simTask.h:30
virtual void onRestore()
Called whenever a component is restored. Default is no-op.
The simulation engine is controlled by a single,top-level class called the Simulation Manager...
Definition: simManager.h:123
bool myTaskTypesEnabled
Whether task types are currently enabled.
Definition: controllerComponent.h:114
virtual const char * type() const =0
Returns a string identifies the class type of component. Type values are defined in compTypes...
A locally simulated VRF object. Holds all internal and external data for the object, and provides access to both the current frame and next frame state data for the object. All current frame data is read-only, and next-frame data can be written to. No thread safety guarantees are made on this object during the simulation frame and it should only be accessed by the thread that is simulating the object.
Definition: localObject.h:86

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)