MAK Data Logger API Documentation for HLA
fedAmbCallback13.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 1992-2012 VT MAK
3 ** All rights reserved.
4 ******************************************************************************/
5 
8 
9 #if DtHLA
10 #if !DtHLA_1516
11 
12 #pragma once
13 
15 #include "fedAmbCallback.h"
16 
17 #include <memory>
18 
19 namespace MAKTrafficClientServerExConn
20 {
21 
22  class DtTaCallbackMsg;
23 
26  {
30 
44 
48 
53 
57 
70 
74 
76  DtTaFedAmbCall_attributeOwnershipDivestitureNotification,
83  DtTaFedAmbCall_attributeOwnedByRTI,
84 
88 
93 
96  };
97 
98  // Call takes fedTime
99  template<int callbackKindValue>
100  class DtTaCallbackWithTime : public DtTaCallback
101  {
102  public:
105  std::auto_ptr<RTI::FedTime> time);
107  virtual ~DtTaCallbackWithTime();
108  private:
112  public:
114  virtual void invokeCallback(RTI::FederateAmbassador* fedAmb) const;
115  protected:
116  std::auto_ptr<RTI::FedTime> myTime;
117  };
118 
119  // Call takes object handle, attribute set, and optional user tag
120  template<int callbackKindValue>
121  class DtTaCallbackWithObjectAttributesOptTag : public DtTaCallback
122  {
123  public:
126  RTI::ObjectHandle theObject,
127  RTI::AttributeHandleSet const & theAttributes);
129  RTI::ObjectHandle theObject,
130  RTI::AttributeHandleSet const & theAttributes,
131  const char * theUserTag);
132 
135  private:
139  public:
141  virtual void invokeCallback(RTI::FederateAmbassador* fedAmb) const;
142  protected:
143  RTI::ObjectHandle myObject;
144  std::auto_ptr<RTI::AttributeHandleSet> myAttributes;
145  DtString myTag;
146  };
147 
148  typedef DtTaCallbackWithString<DtTaFedAmbCall_synchronizationPointRegistrationSucceeded> DtTaCbSynchronizationPointRegistrationSucceeded;
149  typedef DtTaCallbackWithString<DtTaFedAmbCall_synchronizationPointRegistrationFailed> DtTaCbSynchronizationPointRegistrationFailed;
150  typedef DtTaCallbackWithTwoStrings<DtTaFedAmbCall_announceSynchronizationPoint> DtTaCbAnnounceSynchronizationPoint;
151  typedef DtTaCallbackWithString<DtTaFedAmbCall_federationSynchronized> DtTaCbFederationSynchronized;
152  typedef DtTaCallbackWithString<DtTaFedAmbCall_initiateFederateSave> DtTaCbInitiateFederateSave;
153  typedef DtTaCallbackVoid<DtTaFedAmbCall_federationSaved> DtTaCbFederationSaved;
154  typedef DtTaCallbackVoid<DtTaFedAmbCall_federationNotSaved> DtTaCbFederationNotSaved;
155  typedef DtTaCallbackWithString<DtTaFedAmbCall_requestFederationRestoreSucceeded> DtTaCbRequestFederationRestoreSucceeded;
156  typedef DtTaCallbackWithTwoStrings<DtTaFedAmbCall_requestFederationRestoreFailed> DtTaCbRequestFederationRestoreFailed;
157  typedef DtTaCallbackVoid<DtTaFedAmbCall_federationRestoreBegun> DtTaCbFederationRestoreBegun;
158 
159  class DtTaCbInitiateFederateRestore : public DtTaCallback
160  {
161  public:
163  DtTaCbInitiateFederateRestore(const char * label, RTI::FederateHandle handle);
164 
167  private:
171  public:
173  virtual void invokeCallback(RTI::FederateAmbassador* fedAmb) const;
174  protected:
176  RTI::FederateHandle myFederateHandle;
177  };
178 
179  typedef DtTaCallbackVoid<DtTaFedAmbCall_federationRestored> DtTaCbFederationRestored;
180  typedef DtTaCallbackVoid<DtTaFedAmbCall_federationNotRestored> DtTaCbFederationNotRestored;
181  typedef DtTaCallbackWithObjectClass<DtTaFedAmbCall_startRegistrationForObjectClass> DtTaCbStartRegistrationForObjectClass;
182  typedef DtTaCallbackWithObjectClass<DtTaFedAmbCall_stopRegistrationForObjectClass> DtTaCbStopRegistrationForObjectClass;
183  typedef DtTaCallbackWithInteractionClass<DtTaFedAmbCall_turnInteractionsOn> DtTaCbTurnInteractionsOn;
184  typedef DtTaCallbackWithInteractionClass<DtTaFedAmbCall_turnInteractionsOff> DtTaCbTurnInteractionsOff;
185 
186  class DtTaCbDiscoverObjectInstance: public DtTaCallback
187  {
188  public:
190  DtTaCbDiscoverObjectInstance(RTI::ObjectHandle theObject,
191  RTI::ObjectClassHandle theObjectClass,
192  const char * theObjectInstanceName);
195  private:
199  public:
201  virtual void invokeCallback(RTI::FederateAmbassador* fedAmb) const;
202  protected:
203  RTI::ObjectHandle myObjectHandle;
204  RTI::ObjectClassHandle myObjectClassHandle;
206  };
207 
208  class DtTaCbReflectAttributeValues: public DtTaCallback
209  {
210  public:
213  RTI::ObjectHandle theObject,
214  const RTI::AttributeHandleValuePairSet& theAttributes,
215  const char * theTag);
216 
218  RTI::ObjectHandle theObject,
219  const RTI::AttributeHandleValuePairSet& theAttributes,
220  std::auto_ptr<RTI::FedTime> theTime,
221  const char * theTag,
222  RTI::EventRetractionHandle theHandle);
223 
226  private:
230  public:
232  virtual void invokeCallback(RTI::FederateAmbassador* fedAmb) const;
233 
234  protected:
235  RTI::ObjectHandle myObject;
236  std::auto_ptr<RTI::AttributeHandleValuePairSet> myAttributeValues;
237  DtString myTag;
238  std::auto_ptr<RTI::FedTime> myTime;
239  RTI::EventRetractionHandle myRetractHandle;
240  };
241 
242  class DtTaCbReceiveInteraction: public DtTaCallback
243  {
244  public:
247  RTI::InteractionClassHandle theInteraction,
248  const RTI::ParameterHandleValuePairSet& theParameters,
249  const char * theTag);
250 
252  RTI::InteractionClassHandle theInteraction,
253  const RTI::ParameterHandleValuePairSet& theParameters,
254  std::auto_ptr<RTI::FedTime> theTime,
255  const char * theTag,
256  RTI::EventRetractionHandle theHandle);
257 
259  virtual ~DtTaCbReceiveInteraction();
260  private:
264  public:
266  virtual void invokeCallback(RTI::FederateAmbassador* fedAmb) const;
267 
268  protected:
269  RTI::InteractionClassHandle myInteractionClass;
270  std::auto_ptr<RTI::ParameterHandleValuePairSet> myParameterValues;
271  DtString myTag;
272  std::auto_ptr<RTI::FedTime> myTime;
273  RTI::EventRetractionHandle myRetractHandle;
274  };
275 
276  class DtTaCbRemoveObjectInstance: public DtTaCallback
277  {
278  public:
281  RTI::ObjectHandle theObject,
282  const char * theTag);
284  RTI::ObjectHandle theObject,
285  std::auto_ptr<RTI::FedTime> theTime,
286  const char * theTag,
287  RTI::EventRetractionHandle theHandle);
288 
290  virtual ~DtTaCbRemoveObjectInstance();
291  private:
295  public:
297  virtual void invokeCallback(RTI::FederateAmbassador* fedAmb) const;
298  protected:
299  RTI::ObjectHandle myObjectHandle;
300  DtString myTag;
301  std::auto_ptr<RTI::FedTime> myTime;
302  RTI::EventRetractionHandle myRetractHandle;
303  };
304 
305  typedef DtTaCallbackWithObjectAttributesOptTag<DtTaFedAmbCall_attributesInScope> DtTaCbAttributesInScope;
306  typedef DtTaCallbackWithObjectAttributesOptTag<DtTaFedAmbCall_attributesOutOfScope> DtTaCbAttributesOutOfScope;
307  typedef DtTaCallbackWithObjectAttributesOptTag<DtTaFedAmbCall_provideAttributeValueUpdate> DtTaCbProvideAttributeValueUpdate;
308  typedef DtTaCallbackWithObjectAttributesOptTag<DtTaFedAmbCall_turnUpdatesOnForObjectInstance> DtTaCbTurnUpdatesOnForObjectInstance;
309  typedef DtTaCallbackWithObjectAttributesOptTag<DtTaFedAmbCall_turnUpdatesOffForObjectInstance> DtTaCbTurnUpdatesOffForObjectInstance;
310 
311  typedef DtTaCallbackWithObjectAttributesOptTag<DtTaFedAmbCall_requestAttributeOwnershipAssumption> DtTaCbRequestAttributeOwnershipAssumption;
312  typedef DtTaCallbackWithObjectAttributesOptTag<DtTaFedAmbCall_attributeOwnershipDivestitureNotification> DtTaCbAttributeOwnershipDivestitureNotification;
313  typedef DtTaCallbackWithObjectAttributesOptTag<DtTaFedAmbCall_attributeOwnershipAcquisitionNotification> DtTaCbAttributeOwnershipAcquisitionNotification;
314  typedef DtTaCallbackWithObjectAttributesOptTag<DtTaFedAmbCall_attributeOwnershipUnavailable> DtTaCbAttributeOwnershipUnavailable;
315  typedef DtTaCallbackWithObjectAttributesOptTag<DtTaFedAmbCall_requestAttributeOwnershipRelease> DtTaCbRequestAttributeOwnershipRelease;
316  typedef DtTaCallbackWithObjectAttributesOptTag<DtTaFedAmbCall_confirmAttributeOwnershipAcquisitionCancellation> DtTaCbConfirmAttributeOwnershipAcquisitionCancellation;
317  typedef DtTaCallbackWithObjectAttributeOptFederate <DtTaFedAmbCall_informAttributeOwnership> DtTaCbInformAttributeOwnership;
318  typedef DtTaCallbackWithObjectAttributeOptFederate <DtTaFedAmbCall_attributeIsNotOwned> DtTaCbAttributeIsNotOwned;
319  typedef DtTaCallbackWithObjectAttributeOptFederate <DtTaFedAmbCall_attributeOwnedByRTI> DtTaCbAttributeOwnedByRTI;
320 
321  typedef DtTaCallbackWithTime<DtTaFedAmbCall_timeRegulationEnabled> DtTaCbTimeRegulationEnabled;
322  typedef DtTaCallbackWithTime<DtTaFedAmbCall_timeConstrainedEnabled> DtTaCbTimeConstrainedEnabled;
323  typedef DtTaCallbackWithTime<DtTaFedAmbCall_timeAdvanceGrant> DtTaCbTimeAdvanceGrant;
324 
325  class DtTaCbRequestRetraction: public DtTaCallback
326  {
327  public:
329  DtTaCbRequestRetraction(RTI::EventRetractionHandle handle);
331  virtual ~DtTaCbRequestRetraction();
332  private:
336  public:
338  virtual void invokeCallback(RTI::FederateAmbassador* fedAmb) const;
339  protected:
340  RTI::EventRetractionHandle myRetractHandle;
341  };
342 
344  DT_DLL_CSEC const char * callbackKindToString(int kind);
345 
346  #define fedAmbCallback13_inl_
347  #include "fedAmbCallback13.inl"
348  #undef fedAmbCallback13_inl_
349 
350 }
351 
352 #endif
353 #endif

Document ID: Generated on Thu Apr 10 18:53:01 EDT 2014 from SVN revision 138105
Copyright © 2005-2012 VT MÄK. All Rights Reserved (www.mak.com)