MAK RTIspy API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
netStatsFedAmb13.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2012 MaK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 #ifndef netStatsFedAmb13_h__
7 #define netStatsFedAmb13_h__
8 
9 #ifdef DtIFSPEC13
10 
11 #ifdef DtIFSPEC13DLC
12 #include "RTI13.h"
13 #define RTI rti13
14 #else
15 #include "RTI.hh"
16 #endif
17 #include "fedAmbWrap.h"
18 #include <vlutil/vlTime.h>
19 #include "fedMgr.h"
20 #include <rtiutil/fedAmbAPITypes.h>
21 
22 // Forward References
23 class DtNetStatsMonitor;
24 
25 
26 class DtNetStatsFedAmbWrapper : public DtFedAmbWrapper
27 {
28 public:
29 
30  DtNetStatsFedAmbWrapper(DtFederateMgr* mgr, DtTime start);
31 
32  virtual ~DtNetStatsFedAmbWrapper()
33  throw (RTI::FederateInternalError);
34 
35  bool subscriptionsChanged();
36 
37  // Set the handle to the Network Traffic Monitor
38  virtual void setTrafficMonitor( DtNetStatsMonitor* stats );
39 
40  virtual bool netStatsEnabled() const;
41  virtual void setNetStatsEnabled(bool shouldEnable);
42 
43  // Initializes the high performance timer (must be paired with endTimerAndRecord)
44  virtual void startTimer();
45 
46  // Records the service and the elapsed time (must be paired with startTimer)
47  virtual void endTimerAndRecord(DtFedAmbAPIType fedAmbType);
48 
49 protected:
50 
51  MAKRti::DtTime myStartTime;
52  MAKRti::DtClock myClock;
53  DtFederateMgr* myMgr;
54  bool mySubscriptionsChanged;
55 
56  // Statistics Log
57  DtNetStatsMonitor* myNetStats;
58 
59  // API Call Timer
60  MAKRti::DtClock myTimer;
61 
62  // Enable/Disable flag for network statistics
63  bool myNetStatsEnabled;
64 
65 public:
66 
67  //---------------------------------------------------------------
68  // The federate ambassador calls
69  //---------------------------------------------------------------
70 
72  const char *label)
73  throw (
74  RTI::FederateInternalError);
75 
77  const char *label)
78  throw (
79  RTI::FederateInternalError);
80 
81  virtual void announceSynchronizationPoint (
82  const char *label,
83  const char *tag)
84  throw (
85  RTI::FederateInternalError);
86 
87  virtual void federationSynchronized (
88  const char *label)
89  throw (
90  RTI::FederateInternalError);
91 
92  virtual void initiateFederateSave (
93  const char *label)
94  throw (
95  RTI::UnableToPerformSave,
96  RTI::FederateInternalError);
97 
98  virtual void federationSaved ()
99  throw (
100  RTI::FederateInternalError);
101 
102  virtual void federationNotSaved ()
103  throw (
104  RTI::FederateInternalError);
105 
106  virtual void requestFederationRestoreSucceeded (
107  const char *label)
108  throw (
109  RTI::FederateInternalError);
110 
111  virtual void requestFederationRestoreFailed (
112  const char *label,
113  const char *reason)
114  throw (
115  RTI::FederateInternalError);
116 
117  virtual void federationRestoreBegun ()
118  throw (
119  RTI::FederateInternalError);
120 
121  virtual void initiateFederateRestore (
122  const char *label,
123  RTI::FederateHandle handle)
124  throw (
125  RTI::SpecifiedSaveLabelDoesNotExist,
126  RTI::CouldNotRestore,
127  RTI::FederateInternalError);
128 
129  virtual void federationRestored ()
130  throw (
131  RTI::FederateInternalError);
132 
133  virtual void federationNotRestored ()
134  throw (
135  RTI::FederateInternalError);
136 
137 
138 
139 
140 
141  virtual void startRegistrationForObjectClass (
142  RTI::ObjectClassHandle theClass)
143  throw (
144  RTI::ObjectClassNotPublished,
145  RTI::FederateInternalError);
146 
147  virtual void stopRegistrationForObjectClass (
148  RTI::ObjectClassHandle theClass)
149  throw (
150  RTI::ObjectClassNotPublished,
151  RTI::FederateInternalError);
152 
153  virtual void turnInteractionsOn (
154  RTI::InteractionClassHandle theHandle)
155  throw (
156  RTI::InteractionClassNotPublished,
157  RTI::FederateInternalError);
158 
159  virtual void turnInteractionsOff (
160  RTI::InteractionClassHandle theHandle)
161  throw (
162  RTI::InteractionClassNotPublished,
163  RTI::FederateInternalError);
164 
165  virtual void discoverObjectInstance (
166  RTI::ObjectHandle theObject,
167  RTI::ObjectClassHandle theObjectClass,
168  const char* theObjectName)
169  throw (
170  RTI::CouldNotDiscover,
171  RTI::ObjectClassNotKnown,
172  RTI::FederateInternalError);
173 
174  virtual void reflectAttributeValues (
175  RTI::ObjectHandle theObject,
176  const RTI::AttributeHandleValuePairSet& theAttributes,
177  const RTI::FedTime& theTime,
178  const char *theTag,
179  RTI::EventRetractionHandle theHandle)
180  throw (
181  RTI::ObjectNotKnown,
182  RTI::AttributeNotKnown,
183  RTI::FederateOwnsAttributes,
184  RTI::InvalidFederationTime,
185  RTI::FederateInternalError);
186 
187  virtual void reflectAttributeValues (
188  RTI::ObjectHandle theObject,
189  const RTI::AttributeHandleValuePairSet& theAttributes,
190  const char *theTag)
191  throw (
192  RTI::ObjectNotKnown,
193  RTI::AttributeNotKnown,
194  RTI::FederateOwnsAttributes,
195  RTI::FederateInternalError);
196 
197 
198  virtual void receiveInteraction (
199  RTI::InteractionClassHandle theInteraction,
200  const RTI::ParameterHandleValuePairSet& theParameters,
201  const RTI::FedTime& theTime,
202  const char *theTag,
203  RTI::EventRetractionHandle theHandle)
204  throw (
205  RTI::InteractionClassNotKnown,
206  RTI::InteractionParameterNotKnown,
207  RTI::InvalidFederationTime,
208  RTI::FederateInternalError);
209 
210  virtual void receiveInteraction (
211  RTI::InteractionClassHandle theInteraction,
212  const RTI::ParameterHandleValuePairSet& theParameters,
213  const char *theTag)
214  throw (
215  RTI::InteractionClassNotKnown,
216  RTI::InteractionParameterNotKnown,
217  RTI::FederateInternalError);
218 
219  virtual void removeObjectInstance (
220  RTI::ObjectHandle theObject,
221  const RTI::FedTime& theTime,
222  const char *theTag,
223  RTI::EventRetractionHandle theHandle)
224  throw (
225  RTI::ObjectNotKnown,
226  RTI::InvalidFederationTime,
227  RTI::FederateInternalError);
228 
229  virtual void removeObjectInstance (
230  RTI::ObjectHandle theObject,
231  const char *theTag)
232  throw (
233  RTI::ObjectNotKnown,
234  RTI::FederateInternalError);
235 
236  virtual void attributesInScope (
237  RTI::ObjectHandle theObject,
238  const RTI::AttributeHandleSet& theAttributes)
239  throw (
240  RTI::ObjectNotKnown,
241  RTI::AttributeNotKnown,
242  RTI::FederateInternalError);
243 
244  virtual void attributesOutOfScope (
245  RTI::ObjectHandle theObject,
246  const RTI::AttributeHandleSet& theAttributes)
247  throw (
248  RTI::ObjectNotKnown,
249  RTI::AttributeNotKnown,
250  RTI::FederateInternalError);
251 
252  virtual void provideAttributeValueUpdate (
253  RTI::ObjectHandle theObject,
254  const RTI::AttributeHandleSet& theAttributes)
255  throw (
256  RTI::ObjectNotKnown,
257  RTI::AttributeNotKnown,
258  RTI::AttributeNotOwned,
259  RTI::FederateInternalError);
260 
261  virtual void turnUpdatesOnForObjectInstance (
262  RTI::ObjectHandle theObject,
263  const RTI::AttributeHandleSet& theAttributes)
264  throw (
265  RTI::ObjectNotKnown,
266  RTI::AttributeNotOwned,
267  RTI::FederateInternalError);
268 
269  virtual void turnUpdatesOffForObjectInstance (
270  RTI::ObjectHandle theObject,
271  const RTI::AttributeHandleSet& theAttributes)
272  throw (
273  RTI::ObjectNotKnown,
274  RTI::AttributeNotOwned,
275  RTI::FederateInternalError);
276 
277 
278 
279 
280 
282  RTI::ObjectHandle theObject,
283  const RTI::AttributeHandleSet& offeredAttributes,
284  const char *theTag)
285  throw (
286  RTI::ObjectNotKnown,
287  RTI::AttributeNotKnown,
288  RTI::AttributeAlreadyOwned,
289  RTI::AttributeNotPublished,
290  RTI::FederateInternalError);
291 
293  RTI::ObjectHandle theObject,
294  const RTI::AttributeHandleSet& releasedAttributes)
295  throw (
296  RTI::ObjectNotKnown,
297  RTI::AttributeNotKnown,
298  RTI::AttributeNotOwned,
299  RTI::AttributeDivestitureWasNotRequested,
300  RTI::FederateInternalError);
301 
303  RTI::ObjectHandle theObject,
304  const RTI::AttributeHandleSet& securedAttributes)
305  throw (
306  RTI::ObjectNotKnown,
307  RTI::AttributeNotKnown,
308  RTI::AttributeAcquisitionWasNotRequested,
309  RTI::AttributeAlreadyOwned,
310  RTI::AttributeNotPublished,
311  RTI::FederateInternalError);
312 
313  virtual void attributeOwnershipUnavailable (
314  RTI::ObjectHandle theObject,
315  const RTI::AttributeHandleSet& theAttributes)
316  throw (
317  RTI::ObjectNotKnown,
318  RTI::AttributeNotKnown,
319  RTI::AttributeAlreadyOwned,
320  RTI::AttributeAcquisitionWasNotRequested,
321  RTI::FederateInternalError);
322 
323  virtual void requestAttributeOwnershipRelease (
324  RTI::ObjectHandle theObject,
325  const RTI::AttributeHandleSet& candidateAttributes,
326  const char *theTag)
327  throw (
328  RTI::ObjectNotKnown,
329  RTI::AttributeNotKnown,
330  RTI::AttributeNotOwned,
331  RTI::FederateInternalError);
332 
334  RTI::ObjectHandle theObject,
335  const RTI::AttributeHandleSet& theAttributes)
336  throw (
337  RTI::ObjectNotKnown,
338  RTI::AttributeNotKnown,
339  RTI::AttributeAlreadyOwned,
340  RTI::AttributeAcquisitionWasNotCanceled,
341  RTI::FederateInternalError);
342 
343  virtual void informAttributeOwnership (
344  RTI::ObjectHandle theObject,
345  RTI::AttributeHandle theAttribute,
346  RTI::FederateHandle theOwner)
347  throw (
348  RTI::ObjectNotKnown,
349  RTI::AttributeNotKnown,
350  RTI::FederateInternalError);
351 
352  virtual void attributeIsNotOwned (
353  RTI::ObjectHandle theObject,
354  RTI::AttributeHandle theAttribute)
355  throw (
356  RTI::ObjectNotKnown,
357  RTI::AttributeNotKnown,
358  RTI::FederateInternalError);
359 
360  virtual void attributeOwnedByRTI (
361  RTI::ObjectHandle theObject,
362  RTI::AttributeHandle theAttribute)
363  throw (
364  RTI::ObjectNotKnown,
365  RTI::AttributeNotKnown,
366  RTI::FederateInternalError);
367 
368  virtual void timeRegulationEnabled (
369  const RTI::FedTime& theFederateTime)
370  throw (
371  RTI::InvalidFederationTime,
372  RTI::EnableTimeRegulationWasNotPending,
373  RTI::FederateInternalError);
374 
375  virtual void timeConstrainedEnabled (
376  const RTI::FedTime& theFederateTime)
377  throw (
378  RTI::InvalidFederationTime,
379  RTI::EnableTimeConstrainedWasNotPending,
380  RTI::FederateInternalError);
381 
382  virtual void timeAdvanceGrant (
383  const RTI::FedTime& theTime)
384  throw (
385  RTI::InvalidFederationTime,
386  RTI::TimeAdvanceWasNotInProgress,
387  RTI::FederateInternalError);
388 
389  virtual void requestRetraction (
390  RTI::EventRetractionHandle theHandle)
391  throw (
392  RTI::EventNotKnown,
393  RTI::FederateInternalError);
394 
395  private:
396  static const DtString theUnknownName;
397 };
398 
399 #endif // DtIFSPEC1516
400 #endif // netStatsFedAmb13_h__
Handle ObjectHandle
Definition: RTItypes13.h:116
virtual void requestAttributeOwnershipRelease(ObjectHandle theObject, const AttributeHandleSet &candidateAttributes, const char *theTag)=0
7.10
virtual void attributesOutOfScope(ObjectHandle theObject, const AttributeHandleSet &theAttributes)=0
6.14
virtual void informAttributeOwnership(ObjectHandle theObject, AttributeHandle theAttribute, FederateHandle theOwner)=0
7.16
virtual void attributeOwnershipDivestitureNotification(ObjectHandle theObject, const AttributeHandleSet &releasedAttributes)=0
7.5
virtual void initiateFederateRestore(const char *label, FederateHandle handle)=0
4.19
virtual void confirmAttributeOwnershipAcquisitionCancellation(ObjectHandle theObject, const AttributeHandleSet &theAttributes)=0
7.14
virtual void startRegistrationForObjectClass(ObjectClassHandle theClass)=0
! Declaration Management Services //!
DtFedAmbAPIType
Definition: fedAmbAPITypes.h:12
virtual void requestRetraction(EventRetractionHandle theHandle)=0
8.22
Definition: netStatsMonitor.h:30
virtual void synchronizationPointRegistrationFailed(const char *label)=0
supplied C4)
ULong InteractionClassHandle
Definition: RTItypes13.h:106
virtual void federationNotRestored()=0
virtual void attributesInScope(ObjectHandle theObject, const AttributeHandleSet &theAttributes)=0
6.13
virtual void attributeOwnershipUnavailable(ObjectHandle theObject, const AttributeHandleSet &theAttributes)=0
7.9
virtual void attributeOwnedByRTI(ObjectHandle theObject, AttributeHandle theAttribute)=0
supplied C1
virtual void receiveInteraction(InteractionClassHandle theInteraction, const ParameterHandleValuePairSet &theParameters, const FedTime &theTime, const char *theTag, EventRetractionHandle theHandle)=0
6.7
virtual void removeObjectInstance(ObjectHandle theObject, const FedTime &theTime, const char *theTag, EventRetractionHandle theHandle)=0
6.9
virtual void synchronizationPointRegistrationSucceeded(const char *label)=0
RTI Parameter Passing Memory Conventions.
Instances of DtFederateMgr process federation-level messages (such as create, destroy, join, resign, and sync points) and manages the objects responsible for handling general communication, objects, interactions, the FOM, MOM, and data distribution mmg.
Definition: fedMgr.h:84
virtual void initiateFederateSave(const char *label)=0
4.12
struct EventRetractionHandle_s EventRetractionHandle
Definition: RTItypes13.h:525
virtual void timeAdvanceGrant(const FedTime &theTime)=0
8.13
virtual void announceSynchronizationPoint(const char *label, const char *tag)=0
4.8
virtual void requestFederationRestoreFailed(const char *label, const char *reason)=0
supplied C4
virtual void federationNotSaved()=0
virtual void federationSynchronized(const char *label)=0
4.10
virtual void discoverObjectInstance(ObjectHandle theObject, ObjectClassHandle theObjectClass, const char *theObjectName)=0
! Object Management Services //!
virtual void requestFederationRestoreSucceeded(const char *label)=0
4.17
virtual void attributeOwnershipAcquisitionNotification(ObjectHandle theObject, const AttributeHandleSet &securedAttributes)=0
7.6
virtual void reflectAttributeValues(ObjectHandle theObject, const AttributeHandleValuePairSet &theAttributes, const FedTime &theTime, const char *theTag, EventRetractionHandle theHandle)=0
6.5
virtual void turnInteractionsOff(InteractionClassHandle theHandle)=0
5.13
virtual void federationRestored()=0
4.21
virtual void provideAttributeValueUpdate(ObjectHandle theObject, const AttributeHandleSet &theAttributes)=0
6.16
virtual void turnUpdatesOffForObjectInstance(ObjectHandle theObject, const AttributeHandleSet &theAttributes)=0
6.18
ULong FederateHandle
Definition: RTItypes13.h:120
virtual void requestAttributeOwnershipAssumption(ObjectHandle theObject, const AttributeHandleSet &offeredAttributes, const char *theTag)=0
! Ownership Management Services //!
virtual Boolean throw(SpecifiedSaveLabelDoesNotExist, ConcurrentAccessAttempted, RTIinternalError)
virtual void turnUpdatesOnForObjectInstance(ObjectHandle theObject, const AttributeHandleSet &theAttributes)=0
6.17
virtual void stopRegistrationForObjectClass(ObjectClassHandle theClass)=0
5.11
virtual void attributeIsNotOwned(ObjectHandle theObject, AttributeHandle theAttribute)=0
supplied C1
virtual void federationRestoreBegun()=0
4.18
virtual void federationSaved()=0
4.15
ULong ObjectClassHandle
Definition: RTItypes13.h:104
virtual void timeConstrainedEnabled(const FedTime &theFederateTime)=0
8.6
virtual void timeRegulationEnabled(const FedTime &theFederateTime)=0
! Time Management Services //!
virtual void turnInteractionsOn(InteractionClassHandle theHandle)=0
5.12
Handle AttributeHandle
Definition: RTItypes13.h:112
This file contains the declaration of the base federation manager.

Document ID: Generated on Mon Sep 7 15:40:32 EDT 2020 from SVN revision 217499
Copyright © 2005-2020 MAK Technologies Inc. All Rights Reserved (www.mak.com)