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() override;
48 
51  virtual const char* type() const override = 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 
73  virtual void enableTaskTypes();
74 
78  virtual void enableScriptedTask(const DtString& scriptId);
79 
81  virtual void disableTaskTypes();
82 
84  virtual void enable() override;
85 
86 protected:
89 
92 
95 
96 protected:
99  virtual void onRestore() override;
100 
101  virtual void initializeTargetingControlTableFromDescriptor(const DtReaderWriter*);
102 
103  virtual void setRadio(DtSimRadio * radio);
104 
106  virtual void sendCapableSetsAndTasks();
107 
108 protected:
112 
116 
119 
122 };
123 
124 
virtual bool postAddComponentsInit()
Called after all components have been created, initialized and added to the component manager...
Definition: simComponent.h:126
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:111
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:120
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:96
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:89
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:137
bool myTaskTypesEnabled
Whether task types are currently enabled.
Definition: controllerComponent.h:118
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.
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)