![]() |
MAK RTIspy API Documentation for HLA Evolved
|
00001 /*********************************************************************** 00002 IEEE 1516.1 High Level Architecture Interface Specification C++ API 00003 File: RTI/FederateAmbassador.h 00004 ***********************************************************************/ 00005 00006 // This is a pure abstract interface that must be implemented by the 00007 // federate to receive callbacks from the RTI. 00008 00009 #ifndef RTI_FederateAmbassador_h 00010 #define RTI_FederateAmbassador_h 00011 00012 namespace rti1516 00013 { 00014 class LogicalTime; 00015 } 00016 00017 #include <RTI/SpecificConfig.h> 00018 #include <RTI/Exception.h> 00019 #include <RTI/Typedefs.h> 00020 #include <RTI/Enums.h> 00021 00022 namespace rti1516 00023 { 00024 class RTI_EXPORT FederateAmbassador 00025 { 00026 protected: 00027 FederateAmbassador() 00028 throw (FederateInternalError); 00029 00030 public: 00031 virtual 00032 ~FederateAmbassador() 00033 throw (); 00034 00035 // 4.7 00036 virtual 00037 void 00038 synchronizationPointRegistrationSucceeded(std::wstring const & label) 00039 throw (FederateInternalError) = 0; 00040 00041 virtual 00042 void 00043 synchronizationPointRegistrationFailed(std::wstring const & label, 00044 SynchronizationFailureReason reason) 00045 throw (FederateInternalError) = 0; 00046 00047 // 4.8 00048 virtual 00049 void 00050 announceSynchronizationPoint(std::wstring const & label, 00051 VariableLengthData const & theUserSuppliedTag) 00052 throw (FederateInternalError) = 0; 00053 00054 // 4.10 00055 virtual 00056 void 00057 federationSynchronized(std::wstring const & label) 00058 throw (FederateInternalError) = 0; 00059 00060 // 4.12 00061 virtual 00062 void 00063 initiateFederateSave(std::wstring const & label) 00064 throw (UnableToPerformSave, 00065 FederateInternalError) = 0; 00066 00067 virtual 00068 void 00069 initiateFederateSave(std::wstring const & label, 00070 LogicalTime const & theTime) 00071 throw (UnableToPerformSave, 00072 InvalidLogicalTime, 00073 FederateInternalError) = 0; 00074 00075 // 4.15 00076 virtual 00077 void 00078 federationSaved() 00079 throw (FederateInternalError) = 0; 00080 00081 virtual 00082 void 00083 federationNotSaved(SaveFailureReason theSaveFailureReason) 00084 throw (FederateInternalError) = 0; 00085 00086 00087 // 4.17 00088 virtual 00089 void 00090 federationSaveStatusResponse( 00091 FederateHandleSaveStatusPairVector const & 00092 theFederateStatusVector) 00093 throw (FederateInternalError) = 0; 00094 00095 // 4.19 00096 virtual 00097 void 00098 requestFederationRestoreSucceeded(std::wstring const & label) 00099 throw (FederateInternalError) = 0; 00100 00101 virtual 00102 void 00103 requestFederationRestoreFailed(std::wstring const & label) 00104 throw (FederateInternalError) = 0; 00105 00106 // 4.20 00107 virtual 00108 void 00109 federationRestoreBegun() 00110 throw (FederateInternalError) = 0; 00111 00112 // 4.21 00113 virtual 00114 void 00115 initiateFederateRestore(std::wstring const & label, 00116 FederateHandle handle) 00117 throw (SpecifiedSaveLabelDoesNotExist, 00118 CouldNotInitiateRestore, 00119 FederateInternalError) = 0; 00120 00121 // 4.23 00122 virtual 00123 void 00124 federationRestored() 00125 throw (FederateInternalError) = 0; 00126 00127 virtual 00128 void 00129 federationNotRestored(RestoreFailureReason theRestoreFailureReason) 00130 throw (FederateInternalError) = 0; 00131 00132 // 4.25 00133 virtual 00134 void 00135 federationRestoreStatusResponse( 00136 FederateHandleRestoreStatusPairVector const & 00137 theFederateStatusVector) 00138 throw (FederateInternalError) = 0; 00139 00141 // Declaration Management Services // 00143 00144 // 5.10 00145 virtual 00146 void 00147 startRegistrationForObjectClass(ObjectClassHandle theClass) 00148 throw (ObjectClassNotPublished, 00149 FederateInternalError) = 0; 00150 00151 // 5.11 00152 virtual 00153 void 00154 stopRegistrationForObjectClass(ObjectClassHandle theClass) 00155 throw (ObjectClassNotPublished, 00156 FederateInternalError) = 0; 00157 00158 // 5.12 00159 virtual 00160 void 00161 turnInteractionsOn(InteractionClassHandle theHandle) 00162 throw (InteractionClassNotPublished, 00163 FederateInternalError) = 0; 00164 00165 // 5.13 00166 virtual 00167 void 00168 turnInteractionsOff(InteractionClassHandle theHandle) 00169 throw (InteractionClassNotPublished, 00170 FederateInternalError) = 0; 00171 00173 // Object Management Services // 00175 00176 // 6.3 00177 virtual 00178 void 00179 objectInstanceNameReservationSucceeded(std::wstring const & 00180 theObjectInstanceName) 00181 throw (UnknownName, 00182 FederateInternalError) = 0; 00183 00184 virtual 00185 void 00186 objectInstanceNameReservationFailed(std::wstring const & 00187 theObjectInstanceName) 00188 throw (UnknownName, 00189 FederateInternalError) = 0; 00190 00191 00192 // 6.5 00193 virtual 00194 void 00195 discoverObjectInstance(ObjectInstanceHandle theObject, 00196 ObjectClassHandle theObjectClass, 00197 std::wstring const & theObjectInstanceName) 00198 throw (CouldNotDiscover, 00199 ObjectClassNotKnown, 00200 FederateInternalError) = 0; 00201 00202 // 6.7 00203 virtual 00204 void 00205 reflectAttributeValues 00206 (ObjectInstanceHandle theObject, 00207 AttributeHandleValueMap const & theAttributeValues, 00208 VariableLengthData const & theUserSuppliedTag, 00209 OrderType sentOrder, 00210 TransportationType theType) 00211 throw (ObjectInstanceNotKnown, 00212 AttributeNotRecognized, 00213 AttributeNotSubscribed, 00214 FederateInternalError) = 0; 00215 00216 virtual 00217 void 00218 reflectAttributeValues 00219 (ObjectInstanceHandle theObject, 00220 AttributeHandleValueMap const & theAttributeValues, 00221 VariableLengthData const & theUserSuppliedTag, 00222 OrderType sentOrder, 00223 TransportationType theType, 00224 RegionHandleSet const & theSentRegionHandleSet) 00225 throw (ObjectInstanceNotKnown, 00226 AttributeNotRecognized, 00227 AttributeNotSubscribed, 00228 FederateInternalError) = 0; 00229 00230 virtual 00231 void 00232 reflectAttributeValues 00233 (ObjectInstanceHandle theObject, 00234 AttributeHandleValueMap const & theAttributeValues, 00235 VariableLengthData const & theUserSuppliedTag, 00236 OrderType sentOrder, 00237 TransportationType theType, 00238 LogicalTime const & theTime, 00239 OrderType receivedOrder) 00240 throw (ObjectInstanceNotKnown, 00241 AttributeNotRecognized, 00242 AttributeNotSubscribed, 00243 FederateInternalError) = 0; 00244 00245 virtual 00246 void 00247 reflectAttributeValues 00248 (ObjectInstanceHandle theObject, 00249 AttributeHandleValueMap const & theAttributeValues, 00250 VariableLengthData const & theUserSuppliedTag, 00251 OrderType sentOrder, 00252 TransportationType theType, 00253 LogicalTime const & theTime, 00254 OrderType receivedOrder, 00255 RegionHandleSet const & theSentRegionHandleSet) 00256 throw (ObjectInstanceNotKnown, 00257 AttributeNotRecognized, 00258 AttributeNotSubscribed, 00259 FederateInternalError) = 0; 00260 00261 virtual 00262 void 00263 reflectAttributeValues 00264 (ObjectInstanceHandle theObject, 00265 AttributeHandleValueMap const & theAttributeValues, 00266 VariableLengthData const & theUserSuppliedTag, 00267 OrderType sentOrder, 00268 TransportationType theType, 00269 LogicalTime const & theTime, 00270 OrderType receivedOrder, 00271 MessageRetractionHandle theHandle) 00272 throw (ObjectInstanceNotKnown, 00273 AttributeNotRecognized, 00274 AttributeNotSubscribed, 00275 InvalidLogicalTime, 00276 FederateInternalError) = 0; 00277 00278 virtual 00279 void 00280 reflectAttributeValues 00281 (ObjectInstanceHandle theObject, 00282 AttributeHandleValueMap const & theAttributeValues, 00283 VariableLengthData const & theUserSuppliedTag, 00284 OrderType sentOrder, 00285 TransportationType theType, 00286 LogicalTime const & theTime, 00287 OrderType receivedOrder, 00288 MessageRetractionHandle theHandle, 00289 RegionHandleSet const & theSentRegionHandleSet) 00290 throw (ObjectInstanceNotKnown, 00291 AttributeNotRecognized, 00292 AttributeNotSubscribed, 00293 InvalidLogicalTime, 00294 FederateInternalError) = 0; 00295 00296 // 6.9 00297 virtual 00298 void 00299 receiveInteraction 00300 (InteractionClassHandle theInteraction, 00301 ParameterHandleValueMap const & theParameterValues, 00302 VariableLengthData const & theUserSuppliedTag, 00303 OrderType sentOrder, 00304 TransportationType theType) 00305 throw (InteractionClassNotRecognized, 00306 InteractionParameterNotRecognized, 00307 InteractionClassNotSubscribed, 00308 FederateInternalError) = 0; 00309 00310 virtual 00311 void 00312 receiveInteraction 00313 (InteractionClassHandle theInteraction, 00314 ParameterHandleValueMap const & theParameterValues, 00315 VariableLengthData const & theUserSuppliedTag, 00316 OrderType sentOrder, 00317 TransportationType theType, 00318 RegionHandleSet const & theSentRegionHandleSet) 00319 throw (InteractionClassNotRecognized, 00320 InteractionParameterNotRecognized, 00321 InteractionClassNotSubscribed, 00322 FederateInternalError) = 0; 00323 00324 virtual 00325 void 00326 receiveInteraction 00327 (InteractionClassHandle theInteraction, 00328 ParameterHandleValueMap const & theParameterValues, 00329 VariableLengthData const & theUserSuppliedTag, 00330 OrderType sentOrder, 00331 TransportationType theType, 00332 LogicalTime const & theTime, 00333 OrderType receivedOrder) 00334 throw (InteractionClassNotRecognized, 00335 InteractionParameterNotRecognized, 00336 InteractionClassNotSubscribed, 00337 FederateInternalError) = 0; 00338 00339 virtual 00340 void 00341 receiveInteraction 00342 (InteractionClassHandle theInteraction, 00343 ParameterHandleValueMap const & theParameterValues, 00344 VariableLengthData const & theUserSuppliedTag, 00345 OrderType sentOrder, 00346 TransportationType theType, 00347 LogicalTime const & theTime, 00348 OrderType receivedOrder, 00349 RegionHandleSet const & theSentRegionHandleSet) 00350 throw (InteractionClassNotRecognized, 00351 InteractionParameterNotRecognized, 00352 InteractionClassNotSubscribed, 00353 FederateInternalError) = 0; 00354 00355 virtual 00356 void 00357 receiveInteraction 00358 (InteractionClassHandle theInteraction, 00359 ParameterHandleValueMap const & theParameterValues, 00360 VariableLengthData const & theUserSuppliedTag, 00361 OrderType sentOrder, 00362 TransportationType theType, 00363 LogicalTime const & theTime, 00364 OrderType receivedOrder, 00365 MessageRetractionHandle theHandle) 00366 throw (InteractionClassNotRecognized, 00367 InteractionParameterNotRecognized, 00368 InteractionClassNotSubscribed, 00369 InvalidLogicalTime, 00370 FederateInternalError) = 0; 00371 00372 virtual 00373 void 00374 receiveInteraction 00375 (InteractionClassHandle theInteraction, 00376 ParameterHandleValueMap const & theParameterValues, 00377 VariableLengthData const & theUserSuppliedTag, 00378 OrderType sentOrder, 00379 TransportationType theType, 00380 LogicalTime const & theTime, 00381 OrderType receivedOrder, 00382 MessageRetractionHandle theHandle, 00383 RegionHandleSet const & theSentRegionHandleSet) 00384 throw (InteractionClassNotRecognized, 00385 InteractionParameterNotRecognized, 00386 InteractionClassNotSubscribed, 00387 InvalidLogicalTime, 00388 FederateInternalError) = 0; 00389 00390 // 6.11 00391 virtual 00392 void 00393 removeObjectInstance(ObjectInstanceHandle theObject, 00394 VariableLengthData const & theUserSuppliedTag, 00395 OrderType sentOrder) 00396 throw (ObjectInstanceNotKnown, 00397 FederateInternalError) = 0; 00398 00399 virtual 00400 void 00401 removeObjectInstance(ObjectInstanceHandle theObject, 00402 VariableLengthData const & theUserSuppliedTag, 00403 OrderType sentOrder, 00404 LogicalTime const & theTime, 00405 OrderType receivedOrder) 00406 throw (ObjectInstanceNotKnown, 00407 FederateInternalError) = 0; 00408 00409 virtual 00410 void 00411 removeObjectInstance(ObjectInstanceHandle theObject, 00412 VariableLengthData const & theUserSuppliedTag, 00413 OrderType sentOrder, 00414 LogicalTime const & theTime, 00415 OrderType receivedOrder, 00416 MessageRetractionHandle theHandle) 00417 throw (ObjectInstanceNotKnown, 00418 InvalidLogicalTime, 00419 FederateInternalError) = 0; 00420 00421 // 6.15 00422 virtual 00423 void 00424 attributesInScope 00425 (ObjectInstanceHandle theObject, 00426 AttributeHandleSet const & theAttributes) 00427 throw (ObjectInstanceNotKnown, 00428 AttributeNotRecognized, 00429 AttributeNotSubscribed, 00430 FederateInternalError) = 0; 00431 00432 // 6.16 00433 virtual 00434 void 00435 attributesOutOfScope 00436 (ObjectInstanceHandle theObject, 00437 AttributeHandleSet const & theAttributes) 00438 throw (ObjectInstanceNotKnown, 00439 AttributeNotRecognized, 00440 AttributeNotSubscribed, 00441 FederateInternalError) = 0; 00442 00443 // 6.18 00444 virtual 00445 void 00446 provideAttributeValueUpdate 00447 (ObjectInstanceHandle theObject, 00448 AttributeHandleSet const & theAttributes, 00449 VariableLengthData const & theUserSuppliedTag) 00450 throw (ObjectInstanceNotKnown, 00451 AttributeNotRecognized, 00452 AttributeNotOwned, 00453 FederateInternalError) = 0; 00454 00455 // 6.19 00456 virtual 00457 void 00458 turnUpdatesOnForObjectInstance 00459 (ObjectInstanceHandle theObject, 00460 AttributeHandleSet const & theAttributes) 00461 throw (ObjectInstanceNotKnown, 00462 AttributeNotRecognized, 00463 AttributeNotOwned, 00464 FederateInternalError) = 0; 00465 00466 // 6.20 00467 virtual 00468 void 00469 turnUpdatesOffForObjectInstance 00470 (ObjectInstanceHandle theObject, 00471 AttributeHandleSet const & theAttributes) 00472 throw (ObjectInstanceNotKnown, 00473 AttributeNotRecognized, 00474 AttributeNotOwned, 00475 FederateInternalError) = 0; 00476 00478 // Ownership Management Services // 00480 00481 // 7.4 00482 virtual 00483 void 00484 requestAttributeOwnershipAssumption 00485 (ObjectInstanceHandle theObject, 00486 AttributeHandleSet const & offeredAttributes, 00487 VariableLengthData const & theUserSuppliedTag) 00488 throw (ObjectInstanceNotKnown, 00489 AttributeNotRecognized, 00490 AttributeAlreadyOwned, 00491 AttributeNotPublished, 00492 FederateInternalError) = 0; 00493 00494 // 7.5 00495 virtual 00496 void 00497 requestDivestitureConfirmation 00498 (ObjectInstanceHandle theObject, 00499 AttributeHandleSet const & releasedAttributes) 00500 throw (ObjectInstanceNotKnown, 00501 AttributeNotRecognized, 00502 AttributeNotOwned, 00503 AttributeDivestitureWasNotRequested, 00504 FederateInternalError) = 0; 00505 00506 // 7.7 00507 virtual 00508 void 00509 attributeOwnershipAcquisitionNotification 00510 (ObjectInstanceHandle theObject, 00511 AttributeHandleSet const & securedAttributes, 00512 VariableLengthData const & theUserSuppliedTag) 00513 throw (ObjectInstanceNotKnown, 00514 AttributeNotRecognized, 00515 AttributeAcquisitionWasNotRequested, 00516 AttributeAlreadyOwned, 00517 AttributeNotPublished, 00518 FederateInternalError) = 0; 00519 00520 // 7.10 00521 virtual 00522 void 00523 attributeOwnershipUnavailable 00524 (ObjectInstanceHandle theObject, 00525 AttributeHandleSet const & theAttributes) 00526 throw (ObjectInstanceNotKnown, 00527 AttributeNotRecognized, 00528 AttributeAlreadyOwned, 00529 AttributeAcquisitionWasNotRequested, 00530 FederateInternalError) = 0; 00531 00532 // 7.11 00533 virtual 00534 void 00535 requestAttributeOwnershipRelease 00536 (ObjectInstanceHandle theObject, 00537 AttributeHandleSet const & candidateAttributes, 00538 VariableLengthData const & theUserSuppliedTag) 00539 throw (ObjectInstanceNotKnown, 00540 AttributeNotRecognized, 00541 AttributeNotOwned, 00542 FederateInternalError) = 0; 00543 00544 // 7.15 00545 virtual 00546 void 00547 confirmAttributeOwnershipAcquisitionCancellation 00548 (ObjectInstanceHandle theObject, 00549 AttributeHandleSet const & theAttributes) 00550 throw (ObjectInstanceNotKnown, 00551 AttributeNotRecognized, 00552 AttributeAlreadyOwned, 00553 AttributeAcquisitionWasNotCanceled, 00554 FederateInternalError) = 0; 00555 00556 // 7.17 00557 virtual 00558 void 00559 informAttributeOwnership(ObjectInstanceHandle theObject, 00560 AttributeHandle theAttribute, 00561 FederateHandle theOwner) 00562 throw (ObjectInstanceNotKnown, 00563 AttributeNotRecognized, 00564 FederateInternalError) = 0; 00565 00566 virtual 00567 void 00568 attributeIsNotOwned(ObjectInstanceHandle theObject, 00569 AttributeHandle theAttribute) 00570 throw (ObjectInstanceNotKnown, 00571 AttributeNotRecognized, 00572 FederateInternalError) = 0; 00573 00574 virtual 00575 void 00576 attributeIsOwnedByRTI(ObjectInstanceHandle theObject, 00577 AttributeHandle theAttribute) 00578 throw (ObjectInstanceNotKnown, 00579 AttributeNotRecognized, 00580 FederateInternalError) = 0; 00581 00583 // Time Management Services // 00585 00586 // 8.3 00587 virtual 00588 void 00589 timeRegulationEnabled(LogicalTime const & theFederateTime) 00590 throw (InvalidLogicalTime, 00591 NoRequestToEnableTimeRegulationWasPending, 00592 FederateInternalError) = 0; 00593 00594 // 8.6 00595 virtual 00596 void 00597 timeConstrainedEnabled(LogicalTime const & theFederateTime) 00598 throw (InvalidLogicalTime, 00599 NoRequestToEnableTimeConstrainedWasPending, 00600 FederateInternalError) = 0; 00601 00602 // 8.13 00603 virtual 00604 void 00605 timeAdvanceGrant(LogicalTime const & theTime) 00606 throw (InvalidLogicalTime, 00607 JoinedFederateIsNotInTimeAdvancingState, 00608 FederateInternalError) = 0; 00609 00610 // 8.22 00611 virtual 00612 void 00613 requestRetraction(MessageRetractionHandle theHandle) 00614 throw (FederateInternalError) = 0; 00615 }; 00616 } 00617 00618 #endif // RTI_FederateAmbassador_h