VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
remoteComponentAttachmentManager.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2015 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 #pragma once
7 
10 
12 
15 
17 #include <set>
18 
24 #include "vrfutil/rwUUID.h"
25 #include <tbb/spin_mutex.h>
26 #include <boost/signals2.hpp>
27 
29 class DtFilename;
32 
36 {
37 protected:
40 
41 public:
42 
44 
45  typedef std::map<DtUUID, boost::signals2::connection> RecentArrivalsMap;
46  typedef RecentArrivalsMap::iterator ArrivalIterator;
47  typedef RecentArrivalsMap::const_iterator const_ArrivalIterator;
48 
50  {
51  Remove = -1,
52  NotReady = 0,
54  };
55 
56 public:
57 
60 
63 
64 public:
65 
67  virtual void addRecentArrival(DtSimObjectReference);
68 
70  virtual void attach(const DtRemoteConfigurationMapEntry& entry,
72 
74  virtual bool isRemoteComponentAttachment(const DtUUID&) const;
75 
78  virtual DtRemoteConfigurationMapper* attachmentRules();
79  virtual const DtRemoteConfigurationMapper* attachmentRules() const;
81 
85  void setBuilderCreatorFcn(DtRemoteComponentConfigurationBuilder::CreatorFcn fcn);
87 
90  virtual void clear();
91 
95  virtual void setRemoteAttachmentBalancingScheme(const DtString& scheme, const DtString& userData);
96 
102  virtual DtRemoteConfigurationMapper* createAttachmentRules(const char* pReaderWriterName);
103 
105  virtual void clearRecentArrivals();
106 
112  virtual EvaluationReadinessState checkReadinessCriteria(DtSimObjectReference obj) const;
113 
119  virtual bool checkRejectionCriteria(DtSimObjectReference obj) const;
120 
122  virtual void destroyAttachmentRules();
123 
126  virtual void evaluateAndAttach(DtSimObjectReference obj);
127 
129  virtual bool initialize(const DtFilename& fromFile);
130 
133  virtual void processRemoveFromArrivals(const DtUUID& uuid);
135 
137  virtual void resetAllReflectedObjectsToNonVrfSimulated();
138 
140  virtual void resetReflectedObjectToNonVrfSimulated(const DtUUID& pVrfObj);
141 
143  virtual void tick();
144 
147  DtTime tickRate() const;
148  void setTickRate(DtTime interval);
150 
151  virtual bool passesAttachmentScheme(DtSimObjectReference ref) const;
152 
153 public:
154 
156  virtual void processVrfObjectToBeRemoved(const DtSimObject* pVrfObject);
157 
158 protected:
159 
163  virtual void doWork();
164 
165 protected:
166 
169 
172 
175 
183 
187 
190 
193 
196 
199 
200  tbb::spin_mutex myRecentArrivalsMutex;
201 
202  boost::signals2::scoped_connection mySimObjectAddedConnection;
203 
206 
207 private:
211 };
212 
214 {
216 }
217 
219 {
221 }
222 
UUID is a unique ID wrapper class.
Definition: uuid.h:59
DtRemoteConfigurationMapper.
Definition: remoteConfigurationMapper.h:29
RecentArrivalsMap::iterator ArrivalIterator
Definition: remoteComponentAttachmentManager.h:46
This singleton class keeps track of components that should be added to remote, non VR-Forces entities...
Definition: remoteComponentAttachmentManager.h:35
class DtLocalObjectManager:
Definition: localObjectManager.h:151
tbb::spin_mutex myRecentArrivalsMutex
Definition: remoteComponentAttachmentManager.h:200
RecentArrivalsMap myConfirmedAttachments
keep track of what entities contain attachments
Definition: remoteComponentAttachmentManager.h:168
DtTime myNextTick
Next scheduled tick time.
Definition: remoteComponentAttachmentManager.h:171
The DtSimObjectReference is a shared pointer that can be used amongst many object for access to the u...
Definition: simObjectReference.h:26
Contains the DtUUID class declaration.
boost::signals2::scoped_connection mySimObjectAddedConnection
Definition: remoteComponentAttachmentManager.h:202
DtSimObjectReferenceList myRecentArrivals
This list captures the IDs of newly discovered simulated things.
Definition: remoteComponentAttachmentManager.h:174
DtRemoteComponentConfigurationBuilder *(* CreatorFcn)(DtRemoteComponentAttachmentManager *, DtLocalObjectManager *)
Definition: remoteComponentConfigurationBuilder.h:27
void setTickRate(DtTime interval)
Get/Set the tick interval for the attachment manager.
Definition: remoteComponentAttachmentManager.h:224
DtRemoteComponentConfigurationBuilder * myRemoteConfigBuilder
This helps parse configuration files and add components to remote entities. The remote builder is use...
Definition: remoteComponentAttachmentManager.h:182
uuid class
Definition: rwUUID.h:26
DtRemoteConfigurationMapper * myAttachmentRules
The attachment list is a container of attachment rules.
Definition: remoteComponentAttachmentManager.h:198
DtLocalObjectManager * myObjectManager
This is a pointer to the singleton&#39;s parent object.
Definition: remoteComponentAttachmentManager.h:195
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
This file declares DtRemoteConfigurationMapEntry.
Definition: remoteConfigurationMapEntry.h:27
DtRemoteComponentConfigurationBuilder::CreatorFcn myRemoteConfigBuilderCreatorFcn
This creator function is used by initialize() to create myRemoteConfigBuilder. By default...
Definition: remoteComponentAttachmentManager.h:186
DtString myRemoteComponentAttachmentScheme
Definition: remoteComponentAttachmentManager.h:204
DtTime tickRate() const
Get/Set the tick interval for the attachment manager.
Definition: remoteComponentAttachmentManager.h:223
DtRemoteComponentConfigurationBuilder::CreatorFcn builderCreatorFcn()
Get/Set the DtRemoteComponentConfigurationBuilder factory function.
Definition: remoteComponentAttachmentManager.h:213
DtRwUUID myWorkerKey
This is a worker key, to facilitate searching without requiring allocations.
Definition: remoteComponentAttachmentManager.h:189
void setBuilderCreatorFcn(DtRemoteComponentConfigurationBuilder::CreatorFcn fcn)
Get/Set the DtRemoteComponentConfigurationBuilder factory function.
Definition: remoteComponentAttachmentManager.h:218
This is a convenience list that will add DtSimObjectReference objects and modify the list as objects ...
Definition: simObjectReferenceList.h:23
DtTime myTickRate
Tick Rate, default 5.0 secs.
Definition: remoteComponentAttachmentManager.h:192
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
Contains the DtSimObjectReference class declaration.
DtString myRemoteComponentAttachmentSchemeData
Definition: remoteComponentAttachmentManager.h:205
EvaluationReadinessState
Definition: remoteComponentAttachmentManager.h:49
Ready
Definition: airRefuelSupplierStateData.h:22
std::map< DtUUID, boost::signals2::connection > RecentArrivalsMap
Definition: remoteComponentAttachmentManager.h:45
This builder class is used to attach VR-Forces components and radios to non-VRF remote entities...
Definition: remoteComponentConfigurationBuilder.h:23
RecentArrivalsMap::const_iterator const_ArrivalIterator
Definition: remoteComponentAttachmentManager.h:47

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)