📄 rtia_federate.cc
字号:
case SET_TIME_CONSTRAINED: nb_requetes[41]++ ; D.Out(pdTrace, "Receiving Message from Federate, type SetTimeConstrained."); tm->setTimeConstrained(req->boolean, e); break ; // 8.15 case TICK_REQUEST: nb_requetes[42]++ ; D.Out(pdDebug, "Receiving Message from Federate, type TickRequest."); rep.boolean = tm->tick(e); break ; default: D.Out(pdExcept, "Receiving Message from Federate, Unknown Type %d.", req->type); throw RTIinternalError(); }}// ----------------------------------------------------------------------------//! RTIA processes a service request coming from federate.voidRTIA::processFederateRequest(Message *req){ Message rep ; rep.exception = e_NO_EXCEPTION ; rep.type = req->type ; try { chooseFederateProcessing(req, rep, rep.exception); } catch (ArrayIndexOutOfBounds &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_ArrayIndexOutOfBounds ; } catch (AttributeAlreadyOwned &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_AttributeAlreadyOwned ; } catch (AttributeAlreadyBeingDivested &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_AttributeAlreadyBeingDivested ; } catch (AttributeAlreadyBeingAcquired &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_AttributeAlreadyBeingAcquired ; } catch (AttributeAcquisitionWasNotRequested &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_AttributeAcquisitionWasNotRequested ; } catch (AttributeDivestitureWasNotRequested &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_AttributeDivestitureWasNotRequested ; } catch (AttributeNotDefined &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_AttributeNotDefined ; } catch (AttributeNotKnown &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_AttributeNotKnown ; } catch (AttributeNotOwned &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_AttributeNotOwned ; } catch (AttributeNotPublished &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_AttributeNotPublished ; } catch (AttributeNotSubscribed &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_AttributeNotSubscribed ; } catch (ConcurrentAccessAttempted &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_ConcurrentAccessAttempted ; } catch (CouldNotDiscover &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_CouldNotDiscover ; } catch (CouldNotOpenRID &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_CouldNotOpenRID ; } catch (CouldNotRestore &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_CouldNotRestore ; } catch (DeletePrivilegeNotHeld &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_DeletePrivilegeNotHeld ; } catch (ErrorReadingRID &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_ErrorReadingRID ; } catch (EventNotKnown &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_EventNotKnown ; } catch (FederateAlreadyPaused &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_FederateAlreadyPaused ; } catch (FederateAlreadyExecutionMember &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_FederateAlreadyExecutionMember ; } catch (FederateDoesNotExist &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_FederateDoesNotExist ; } catch (FederateInternalError &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_FederateInternalError ; } catch (FederateNameAlreadyInUse &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_FederateNameAlreadyInUse ; } catch (FederateNotExecutionMember &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_FederateNotExecutionMember ; } catch (FederateNotPaused &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_FederateNotPaused ; } catch (FederateNotPublishing &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_FederateNotPublishing ; } catch (FederateNotSubscribing &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_FederateNotSubscribing ; } catch (FederateOwnsAttributes &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_FederateOwnsAttributes ; } catch (FederatesCurrentlyJoined &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_FederatesCurrentlyJoined ; } catch (FederateWasNotAskedToReleaseAttribute &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_FederateWasNotAskedToReleaseAttribute ; } catch (FederationAlreadyPaused &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_FederationAlreadyPaused ; } catch (FederationExecutionAlreadyExists &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_FederationExecutionAlreadyExists ; } catch (FederationExecutionDoesNotExist &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_FederationExecutionDoesNotExist ; } catch (FederationNotPaused &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_FederationNotPaused ; } catch (FederationTimeAlreadyPassed &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_FederationTimeAlreadyPassed ; } catch (IDsupplyExhausted &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_IDsupplyExhausted ; } catch (InteractionClassNotDefined &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_InteractionClassNotDefined ; } catch (InteractionClassNotKnown &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_InteractionClassNotKnown ; } catch (InteractionClassNotPublished &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_InteractionClassNotPublished ; } catch (InteractionParameterNotDefined &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_InteractionParameterNotDefined ; } catch (InteractionParameterNotKnown &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_InteractionParameterNotKnown ; } catch (InvalidDivestitureCondition &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_InvalidDivestitureCondition ; } catch (InvalidExtents &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_InvalidExtents ; } catch (InvalidFederationTime &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_InvalidFederationTime ; } catch (InvalidFederationTimeDelta &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_InvalidFederationTimeDelta ; } catch (InvalidObjectHandle &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_InvalidObjectHandle ; } catch (InvalidOrderType &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_InvalidOrderType ; } catch (InvalidResignAction &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_InvalidResignAction ; } catch (InvalidRetractionHandle &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_InvalidRetractionHandle ; } catch (InvalidRoutingSpace &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_InvalidRoutingSpace ; } catch (InvalidTransportType &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_InvalidTransportType ; } catch (MemoryExhausted &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_MemoryExhausted ; } catch (NameNotFound &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_NameNotFound ; } catch (NoPauseRequested &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_NoPauseRequested ; } catch (NoResumeRequested &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_NoResumeRequested ; } catch (ObjectClassNotDefined &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_ObjectClassNotDefined ; } catch (ObjectClassNotKnown &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_ObjectClassNotKnown ; } catch (ObjectClassNotPublished &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_ObjectClassNotPublished ; } catch (ObjectClassNotSubscribed &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_ObjectClassNotSubscribed ; } catch (ObjectNotKnown &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_ObjectNotKnown ; } catch (ObjectAlreadyRegistered &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_ObjectAlreadyRegistered ; } catch (RegionNotKnown &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_RegionNotKnown ; } catch (RestoreInProgress &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_RestoreInProgress ; } catch (RestoreNotRequested &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_RestoreNotRequested ; } catch (RTIinternalError &e) { cout << "RTIA sends InternalError to Fed., " ; if (e._reason != NULL) cout << "reason : " << e._reason << endl ; else cout << "no reason given." << endl ; D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_RTIinternalError ; } catch (SpaceNotDefined &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_SpaceNotDefined ; } catch (SaveInProgress &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_SaveInProgress ; } catch (SaveNotInitiated &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_SaveNotInitiated ; } catch (SpecifiedSaveLabelDoesNotExist &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_SpecifiedSaveLabelDoesNotExist ; } catch (TimeAdvanceAlreadyInProgress &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_TimeAdvanceAlreadyInProgress ; } catch (TimeAdvanceWasNotInProgress &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_TimeAdvanceWasNotInProgress ; } catch (TooManyIDsRequested &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_TooManyIDsRequested ; } catch (UnableToPerformSave &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_UnableToPerformSave ; } catch (UnimplementedService &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_UnimplementedService ; } catch (UnknownLabel &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_UnknownLabel ; } catch (ValueCountExceeded &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_ValueCountExceeded ; } catch (ValueLengthExceeded &e) { D.Out(pdExcept, "Catched %s Exception.", e._name); rep.exception = e_ValueLengthExceeded ; } // Default Handler catch (Exception &e) { D.Out(pdExcept, "Unknown Exception : %s.", e._name); rep.exception = e_RTIinternalError ; } delete req ; comm->sendUN(&rep); D.Out(pdDebug, "Reply send to Unix socket.");}}} // namespace certi/rtia// $Id: RTIA_federate.cc,v 3.8 2003/03/21 15:06:46 breholee Exp $
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -