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 
54  virtual ~DtAggregateOrganizationController() override;
55 
58  virtual const char* type() const override;
59 
64  virtual void tick() override;
65 
68  virtual void setRadio(DtSimRadio* radio) override;
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() override;
86 
87 protected:
88 
91  //virtual bool checkSubordinates();
92 
96  virtual void initiateNewSubordinate(const DtSimObject* subordinate, int designator);
97 
100  virtual void setCommandNetRadioChannel();
101 
103  virtual int nextAvailableDesignator();
104 
108  virtual void reorganize();
109 
112  virtual void sendSetDesignator(int designator, const DtUUID& object);
113 
116  virtual bool reorganizeNeeded();
117 
118  static void addToOrganizationCallback(DtSimMessage*, void* usr);
119  virtual void addToOrganization(const DtIfAddToOrganization*);
120 
122  static void reorganizeCallback(DtSimMessage * msg, void * usrData);
123 
124  virtual void processSimObjectAdded(DtSimObjectReference ref);
125 
127  virtual bool isForceLevel() const;
128 
129 protected:
131  std::map<DtUUID, int> myWaitingForSubordinates;
132  boost::signals2::scoped_connection mySimObjectAddedConnection;
133 
136 
138 };
139 
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
std::map< DtUUID, int > myWaitingForSubordinates
Definition: aggregateOrganizationController.h:131
Definition: simRadio.h:30
boost::signals2::scoped_connection mySimObjectAddedConnection
Definition: aggregateOrganizationController.h:132
virtual const char * type() const override
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:135
DtPseudoAggregateOrganizationController is the controller component in pseudo-aggregates responsible ...
Definition: aggregateOrganizationController.h:29
DtAggregateLocalObjectFacade myAggregateLocalObjectFacade
Definition: aggregateOrganizationController.h:137
File: simMsg.h.
Definition: simMessage.h:35
DtCompatibilityRadio * myCommandRadio
Definition: aggregateOrganizationController.h:130
virtual void setRadio(DtSimRadio *radio) override
Overrides this so it can register its interest in the set commands.
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
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:80
bool myNeedsDesignatorReorder
Definition: aggregateOrganizationController.h:134
const DtOrganizationController & operator=(const DtOrganizationController &orig)
assignment operator
virtual void tick() override
Checks for superior echelon id change, and changes this entity&#39;s echelon id if necessary.
DtCompatibilityRadio.
Definition: compatibilityRadio.h:30
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)