VR-Forces 5.0.3 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 
97  virtual DtRemoteConfigurationMapper* createAttachmentRules(const char* pReaderWriterName);
98 
100  virtual void clearRecentArrivals();
101 
107  virtual EvaluationReadinessState checkReadinessCriteria(DtSimObjectReference obj) const;
108 
114  virtual bool checkRejectionCriteria(DtSimObjectReference obj) const;
115 
117  virtual void destroyAttachmentRules();
118 
121  virtual void evaluateAndAttach(DtSimObjectReference obj);
122 
124  virtual bool initialize(const DtFilename& fromFile);
125 
128  virtual void processRemoveFromArrivals(const DtUUID& uuid);
130 
132  virtual void resetAllReflectedObjectsToNonVrfSimulated();
133 
135  virtual void resetReflectedObjectToNonVrfSimulated(const DtUUID& pVrfObj);
136 
138  virtual void tick();
139 
142  DtTime tickRate() const;
143  void setTickRate(DtTime interval);
145 
146 public:
147 
149  virtual void processVrfObjectToBeRemoved(const DtSimObject* pVrfObject);
150 
151 protected:
152 
156  virtual void doWork();
157 
158 protected:
159 
162 
165 
168 
176 
180 
183 
186 
189 
192 
193  tbb::spin_mutex myRecentArrivalsMutex;
194 
195  boost::signals2::scoped_connection mySimObjectAddedConnection;
196 
197 private:
201 };
202 
204 {
206 }
207 
209 {
211 }
212 
UUID is a unique ID wrapper class.
Definition: rwUUID.h:229
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:193
RecentArrivalsMap myConfirmedAttachments
keep track of what entities contain attachments
Definition: remoteComponentAttachmentManager.h:161
DtTime myNextTick
Next scheduled tick time.
Definition: remoteComponentAttachmentManager.h:164
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:195
DtSimObjectReferenceList myRecentArrivals
This list captures the IDs of newly discovered simulated things.
Definition: remoteComponentAttachmentManager.h:167
DtRemoteComponentConfigurationBuilder *(* CreatorFcn)(DtRemoteComponentAttachmentManager *, DtLocalObjectManager *)
Definition: remoteComponentConfigurationBuilder.h:27
void setTickRate(DtTime interval)
Get/Set the tick interval for the attachment manager.
Definition: remoteComponentAttachmentManager.h:214
DtRemoteComponentConfigurationBuilder * myRemoteConfigBuilder
This helps parse configuration files and add components to remote entities. The remote builder is use...
Definition: remoteComponentAttachmentManager.h:175
Description: Readable, Writable uuid string. Use this class in order to convert from object marking t...
Definition: rwUUID.h:431
DtRemoteConfigurationMapper * myAttachmentRules
The attachment list is a container of attachment rules.
Definition: remoteComponentAttachmentManager.h:191
DtLocalObjectManager * myObjectManager
This is a pointer to the singleton&#39;s parent object.
Definition: remoteComponentAttachmentManager.h:188
#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:179
DtTime tickRate() const
Get/Set the tick interval for the attachment manager.
Definition: remoteComponentAttachmentManager.h:213
DtRemoteComponentConfigurationBuilder::CreatorFcn builderCreatorFcn()
Get/Set the DtRemoteComponentConfigurationBuilder factory function.
Definition: remoteComponentAttachmentManager.h:203
DtRwUUID myWorkerKey
This is a worker key, to facilitate searching without requiring allocations.
Definition: remoteComponentAttachmentManager.h:182
void setBuilderCreatorFcn(DtRemoteComponentConfigurationBuilder::CreatorFcn fcn)
Get/Set the DtRemoteComponentConfigurationBuilder factory function.
Definition: remoteComponentAttachmentManager.h:208
This is a convenience list that will add DtSimObjectReference objects and modify the list as objects ...
Definition: simObjectReferenceList.h:22
DtTime myTickRate
Tick Rate, default 5.0 secs.
Definition: remoteComponentAttachmentManager.h:185
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:79
Contains the DtSimObjectReference class declaration.
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 Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)