📄 federationslist.cc
字号:
RTIinternalError){ Federation *federation = NULL ; // It may throw RTIinternalError. checkHandle(handle); // It may throw FederationExecutionDoesNotExist searchFederation(handle, federation); // It may throw FederateOwnsAttributes or FederateNotExecutionMember federation->remove(federate);}// ----------------------------------------------------------------------------// removeRegulatorvoidFederationsList::removeRegulator(FederationHandle handle, FederateHandle federate) throw (FederationExecutionDoesNotExist, FederateNotExecutionMember, SaveInProgress, RestoreInProgress, RTIinternalError){ Federation *federation = NULL ; // It may throw RTIinternalError. checkHandle(handle); checkHandle(federate); // It may throw FederationExecutionDoesNotExist. searchFederation(handle, federation); federation->removeRegulator(federate);}// ----------------------------------------------------------------------------/*! This Method tries to remove all references to this Federate in the Federation. To be used when a Federate is supposed to have crashed.*/voidFederationsList::killFederate(FederationHandle handle, FederateHandle federate) throw (){ Federation *federation = NULL ; try { // It may throw RTIinternalError. checkHandle(handle); checkHandle(federate); // It may throw FederationExecutionDoesNotExist. searchFederation(handle, federation); federation->kill(federate); } catch (Exception &e) { return ; }}// ----------------------------------------------------------------------------// isOwnerboolFederationsList::isOwner(FederationHandle handle, FederateHandle federate, ObjectHandle id, AttributeHandle attribute) throw (FederateNotExecutionMember, ObjectNotKnown, AttributeNotDefined, SaveInProgress, RestoreInProgress, RTIinternalError){ Federation *f = NULL ; // It may throw FederationExecutionDoesNotExist. searchFederation(handle, f); // It may throw RTIinternalError. checkHandle(handle); checkHandle(federate); D.Out(pdDebug, "Owner of Attribute %u of Object %u .", attribute, id); return(f->isOwner(federate, id, attribute));}// ----------------------------------------------------------------------------// searchOwnervoidFederationsList::searchOwner(FederationHandle handle, FederateHandle federate, ObjectHandle id, AttributeHandle attribute) throw (FederateNotExecutionMember, ObjectNotKnown, AttributeNotDefined, SaveInProgress, RestoreInProgress, RTIinternalError){ Federation *federation = NULL ; // It may throw FederationExecutionDoesNotExist. searchFederation(handle, federation); // It may throw RTIinternalError. checkHandle(handle); checkHandle(federate); D.Out(pdDebug, "Owner of Attribute %u of Object %u .", attribute, id); federation->queryAttributeOwnership(federate, id, attribute);}// ----------------------------------------------------------------------------// negotiateDivestiturevoidFederationsList::negotiateDivestiture(FederationHandle handle, FederateHandle federate, ObjectHandle id, AttributeHandle *attributes, UShort list_size, const char *tag) throw (FederateNotExecutionMember, ObjectNotKnown, AttributeNotDefined, AttributeNotOwned, AttributeAlreadyBeingDivested, SaveInProgress, RestoreInProgress, RTIinternalError){ Federation *federation = NULL ; // It may throw FederationExecutionDoesNotExist. searchFederation(handle, federation); // It may throw RTIinternalError. checkHandle(handle); checkHandle(federate); D.Out(pdDebug, "NegotiatedAttributeOwnershipDivestiture of Object %u.", id); federation->negotiateDivestiture(federate, id, attributes, list_size, tag);}// ----------------------------------------------------------------------------// acquireIfAvailablevoidFederationsList::acquireIfAvailable(FederationHandle handle, FederateHandle federate, ObjectHandle id, AttributeHandle *attributes, UShort list_size) throw (ObjectNotKnown, ObjectClassNotPublished, AttributeNotDefined, AttributeNotPublished, FederateOwnsAttributes, AttributeAlreadyBeingAcquired, FederateNotExecutionMember, SaveInProgress, RestoreInProgress, RTIinternalError){ Federation *federation = NULL ; // It may throw FederationExecutionDoesNotExist. searchFederation(handle, federation); // It may throw RTIinternalError. checkHandle(handle); checkHandle(federate); federation->acquireIfAvailable(federate, id, attributes, list_size);}// ----------------------------------------------------------------------------// divestvoidFederationsList::divest(FederationHandle handle, FederateHandle federate, ObjectHandle id, AttributeHandle *attributes, UShort list_size) throw (ObjectNotKnown, AttributeNotDefined, AttributeNotOwned, FederateNotExecutionMember, SaveInProgress, RestoreInProgress, RTIinternalError){ Federation *federation = NULL ; // It may throw FederationExecutionDoesNotExist. searchFederation(handle, federation); // It may throw RTIinternalError. checkHandle(handle); checkHandle(federate); federation->divest(federate, id, attributes, list_size);}// ----------------------------------------------------------------------------// acquirevoidFederationsList::acquire(FederationHandle handle, FederateHandle federate, ObjectHandle id, AttributeHandle *attributes, UShort list_size, const char *tag) throw (ObjectNotKnown, ObjectClassNotPublished, AttributeNotDefined, AttributeNotPublished, FederateOwnsAttributes, FederateNotExecutionMember, SaveInProgress, RestoreInProgress, RTIinternalError){ Federation *federation = NULL ; // It may throw FederationExecutionDoesNotExist. searchFederation(handle, federation); // It may throw RTIinternalError. checkHandle(handle); checkHandle(federate); D.Out(pdDebug, "attributeOwnershipAcquisition of Object %u .", id); federation->acquire(federate, id, attributes, list_size, tag);}// ----------------------------------------------------------------------------// cancelNegotiatedAttributeOwnershipDivestiturevoidFederationsList::cancelDivestiture(FederationHandle handle, FederateHandle federate, ObjectHandle id, AttributeHandle *attributes, UShort list_size) throw (ObjectNotKnown, AttributeNotDefined, AttributeNotOwned, AttributeDivestitureWasNotRequested, FederateNotExecutionMember, SaveInProgress, RestoreInProgress, RTIinternalError){ Federation *federation = NULL ; // It may throw FederationExecutionDoesNotExist. searchFederation(handle, federation); // It may throw RTIinternalError. checkHandle(handle); checkHandle(federate); D.Out(pdDebug, "cancelNegotiatedAttributeOwnershipDivestiture of Object %u .", id); federation->cancelDivestiture(federate, id, attributes, list_size);}// ----------------------------------------------------------------------------// respondReleaseAttributeHandleSet*FederationsList::respondRelease(FederationHandle handle, FederateHandle federate, ObjectHandle id, AttributeHandle *attributes, UShort list_size) throw (ObjectNotKnown, AttributeNotDefined, AttributeNotOwned, FederateWasNotAskedToReleaseAttribute, FederateNotExecutionMember, SaveInProgress, RestoreInProgress, RTIinternalError){ Federation *federation = NULL ; // It may throw FederationExecutionDoesNotExist. searchFederation(handle, federation); // It may throw RTIinternalError. checkHandle(handle); checkHandle(federate); D.Out(pdDebug, "AttributeOwnershipRealeaseResponse of Object %u .", id); return federation->respondRelease(federate, id, attributes, list_size);}// ----------------------------------------------------------------------------// cancelAcquisitionvoidFederationsList::cancelAcquisition(FederationHandle handle, FederateHandle federate, ObjectHandle id, AttributeHandle *attributes, UShort list_size) throw (ObjectNotKnown, AttributeNotDefined, AttributeAlreadyOwned, AttributeAcquisitionWasNotRequested, FederateNotExecutionMember, SaveInProgress, RestoreInProgress, RTIinternalError){ Federation *federation = NULL ; // It may throw FederationExecutionDoesNotExist. searchFederation(handle, federation); // It may throw RTIinternalError. checkHandle(handle); checkHandle(federate); D.Out(pdDebug, "cancelAttributeOwnershipAcquisition of Object %u .", id); federation->cancelAcquisition(federate, id, attributes, list_size);}}}// EOF $Id: FederationsList.cc,v 3.9 2003/03/21 15:06:46 breholee Exp $
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -