VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
aggregateOrganizationController.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 
16 #include <tbb/spin_mutex.h>
17 
19 class DtSimMessage;
20 class DtUUID;
22 
30 {
31 
32 private:
33 
42 
43 public:
44 
48  DtLocalObject* owner,
49  DtSimulationServices* simManager,
50  DtComponentDescriptor* desc = 0,
51  DtReaderWriterRegistry* parentRegistry = 0);
52 
55 
58  virtual const char* type() const;
59 
64  virtual void tick();
65 
68  virtual void setRadio(DtSimRadio * radio);
69 
73  virtual void onSetReorganize(DtSimMessage * msg);
74 
75 public:
79  static DtSimComponent * creator(const DtString& name,
80  DtLocalObject* owner,
81  DtSimulationServices* simManager,
82  DtComponentDescriptor* desc = 0,
83  DtReaderWriterRegistry* parentRegistry = 0);
84 
85  virtual bool init();
86 
87 protected:
88 
91  //virtual bool checkSubordinates();
92 
94  virtual void initiateAllSubordinates();
95 
99  virtual void initiateNewSubordinate(const DtSimObject* subordinate, int designator);
100 
103  virtual void setCommandNetRadioChannel();
104 
106  virtual int nextAvailableDesignator();
107 
111  virtual void reorganize();
112 
115  virtual void sendSetDesignator(int designator, const DtUUID& object);
116 
119  virtual bool reorganizeNeeded();
120 
121  static void addToOrganizationCallback(DtSimMessage*, void* usr);
122  virtual void addToOrganization(const DtIfAddToOrganization*);
123 
125  static void reorganizeCallback(DtSimMessage * msg, void * usrData);
126 
127  virtual void processSimObjectAdded(DtSimObjectReference ref);
128 
130  virtual bool isForceLevel() const;
131 
132 protected:
134  std::map<DtUUID, int> myWaitingForSubordinates;
135  boost::signals2::scoped_connection mySimObjectAddedConnection;
136 
139 
141 };
142 
UUID is a unique ID wrapper class.
Definition: uuid.h:59
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
virtual void setRadio(DtSimRadio *radio)
Overrides this so it can register its interest in the set commands.
std::map< DtUUID, int > myWaitingForSubordinates
Definition: aggregateOrganizationController.h:134
Definition: simRadio.h:30
boost::signals2::scoped_connection mySimObjectAddedConnection
Definition: aggregateOrganizationController.h:135
virtual void tick()
Checks for superior echelon id change, and changes this entity&#39;s echelon id if necessary.
The DtSimObjectReference is a shared pointer that can be used amongst many object for access to the u...
Definition: simObjectReference.h:26
virtual const char * type() const
Returns a string identifies the class type of component. Type values are defined in compTypes...
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
static DtSimComponent * creator(const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
class DtIfAddToOrganization:
Definition: ifAddToOrganization.h:23
virtual bool init() override
Calls setRadio()
DtOrganizationController is intended for any entity which will be a leaf node on the organization hie...
Definition: organizationController.h:28
int myDelayDesignatorReorder
Definition: aggregateOrganizationController.h:138
DtPseudoAggregateOrganizationController is the controller component in pseudo-aggregates responsible ...
Definition: aggregateOrganizationController.h:29
DtAggregateLocalObjectFacade myAggregateLocalObjectFacade
Definition: aggregateOrganizationController.h:140
File: simMsg.h.
Definition: simMessage.h:35
DtCompatibilityRadio * myCommandRadio
Definition: aggregateOrganizationController.h:133
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:95
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:91
Represents a single simulation object in the exercise. Object may be VRF simulation, or non-VRF simulated, and may be simulated by the local sim engine, or by a remote sim engine. Only public (external) state of the object is available. All data is read-only. All access to data of the object is thread safe within the simulation frame.
Definition: simObject.h:88
bool myNeedsDesignatorReorder
Definition: aggregateOrganizationController.h:137
const DtOrganizationController & operator=(const DtOrganizationController &orig)
assignment operator
DtCompatibilityRadio.
Definition: compatibilityRadio.h:30
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 Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)