![]() |
MAK RTIspy API Documentation for HLA 1516
|
00001 /********************************************************************* 00002 ** Copyright (c) 2010 MaK Technologies, Inc. 00003 ** All rights reserved. 00004 *********************************************************************/ 00005 /********************************************************************* 00006 ** $RCSfile: fedAmbCallbackQueue1516e.h,v $ $Revision: 1.0 $ $State: Exp $ 00007 *********************************************************************/ 00008 00009 #ifndef DtFedAmbCallbackQueue1516e_h 00010 #define DtFedAmbCallbackQueue1516e_h 00011 #ifdef DtIFSPEC1516E 00012 00015 00016 #include <queue> 00017 #include <RTI/Typedefs.h> 00018 #include "fedAmbWrap1516e.h" 00019 #include "rtiMsg.h" 00020 00021 class DtFederateMgr; 00022 class DtFedAmbCallback; 00023 00024 typedef std::queue<DtRtiMsg*> DtFedAmbMsgQueue; 00025 00029 class DT_DLL_LRC DtCallbackQueue : public DtFedAmbWrapper 00030 { 00031 public: 00032 00034 DtCallbackQueue(DtFederateMgr* fedMgr = 0); 00035 00037 virtual ~DtCallbackQueue() throw (); 00038 00039 private: 00041 DtCallbackQueue(DtCallbackQueue const& orig); 00043 DtCallbackQueue& operator = (DtCallbackQueue const& orig); 00044 00045 public: 00046 00048 virtual void enableQueue(); 00049 00051 virtual void disableQueue(); 00052 00054 MAKRti::DtString const& name() const; 00055 00057 virtual DtRtiMsg* popMessage(); 00058 00062 00063 00064 // 4.4 00065 virtual void connectionLost ( 00066 std::wstring const & faultDescription) 00067 throw ( 00068 FederateInternalError); 00069 00070 // 4.8 00071 virtual void reportFederationExecutions ( 00072 FederationExecutionInformationVector const & 00073 theFederationExecutionInformationList) 00074 throw ( 00075 FederateInternalError); 00076 00077 // 4.12 00078 virtual void synchronizationPointRegistrationSucceeded ( 00079 std::wstring const & label) 00080 throw ( 00081 FederateInternalError); 00082 00083 virtual void synchronizationPointRegistrationFailed ( 00084 std::wstring const & label, 00085 SynchronizationPointFailureReason reason) 00086 throw ( 00087 FederateInternalError); 00088 00089 // 4.13 00090 virtual void announceSynchronizationPoint ( 00091 std::wstring const & label, 00092 VariableLengthData const & theUserSuppliedTag) 00093 throw ( 00094 FederateInternalError); 00095 00096 // 4.15 00097 virtual void federationSynchronized ( 00098 std::wstring const & label, 00099 FederateHandleSet const& failedToSyncSet) 00100 throw ( 00101 FederateInternalError); 00102 00103 // 4.17 00104 virtual void initiateFederateSave ( 00105 std::wstring const & label) 00106 throw ( 00107 FederateInternalError); 00108 00109 virtual void initiateFederateSave ( 00110 std::wstring const & label, 00111 LogicalTime const & theTime) 00112 throw ( 00113 FederateInternalError); 00114 00115 // 4.20 00116 virtual void federationSaved () 00117 throw ( 00118 FederateInternalError); 00119 00120 virtual void federationNotSaved ( 00121 SaveFailureReason theSaveFailureReason) 00122 throw ( 00123 FederateInternalError); 00124 00125 00126 // 4.23 00127 virtual void federationSaveStatusResponse ( 00128 FederateHandleSaveStatusPairVector const & 00129 theFederateStatusVector) 00130 throw ( 00131 FederateInternalError); 00132 00133 // 4.25 00134 virtual void requestFederationRestoreSucceeded ( 00135 std::wstring const & label) 00136 throw ( 00137 FederateInternalError); 00138 00139 virtual void requestFederationRestoreFailed ( 00140 std::wstring const & label) 00141 throw ( 00142 FederateInternalError); 00143 00144 // 4.26 00145 virtual void federationRestoreBegun () 00146 throw ( 00147 FederateInternalError); 00148 00149 // 4.27 00150 virtual void initiateFederateRestore ( 00151 std::wstring const & label, 00152 std::wstring const & federateName, 00153 FederateHandle handle) 00154 throw ( 00155 FederateInternalError); 00156 00157 // 4.29 00158 virtual void federationRestored () 00159 throw ( 00160 FederateInternalError); 00161 00162 virtual void federationNotRestored ( 00163 RestoreFailureReason theRestoreFailureReason) 00164 throw ( 00165 FederateInternalError); 00166 00167 // 4.32 00168 virtual void federationRestoreStatusResponse ( 00169 FederateRestoreStatusVector const & 00170 theFederateRestoreStatusVector) 00171 throw ( 00172 FederateInternalError); 00173 00175 // Declaration Management Services // 00177 00178 // 5.10 00179 virtual void startRegistrationForObjectClass ( 00180 ObjectClassHandle theClass) 00181 throw ( 00182 FederateInternalError); 00183 00184 // 5.11 00185 virtual void stopRegistrationForObjectClass ( 00186 ObjectClassHandle theClass) 00187 throw ( 00188 FederateInternalError); 00189 00190 // 5.12 00191 virtual void turnInteractionsOn ( 00192 InteractionClassHandle theHandle) 00193 throw ( 00194 FederateInternalError); 00195 00196 // 5.13 00197 virtual void turnInteractionsOff ( 00198 InteractionClassHandle theHandle) 00199 throw ( 00200 FederateInternalError); 00201 00203 // Object Management Services // 00205 00206 // 6.3 00207 virtual void objectInstanceNameReservationSucceeded ( 00208 std::wstring const & theObjectInstanceName) 00209 throw ( 00210 FederateInternalError); 00211 00212 virtual void objectInstanceNameReservationFailed ( 00213 std::wstring const & theObjectInstanceName) 00214 throw ( 00215 FederateInternalError); 00216 00217 // 6.6 00218 virtual void multipleObjectInstanceNameReservationSucceeded ( 00219 std::set<std::wstring> const & theObjectInstanceNames) 00220 throw ( 00221 FederateInternalError); 00222 00223 virtual void multipleObjectInstanceNameReservationFailed ( 00224 std::set<std::wstring> const & theObjectInstanceNames) 00225 throw ( 00226 FederateInternalError); 00227 00228 // 6.9 00229 virtual void discoverObjectInstance ( 00230 ObjectInstanceHandle theObject, 00231 ObjectClassHandle theObjectClass, 00232 std::wstring const & theObjectInstanceName) 00233 throw ( 00234 FederateInternalError); 00235 00236 virtual void discoverObjectInstance ( 00237 ObjectInstanceHandle theObject, 00238 ObjectClassHandle theObjectClass, 00239 std::wstring const & theObjectInstanceName, 00240 FederateHandle producingFederate) 00241 throw ( 00242 FederateInternalError); 00243 00244 // 6.11 00245 virtual void reflectAttributeValues ( 00246 ObjectInstanceHandle theObject, 00247 AttributeHandleValueMap const & theAttributeValues, 00248 VariableLengthData const & theUserSuppliedTag, 00249 OrderType sentOrder, 00250 TransportationType theType, 00251 SupplementalReflectInfo theReflectInfo) 00252 throw ( 00253 FederateInternalError); 00254 00255 virtual void reflectAttributeValues ( 00256 ObjectInstanceHandle theObject, 00257 AttributeHandleValueMap const & theAttributeValues, 00258 VariableLengthData const & theUserSuppliedTag, 00259 OrderType sentOrder, 00260 TransportationType theType, 00261 LogicalTime const & theTime, 00262 OrderType receivedOrder, 00263 SupplementalReflectInfo theReflectInfo) 00264 throw ( 00265 FederateInternalError); 00266 00267 virtual void reflectAttributeValues ( 00268 ObjectInstanceHandle theObject, 00269 AttributeHandleValueMap const & theAttributeValues, 00270 VariableLengthData const & theUserSuppliedTag, 00271 OrderType sentOrder, 00272 TransportationType theType, 00273 LogicalTime const & theTime, 00274 OrderType receivedOrder, 00275 MessageRetractionHandle theHandle, 00276 SupplementalReflectInfo theReflectInfo) 00277 throw ( 00278 FederateInternalError); 00279 00280 // 6.13 00281 virtual void receiveInteraction ( 00282 InteractionClassHandle theInteraction, 00283 ParameterHandleValueMap const & theParameterValues, 00284 VariableLengthData const & theUserSuppliedTag, 00285 OrderType sentOrder, 00286 TransportationType theType, 00287 SupplementalReceiveInfo theReceiveInfo) 00288 throw ( 00289 FederateInternalError); 00290 00291 virtual void receiveInteraction ( 00292 InteractionClassHandle theInteraction, 00293 ParameterHandleValueMap const & theParameterValues, 00294 VariableLengthData const & theUserSuppliedTag, 00295 OrderType sentOrder, 00296 TransportationType theType, 00297 LogicalTime const & theTime, 00298 OrderType receivedOrder, 00299 SupplementalReceiveInfo theReceiveInfo) 00300 throw ( 00301 FederateInternalError); 00302 00303 virtual void receiveInteraction ( 00304 InteractionClassHandle theInteraction, 00305 ParameterHandleValueMap const & theParameterValues, 00306 VariableLengthData const & theUserSuppliedTag, 00307 OrderType sentOrder, 00308 TransportationType theType, 00309 LogicalTime const & theTime, 00310 OrderType receivedOrder, 00311 MessageRetractionHandle theHandle, 00312 SupplementalReceiveInfo theReceiveInfo) 00313 throw ( 00314 FederateInternalError); 00315 00316 // 6.15 00317 virtual void removeObjectInstance ( 00318 ObjectInstanceHandle theObject, 00319 VariableLengthData const & theUserSuppliedTag, 00320 OrderType sentOrder, 00321 SupplementalRemoveInfo theRemoveInfo) 00322 throw ( 00323 FederateInternalError); 00324 00325 virtual void removeObjectInstance ( 00326 ObjectInstanceHandle theObject, 00327 VariableLengthData const & theUserSuppliedTag, 00328 OrderType sentOrder, 00329 LogicalTime const & theTime, 00330 OrderType receivedOrder, 00331 SupplementalRemoveInfo theRemoveInfo) 00332 throw ( 00333 FederateInternalError); 00334 00335 virtual void removeObjectInstance ( 00336 ObjectInstanceHandle theObject, 00337 VariableLengthData const & theUserSuppliedTag, 00338 OrderType sentOrder, 00339 LogicalTime const & theTime, 00340 OrderType receivedOrder, 00341 MessageRetractionHandle theHandle, 00342 SupplementalRemoveInfo theRemoveInfo) 00343 throw ( 00344 FederateInternalError); 00345 00346 // 6.17 00347 virtual void attributesInScope ( 00348 ObjectInstanceHandle theObject, 00349 AttributeHandleSet const & theAttributes) 00350 throw ( 00351 FederateInternalError); 00352 00353 // 6.18 00354 virtual void attributesOutOfScope ( 00355 ObjectInstanceHandle theObject, 00356 AttributeHandleSet const & theAttributes) 00357 throw ( 00358 FederateInternalError); 00359 00360 // 6.20 00361 virtual void provideAttributeValueUpdate ( 00362 ObjectInstanceHandle theObject, 00363 AttributeHandleSet const & theAttributes, 00364 VariableLengthData const & theUserSuppliedTag) 00365 throw ( 00366 FederateInternalError); 00367 00368 // 6.21 00369 virtual void turnUpdatesOnForObjectInstance ( 00370 ObjectInstanceHandle theObject, 00371 AttributeHandleSet const & theAttributes) 00372 throw ( 00373 FederateInternalError); 00374 00375 virtual void turnUpdatesOnForObjectInstance ( 00376 ObjectInstanceHandle theObject, 00377 AttributeHandleSet const & theAttributes, 00378 std::wstring const & updateRateDesignator) 00379 throw ( 00380 FederateInternalError); 00381 00382 // 6.22 00383 virtual void turnUpdatesOffForObjectInstance ( 00384 ObjectInstanceHandle theObject, 00385 AttributeHandleSet const & theAttributes) 00386 throw ( 00387 FederateInternalError); 00388 00389 // 6.24 00390 virtual void confirmAttributeTransportationTypeChange ( 00391 ObjectInstanceHandle theObject, 00392 AttributeHandleSet theAttributes, 00393 TransportationType theTransportation) 00394 throw ( 00395 FederateInternalError); 00396 00397 // 6.26 00398 virtual void reportAttributeTransportationType ( 00399 ObjectInstanceHandle theObject, 00400 AttributeHandle theAttribute, 00401 TransportationType theTransportation) 00402 throw ( 00403 FederateInternalError); 00404 00405 // 6.28 00406 virtual void confirmInteractionTransportationTypeChange ( 00407 InteractionClassHandle theInteraction, 00408 TransportationType theTransportation) 00409 throw ( 00410 FederateInternalError); 00411 00412 // 6.30 00413 virtual void reportInteractionTransportationType ( 00414 FederateHandle federateHandle, 00415 InteractionClassHandle theInteraction, 00416 TransportationType theTransportation) 00417 throw ( 00418 FederateInternalError); 00419 00420 00422 // Ownership Management Services // 00424 00425 // 7.4 00426 virtual void requestAttributeOwnershipAssumption ( 00427 ObjectInstanceHandle theObject, 00428 AttributeHandleSet const & offeredAttributes, 00429 VariableLengthData const & theUserSuppliedTag) 00430 throw ( 00431 FederateInternalError); 00432 00433 // 7.5 00434 virtual void requestDivestitureConfirmation ( 00435 ObjectInstanceHandle theObject, 00436 AttributeHandleSet const & releasedAttributes) 00437 throw ( 00438 FederateInternalError); 00439 00440 // 7.7 00441 virtual void attributeOwnershipAcquisitionNotification ( 00442 ObjectInstanceHandle theObject, 00443 AttributeHandleSet const & securedAttributes, 00444 VariableLengthData const & theUserSuppliedTag) 00445 throw ( 00446 FederateInternalError); 00447 00448 // 7.10 00449 virtual void attributeOwnershipUnavailable ( 00450 ObjectInstanceHandle theObject, 00451 AttributeHandleSet const & theAttributes) 00452 throw ( 00453 FederateInternalError); 00454 00455 // 7.11 00456 virtual void requestAttributeOwnershipRelease ( 00457 ObjectInstanceHandle theObject, 00458 AttributeHandleSet const & candidateAttributes, 00459 VariableLengthData const & theUserSuppliedTag) 00460 throw ( 00461 FederateInternalError); 00462 00463 // 7.16 00464 virtual void confirmAttributeOwnershipAcquisitionCancellation ( 00465 ObjectInstanceHandle theObject, 00466 AttributeHandleSet const & theAttributes) 00467 throw ( 00468 FederateInternalError); 00469 00470 // 7.18 00471 virtual void informAttributeOwnership ( 00472 ObjectInstanceHandle theObject, 00473 AttributeHandle theAttribute, 00474 FederateHandle theOwner) 00475 throw ( 00476 FederateInternalError); 00477 00478 virtual void attributeIsNotOwned ( 00479 ObjectInstanceHandle theObject, 00480 AttributeHandle theAttribute) 00481 throw ( 00482 FederateInternalError); 00483 00484 virtual void attributeIsOwnedByRTI ( 00485 ObjectInstanceHandle theObject, 00486 AttributeHandle theAttribute) 00487 throw ( 00488 FederateInternalError); 00489 00491 // Time Management Services // 00493 00494 // 8.3 00495 virtual void timeRegulationEnabled ( 00496 LogicalTime const & theFederateTime) 00497 throw ( 00498 FederateInternalError); 00499 00500 // 8.6 00501 virtual void timeConstrainedEnabled ( 00502 LogicalTime const & theFederateTime) 00503 throw ( 00504 FederateInternalError); 00505 00506 // 8.13 00507 virtual void timeAdvanceGrant ( 00508 LogicalTime const & theTime) 00509 throw ( 00510 FederateInternalError); 00511 00512 // 8.22 00513 virtual void requestRetraction ( 00514 MessageRetractionHandle theHandle) 00515 throw ( 00516 FederateInternalError); 00517 00518 protected: 00519 00521 virtual std::auto_ptr<rti1516e::LogicalTime> copyTime( 00522 rti1516e::LogicalTime const& timeValue); 00523 00524 protected: 00525 00526 DtFederateMgr* myFedMgr; 00527 DtFedAmbMsgQueue myFedAmbQueue; 00528 bool myQueueCallback; 00529 const MAKRti::DtString myName; 00530 }; 00531 00532 #endif //! DtIFSPEC1516E 00533 #endif //! DtFedAmbCallbackQueue1516e_h