MAK RTIspy API Documentation for HLA 1516
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
netStatsFedAmb1516.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2012 MaK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 #ifndef netStatsFedAmb1516_h__
7 #define netStatsFedAmb1516_h__
8 
9 #ifdef DtIFSPEC1516
10 
11 #include "rtiMsConfig.h"
12 #include "fedAmbWrap1516.h"
13 #include <vlutil/vlTime.h>
14 #include "fedMgr.h"
15 #include <rtiutil/fedAmbAPITypes.h>
16 
17 // Forward References
18 class DtNetStatsMonitor;
19 
20 class DtNetStatsFedAmbWrapper : public DtFedAmbWrapper
21 {
22 public:
23 
24  DtNetStatsFedAmbWrapper(DtFederateMgr* mgr, DtTime start);
25 
26  virtual ~DtNetStatsFedAmbWrapper()
27  throw ();
28 
29  bool subscriptionsChanged();
30 
31  // Set the handle to the Network Statistics Monitor
32  virtual void setTrafficMonitor( DtNetStatsMonitor* stats );
33 
34  virtual bool netStatsEnabled() const;
35  virtual void setNetStatsEnabled(bool shouldEnable);
36 
37  // Initializes the high performance timer (must be paired with endTimerAndRecord)
38  virtual void startTimer();
39 
40  // Records the service and the elapsed time (must be paired with startTimer)
41  virtual void endTimerAndRecord(DtFedAmbAPIType fedAmbType);
42 
43 protected:
44 
45  MAKRti::DtTime myStartTime;
46  MAKRti::DtClock myClock;
47  DtFederateMgr* myMgr;
48  bool mySubscriptionsChanged;
49 
50  // Statistics Log
51  DtNetStatsMonitor* myNetStats;
52 
53  // API Call Timer
54  MAKRti::DtClock myTimer;
55 
56  // Enable/Disable flag for network statistics
57  bool myNetStatsEnabled;
58 
59 public:
60 
61  //---------------------------------------------------------------
62  // The federate ambassador calls
63  //---------------------------------------------------------------
64 
65  // 4.7
66  virtual
67  void
68  synchronizationPointRegistrationSucceeded(std::wstring const & label)
69  throw (rti1516::FederateInternalError);
70 
71  virtual
72  void
73  synchronizationPointRegistrationFailed(std::wstring const & label,
74  rti1516::SynchronizationFailureReason reason)
75  throw (rti1516::FederateInternalError);
76 
77  // 4.8
78  virtual
79  void
80  announceSynchronizationPoint(std::wstring const & label,
81  rti1516::VariableLengthData const & theUserSuppliedTag)
82  throw (rti1516::FederateInternalError);
83 
84  // 4.10
85  virtual
86  void
87  federationSynchronized(std::wstring const & label)
88  throw (rti1516::FederateInternalError);
89 
90  // 4.12
91  virtual
92  void
93  initiateFederateSave(std::wstring const & label)
94  throw (rti1516::UnableToPerformSave,
95  rti1516::FederateInternalError);
96 
97  virtual
98  void
99  initiateFederateSave(std::wstring const & label,
100  rti1516::LogicalTime const & theTime)
101  throw (rti1516::UnableToPerformSave,
102  rti1516::InvalidLogicalTime,
103  rti1516::FederateInternalError);
104 
105  // 4.15
106  virtual
107  void
109  throw (rti1516::FederateInternalError);
110 
111  virtual
112  void
113  federationNotSaved(rti1516::SaveFailureReason theSaveFailureReason)
114  throw (rti1516::FederateInternalError);
115 
116 
117  // 4.17
118  virtual
119  void
120  federationSaveStatusResponse(
121  rti1516::FederateHandleSaveStatusPairVector const & theFederateStatusVector)
122  throw (rti1516::FederateInternalError);
123 
124  // 4.19
125  virtual
126  void
127  requestFederationRestoreSucceeded(std::wstring const & label)
128  throw (rti1516::FederateInternalError);
129 
130  virtual
131  void
132  requestFederationRestoreFailed(std::wstring const & label)
133  throw (rti1516::FederateInternalError);
134 
135  // 4.20
136  virtual
137  void
139  throw (rti1516::FederateInternalError);
140 
141  // 4.21
142  virtual
143  void
144  initiateFederateRestore(std::wstring const & label,
145  rti1516::FederateHandle handle)
146  throw (rti1516::SpecifiedSaveLabelDoesNotExist,
147  rti1516::CouldNotInitiateRestore,
148  rti1516::FederateInternalError);
149 
150  // 4.23
151  virtual
152  void
154  throw (rti1516::FederateInternalError);
155 
156  virtual
157  void
158  federationNotRestored(rti1516::RestoreFailureReason theRestoreFailureReason)
159  throw (rti1516::FederateInternalError);
160 
161  // 4.25
162  virtual
163  void
164  federationRestoreStatusResponse(
165  rti1516::FederateHandleRestoreStatusPairVector const & theFederateStatusVector)
166  throw (rti1516::FederateInternalError);
167 
169  // Declaration Management Services //
171 
172  // 5.10
173  virtual
174  void
175  startRegistrationForObjectClass(rti1516::ObjectClassHandle theClass)
176  throw (rti1516::ObjectClassNotPublished,
177  rti1516::FederateInternalError);
178 
179  // 5.11
180  virtual
181  void
182  stopRegistrationForObjectClass(rti1516::ObjectClassHandle theClass)
183  throw (rti1516::ObjectClassNotPublished,
184  rti1516::FederateInternalError);
185 
186  // 5.12
187  virtual
188  void
189  turnInteractionsOn(rti1516::InteractionClassHandle theHandle)
190  throw (rti1516::InteractionClassNotPublished,
191  rti1516::FederateInternalError);
192 
193  // 5.13
194  virtual
195  void
196  turnInteractionsOff(rti1516::InteractionClassHandle theHandle)
197  throw (rti1516::InteractionClassNotPublished,
198  rti1516::FederateInternalError);
199 
201  // Object Management Services //
203 
204  // 6.3
205  virtual
206  void
207  objectInstanceNameReservationSucceeded(std::wstring const &
208  theObjectInstanceName)
209  throw (rti1516::UnknownName,
210  rti1516::FederateInternalError);
211 
212  virtual
213  void
214  objectInstanceNameReservationFailed(std::wstring const &
215  theObjectInstanceName)
216  throw (rti1516::UnknownName,
217  rti1516::FederateInternalError);
218 
219 
220  // 6.5
221  virtual
222  void
223  discoverObjectInstance(rti1516::ObjectInstanceHandle theObject,
224  rti1516::ObjectClassHandle theObjectClass,
225  std::wstring const & theObjectInstanceName)
226  throw (rti1516::CouldNotDiscover,
227  rti1516::ObjectClassNotKnown,
228  rti1516::FederateInternalError);
229 
230  // 6.7
231  virtual
232  void
234  (rti1516::ObjectInstanceHandle theObject,
235  rti1516::AttributeHandleValueMap const & theAttributeValues,
236  rti1516::VariableLengthData const & theUserSuppliedTag,
237  rti1516::OrderType sentOrder,
238  rti1516::TransportationType theType)
239  throw (rti1516::ObjectInstanceNotKnown,
240  rti1516::AttributeNotRecognized,
241  rti1516::AttributeNotSubscribed,
242  rti1516::FederateInternalError);
243 
244  virtual
245  void
247  (rti1516::ObjectInstanceHandle theObject,
248  rti1516::AttributeHandleValueMap const & theAttributeValues,
249  rti1516::VariableLengthData const & theUserSuppliedTag,
250  rti1516::OrderType sentOrder,
251  rti1516::TransportationType theType,
252  rti1516::RegionHandleSet const & theSentRegionHandleSet)
253  throw (rti1516::ObjectInstanceNotKnown,
254  rti1516::AttributeNotRecognized,
255  rti1516::AttributeNotSubscribed,
256  rti1516::FederateInternalError);
257 
258  virtual
259  void
261  (rti1516::ObjectInstanceHandle theObject,
262  rti1516::AttributeHandleValueMap const & theAttributeValues,
263  rti1516::VariableLengthData const & theUserSuppliedTag,
264  rti1516::OrderType sentOrder,
265  rti1516::TransportationType theType,
266  rti1516::LogicalTime const & theTime,
267  rti1516::OrderType receivedOrder)
268  throw (rti1516::ObjectInstanceNotKnown,
269  rti1516::AttributeNotRecognized,
270  rti1516::AttributeNotSubscribed,
271  rti1516::FederateInternalError);
272 
273  virtual
274  void
276  (rti1516::ObjectInstanceHandle theObject,
277  rti1516::AttributeHandleValueMap const & theAttributeValues,
278  rti1516::VariableLengthData const & theUserSuppliedTag,
279  rti1516::OrderType sentOrder,
280  rti1516::TransportationType theType,
281  rti1516::LogicalTime const & theTime,
282  rti1516::OrderType receivedOrder,
283  rti1516::RegionHandleSet const & theSentRegionHandleSet)
284  throw (rti1516::ObjectInstanceNotKnown,
285  rti1516::AttributeNotRecognized,
286  rti1516::AttributeNotSubscribed,
287  rti1516::FederateInternalError);
288 
289  virtual
290  void
292  (rti1516::ObjectInstanceHandle theObject,
293  rti1516::AttributeHandleValueMap const & theAttributeValues,
294  rti1516::VariableLengthData const & theUserSuppliedTag,
295  rti1516::OrderType sentOrder,
296  rti1516::TransportationType theType,
297  rti1516::LogicalTime const & theTime,
298  rti1516::OrderType receivedOrder,
299  rti1516::MessageRetractionHandle theHandle)
300  throw (rti1516::ObjectInstanceNotKnown,
301  rti1516::AttributeNotRecognized,
302  rti1516::AttributeNotSubscribed,
303  rti1516::InvalidLogicalTime,
304  rti1516::FederateInternalError);
305 
306  virtual
307  void
309  (rti1516::ObjectInstanceHandle theObject,
310  rti1516::AttributeHandleValueMap const & theAttributeValues,
311  rti1516::VariableLengthData const & theUserSuppliedTag,
312  rti1516::OrderType sentOrder,
313  rti1516::TransportationType theType,
314  rti1516::LogicalTime const & theTime,
315  rti1516::OrderType receivedOrder,
316  rti1516::MessageRetractionHandle theHandle,
317  rti1516::RegionHandleSet const & theSentRegionHandleSet)
318  throw (rti1516::ObjectInstanceNotKnown,
319  rti1516::AttributeNotRecognized,
320  rti1516::AttributeNotSubscribed,
321  rti1516::InvalidLogicalTime,
322  rti1516::FederateInternalError);
323 
324  // Simple event processing ignores additional reflect parameters
325  virtual void processReflectAttributeValues(rti1516::ObjectInstanceHandle theObject);
326 
327  // 6.9
328  virtual
329  void
331  (rti1516::InteractionClassHandle theInteraction,
332  rti1516::ParameterHandleValueMap const & theParameterValues,
333  rti1516::VariableLengthData const & theUserSuppliedTag,
334  rti1516::OrderType sentOrder,
335  rti1516::TransportationType theType)
336  throw (rti1516::InteractionClassNotRecognized,
337  rti1516::InteractionParameterNotRecognized,
338  rti1516::InteractionClassNotSubscribed,
339  rti1516::FederateInternalError);
340 
341  virtual
342  void
344  (rti1516::InteractionClassHandle theInteraction,
345  rti1516::ParameterHandleValueMap const & theParameterValues,
346  rti1516::VariableLengthData const & theUserSuppliedTag,
347  rti1516::OrderType sentOrder,
348  rti1516::TransportationType theType,
349  rti1516::RegionHandleSet const & theSentRegionHandleSet)
350  throw (rti1516::InteractionClassNotRecognized,
351  rti1516::InteractionParameterNotRecognized,
352  rti1516::InteractionClassNotSubscribed,
353  rti1516::FederateInternalError);
354 
355  virtual
356  void
358  (rti1516::InteractionClassHandle theInteraction,
359  rti1516::ParameterHandleValueMap const & theParameterValues,
360  rti1516::VariableLengthData const & theUserSuppliedTag,
361  rti1516::OrderType sentOrder,
362  rti1516::TransportationType theType,
363  rti1516::LogicalTime const & theTime,
364  rti1516::OrderType receivedOrder)
365  throw (rti1516::InteractionClassNotRecognized,
366  rti1516::InteractionParameterNotRecognized,
367  rti1516::InteractionClassNotSubscribed,
368  rti1516::FederateInternalError);
369 
370  virtual
371  void
373  (rti1516::InteractionClassHandle theInteraction,
374  rti1516::ParameterHandleValueMap const & theParameterValues,
375  rti1516::VariableLengthData const & theUserSuppliedTag,
376  rti1516::OrderType sentOrder,
377  rti1516::TransportationType theType,
378  rti1516::LogicalTime const & theTime,
379  rti1516::OrderType receivedOrder,
380  rti1516::RegionHandleSet const & theSentRegionHandleSet)
381  throw (rti1516::InteractionClassNotRecognized,
382  rti1516::InteractionParameterNotRecognized,
383  rti1516::InteractionClassNotSubscribed,
384  rti1516::FederateInternalError);
385 
386  virtual
387  void
389  (rti1516::InteractionClassHandle theInteraction,
390  rti1516::ParameterHandleValueMap const & theParameterValues,
391  rti1516::VariableLengthData const & theUserSuppliedTag,
392  rti1516::OrderType sentOrder,
393  rti1516::TransportationType theType,
394  rti1516::LogicalTime const & theTime,
395  rti1516::OrderType receivedOrder,
396  rti1516::MessageRetractionHandle theHandle)
397  throw (rti1516::InteractionClassNotRecognized,
398  rti1516::InteractionParameterNotRecognized,
399  rti1516::InteractionClassNotSubscribed,
400  rti1516::InvalidLogicalTime,
401  rti1516::FederateInternalError);
402 
403  virtual
404  void
406  (rti1516::InteractionClassHandle theInteraction,
407  rti1516::ParameterHandleValueMap const & theParameterValues,
408  rti1516::VariableLengthData const & theUserSuppliedTag,
409  rti1516::OrderType sentOrder,
410  rti1516::TransportationType theType,
411  rti1516::LogicalTime const & theTime,
412  rti1516::OrderType receivedOrder,
413  rti1516::MessageRetractionHandle theHandle,
414  rti1516::RegionHandleSet const & theSentRegionHandleSet)
415  throw (rti1516::InteractionClassNotRecognized,
416  rti1516::InteractionParameterNotRecognized,
417  rti1516::InteractionClassNotSubscribed,
418  rti1516::InvalidLogicalTime,
419  rti1516::FederateInternalError);
420 
421  // Simple event processing ignores additional receive parameters
422  virtual void processReceiveInteraction(rti1516::InteractionClassHandle theInteraction);
423 
424  // 6.11
425  virtual
426  void
427  removeObjectInstance(rti1516::ObjectInstanceHandle theObject,
428  rti1516::VariableLengthData const & theUserSuppliedTag,
429  rti1516::OrderType sentOrder)
430  throw (rti1516::ObjectInstanceNotKnown,
431  rti1516::FederateInternalError);
432 
433  virtual
434  void
435  removeObjectInstance(rti1516::ObjectInstanceHandle theObject,
436  rti1516::VariableLengthData const & theUserSuppliedTag,
437  rti1516::OrderType sentOrder,
438  rti1516::LogicalTime const & theTime,
439  rti1516::OrderType receivedOrder)
440  throw (rti1516::ObjectInstanceNotKnown,
441  rti1516::FederateInternalError);
442 
443  virtual
444  void
445  removeObjectInstance(rti1516::ObjectInstanceHandle theObject,
446  rti1516::VariableLengthData const & theUserSuppliedTag,
447  rti1516::OrderType sentOrder,
448  rti1516::LogicalTime const & theTime,
449  rti1516::OrderType receivedOrder,
450  rti1516::MessageRetractionHandle theHandle)
451  throw (rti1516::ObjectInstanceNotKnown,
452  rti1516::InvalidLogicalTime,
453  rti1516::FederateInternalError);
454 
455  // Simple event processing ignores additional remove parameters
456  virtual void processRemoveObjectInstance(rti1516::ObjectInstanceHandle theObject);
457 
458  // 6.15
459  virtual
460  void
462  (rti1516::ObjectInstanceHandle theObject,
463  rti1516::AttributeHandleSet const & theAttributes)
464  throw (rti1516::ObjectInstanceNotKnown,
465  rti1516::AttributeNotRecognized,
466  rti1516::AttributeNotSubscribed,
467  rti1516::FederateInternalError);
468 
469  // 6.16
470  virtual
471  void
473  (rti1516::ObjectInstanceHandle theObject,
474  rti1516::AttributeHandleSet const & theAttributes)
475  throw (rti1516::ObjectInstanceNotKnown,
476  rti1516::AttributeNotRecognized,
477  rti1516::AttributeNotSubscribed,
478  rti1516::FederateInternalError);
479 
480  // 6.18
481  virtual
482  void
484  (rti1516::ObjectInstanceHandle theObject,
485  rti1516::AttributeHandleSet const & theAttributes,
486  rti1516::VariableLengthData const & theUserSuppliedTag)
487  throw (rti1516::ObjectInstanceNotKnown,
488  rti1516::AttributeNotRecognized,
489  rti1516::AttributeNotOwned,
490  rti1516::FederateInternalError);
491 
492  // 6.19
493  virtual
494  void
496  (rti1516::ObjectInstanceHandle theObject,
497  rti1516::AttributeHandleSet const & theAttributes)
498  throw (rti1516::ObjectInstanceNotKnown,
499  rti1516::AttributeNotRecognized,
500  rti1516::AttributeNotOwned,
501  rti1516::FederateInternalError);
502 
503  // 6.20
504  virtual
505  void
507  (rti1516::ObjectInstanceHandle theObject,
508  rti1516::AttributeHandleSet const & theAttributes)
509  throw (rti1516::ObjectInstanceNotKnown,
510  rti1516::AttributeNotRecognized,
511  rti1516::AttributeNotOwned,
512  rti1516::FederateInternalError);
513 
515  // Ownership Management Services //
517 
518  // 7.4
519  virtual
520  void
522  (rti1516::ObjectInstanceHandle theObject,
523  rti1516::AttributeHandleSet const & offeredAttributes,
524  rti1516::VariableLengthData const & theUserSuppliedTag)
525  throw (rti1516::ObjectInstanceNotKnown,
526  rti1516::AttributeNotRecognized,
527  rti1516::AttributeAlreadyOwned,
528  rti1516::AttributeNotPublished,
529  rti1516::FederateInternalError);
530 
531  // 7.5
532  virtual
533  void
534  requestDivestitureConfirmation
535  (rti1516::ObjectInstanceHandle theObject,
536  rti1516::AttributeHandleSet const & releasedAttributes)
537  throw (rti1516::ObjectInstanceNotKnown,
538  rti1516::AttributeNotRecognized,
539  rti1516::AttributeNotOwned,
540  rti1516::AttributeDivestitureWasNotRequested,
541  rti1516::FederateInternalError);
542 
543  // 7.7
544  virtual
545  void
547  (rti1516::ObjectInstanceHandle theObject,
548  rti1516::AttributeHandleSet const & securedAttributes,
549  rti1516::VariableLengthData const & theUserSuppliedTag)
550  throw (rti1516::ObjectInstanceNotKnown,
551  rti1516::AttributeNotRecognized,
552  rti1516::AttributeAcquisitionWasNotRequested,
553  rti1516::AttributeAlreadyOwned,
554  rti1516::AttributeNotPublished,
555  rti1516::FederateInternalError);
556 
557  // 7.10
558  virtual
559  void
561  (rti1516::ObjectInstanceHandle theObject,
562  rti1516::AttributeHandleSet const & theAttributes)
563  throw (rti1516::ObjectInstanceNotKnown,
564  rti1516::AttributeNotRecognized,
565  rti1516::AttributeAlreadyOwned,
566  rti1516::AttributeAcquisitionWasNotRequested,
567  rti1516::FederateInternalError);
568 
569  // 7.11
570  virtual
571  void
573  (rti1516::ObjectInstanceHandle theObject,
574  rti1516::AttributeHandleSet const & candidateAttributes,
575  rti1516::VariableLengthData const & theUserSuppliedTag)
576  throw (rti1516::ObjectInstanceNotKnown,
577  rti1516::AttributeNotRecognized,
578  rti1516::AttributeNotOwned,
579  rti1516::FederateInternalError);
580 
581  // 7.15
582  virtual
583  void
585  (rti1516::ObjectInstanceHandle theObject,
586  rti1516::AttributeHandleSet const & theAttributes)
587  throw (rti1516::ObjectInstanceNotKnown,
588  rti1516::AttributeNotRecognized,
589  rti1516::AttributeAlreadyOwned,
590  rti1516::AttributeAcquisitionWasNotCanceled,
591  rti1516::FederateInternalError);
592 
593  // 7.17
594  virtual
595  void
596  informAttributeOwnership(rti1516::ObjectInstanceHandle theObject,
597  rti1516::AttributeHandle theAttribute,
598  rti1516::FederateHandle theOwner)
599  throw (rti1516::ObjectInstanceNotKnown,
600  rti1516::AttributeNotRecognized,
601  rti1516::FederateInternalError);
602 
603  virtual
604  void
605  attributeIsNotOwned(rti1516::ObjectInstanceHandle theObject,
606  rti1516::AttributeHandle theAttribute)
607  throw (rti1516::ObjectInstanceNotKnown,
608  rti1516::AttributeNotRecognized,
609  rti1516::FederateInternalError);
610 
611  virtual
612  void
613  attributeIsOwnedByRTI(rti1516::ObjectInstanceHandle theObject,
614  rti1516::AttributeHandle theAttribute)
615  throw (rti1516::ObjectInstanceNotKnown,
616  rti1516::AttributeNotRecognized,
617  rti1516::FederateInternalError);
618 
620  // Time Management Services //
622 
623  // 8.3
624  virtual
625  void
626  timeRegulationEnabled(rti1516::LogicalTime const & theFederateTime)
627  throw (rti1516::InvalidLogicalTime,
628  rti1516::NoRequestToEnableTimeRegulationWasPending,
629  rti1516::FederateInternalError);
630 
631  // 8.6
632  virtual
633  void
634  timeConstrainedEnabled(rti1516::LogicalTime const & theFederateTime)
635  throw (rti1516::InvalidLogicalTime,
636  rti1516::NoRequestToEnableTimeConstrainedWasPending,
637  rti1516::FederateInternalError);
638 
639  // 8.13
640  virtual
641  void
642  timeAdvanceGrant(rti1516::LogicalTime const & theTime)
643  throw (rti1516::InvalidLogicalTime,
644  rti1516::JoinedFederateIsNotInTimeAdvancingState,
645  rti1516::FederateInternalError);
646 
647  // 8.22
648  virtual
649  void
650  requestRetraction(rti1516::MessageRetractionHandle theHandle)
651  throw (rti1516::FederateInternalError);
652 
653  private:
654  static const DtString theUnknownName;
655 
656 };
657 
658 #endif // DtIFSPEC1516
659 #endif // netStatsFedAmb1516_h__

Document ID: Generated on Fri Sep 27 00:57:56 EDT 2019 from SVN revision 201708
Copyright © 2005-2018 VT MÄK Inc. All Rights Reserved (www.mak.com)