VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
systemSwitcherComponent.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2012 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
10 
13 
14 #pragma once
15 
17 #include "vrfobjcore/simRadio.h"
18 
19 class DtComponentSystem;
22 
25 {
26 public:
27 
29  DtSystemSwitcherComponent(const DtString & name, DtLocalObject* owner,
30  DtSimulationServices * simManager, DtComponentDescriptor* desc = NULL,
31  DtReaderWriterRegistry * parentRegistry = 0);
32 
34  virtual ~DtSystemSwitcherComponent() override;
35 
37  virtual bool init() override;
38 
41  virtual const char* type() const override;
42 
43  virtual void tick() override;
44 
47  virtual void enable() override;
48 
51  virtual void disable() override;
52 
53  virtual bool transitionIsComplete() const;
54 
55  virtual void onTransitionComplete();
56 
57 public:
58 
59  static void setSwitchSystemsCallback(DtSimMessage * msg, void * usrData);
60 
61 
63  static DtSimComponent* creator(const DtString & name, DtLocalObject* owner,
64  DtSimulationServices * simManager, DtComponentDescriptor* desc,
65  DtReaderWriterRegistry * parentRegistry);
66 
67 protected:
68 
71 
74 
76  virtual void setRadio(DtSimRadio* radio) override;
77 
78  virtual bool createPSR();
79 
82  virtual void addSetDataCallbacks();
83 
86  void removeSetDataCallbacks();
87 
88  virtual void processSetSwitchSystems(DtSimMessage * msg);
89 
92  virtual bool switchSystems();
93 
96  void enableComponentSystem(DtComponentSystem* activateSystem);
97  void disableComponentSystem(DtComponentSystem* deactivateSystem);
98  void enableSimComponent(DtSimComponent* simComponent);
99  void disableSimComponent(DtSimComponent* simComponent);
101 
104  virtual bool allowedToTransition() const;
105 
106 protected:
107 
111 
113 
115 };
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
DtSwitchSystemComponentPSR * myProcessState
Definition: systemSwitcherComponent.h:112
const DtControllerComponent & operator=(const DtControllerComponent &orig)
assignment operator
Definition: simRadio.h:30
DtComponentSystem * mySystemToActivate
Definition: systemSwitcherComponent.h:110
virtual void setRadio(DtSimRadio *radio)
virtual void enable() override
Enables the component and resends capable tasks and sets.
bool mySwitchingSystems
Definition: systemSwitcherComponent.h:114
A set of DtSimComponent and DtComponentSystem instances that are connected with a set of connections...
Definition: simComponentNetwork.h:34
A DtComponentSystem is a collection of DtSimComponents that are associated with each other...
Definition: componentSystem.h:35
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:49
virtual const char * type() const override=0
This returns a string from compTypes.h, and identifies the type of component.
Definition: readerWriterRegistry.h:39
Definition: systemSwitcherComponent.h:24
virtual void disable() override
Disables the component and resends capable tasks and sets.
virtual bool init() override
Calls setRadio()
DtComponentSystem * mySystemToDeactivate
Definition: systemSwitcherComponent.h:109
File: simMsg.h.
Definition: simMessage.h:35
virtual void tick()
This gives the thread of control to the component. The component is ticked once each simulation frame...
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:97
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:89
Definition: switchSystemComponentPSR.h:21
DtSimComponentNetwork * myComponentNetwork
Definition: systemSwitcherComponent.h:108
A locally simulated VRF object.
Definition: localObject.h:98

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)