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

Document ID: Generated on Tue May 7 16:26:47 EDT 2013 from SVN revision 126903
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)