Issue 10493: Clarify contract between execution context and non-initialized components (rtc-ftf) Source: Real-Time Innovations (Mr. Rick Warren, rwarren@rti.com rick.warren@rti.com rick@rti.com) Nature: Uncategorized Issue Severity: Minor Summary: Source: RTI (Rick Warren, [[MailTo(rick DOT warren AT SPAMFREE rti DOT com)]]) Severity: Minor Disposition: Resolution Proposed Summary The behavior of various !ExecutionContext methods (start, stop, activate_component, deactivate_component) are not fully specified in the case where a component has either (a) never been initialized, or (b) been finalized. Discussion Resolution The behavior should be as follows: * A context should not be allowed to start until all of its components are initialized. A failure should be indicated with PRECONDITION_NOT_MET. * Before a component can be finalized, all contexts in which it participates must be stopped. A failure should be indicated with PRECONDITION_NOT_MET. * Attempting to activate or deactivate a component that is not initialized or has been finalized should fail with PRECONDITION_NOT_MET. The following sequence diagrams are examples (thanks, Sakamoto-san): [attachment:rtc-initialize-sequence.png] [[BR]] Initialize and start [attachment:rtc-finalize-sequence.png] [[BR]] Stop and Finalize -- RickWarren, 2006/12/1 Revised Text Resolution: The behavior should be as follows: · A context should not be allowed to start until all of its components are initialized. A failure should be indicated with PRECONDITION_NOT_MET. · Before a component can be finalized, it must be detached from all contexts in which it participates. A failure should be indicated with PRECONDITION_NOT_MET. · Attempting to activate or deactivate a component that is not initialized or has been finalized should fail with BAD_PARAMETER. Revised Text: · In section 7.2.2.3.2, finalize, there is a Constraint that begins "An RTC may not be finalized while it is Active in any Running execution context…." This constraint should be replaced with the following: An RTC may not be finalized while it is participating in any execution context. It must first be removed with ExecutionContextOperations::remove_component. Otherwise, this operation shall fail with ReturnCode_t::PRECONDITION_NOT_MET. See Figure <cross reference to Stop and Finalize>. · In section 7.2.2.6.2, start, add the following to the beginning of the Semantics subsection: An execution context may not be started until the RT components that participate in it have been initialized. Figure <number> - Initialize and Start · In section 7.2.2.6.2, start, an additional Constraint should be added with the following text: This operation shall fail with ReturnCode_t::PRECONDITION_NOT_MET if any of the participating components are not in their Alive state. · In section 7.2.2.6.3, stop, add the following to the beginning of the Semantics subsection: An execution context must be stopped before the RT components that participate in it are finalized. Figure <number> - Stop and Finalize · In section 7.2.2.6.6, activate_component, an additional Constraint should be added with the following text: This operation shall fail with ReturnCode_t::BAD_PARAMETER if the given component is not in its Alive state. · In section 7.2.2.6.7, deactivate_component, an additional Constraint should be added with the following text: This operation shall fail with ReturnCode_t::BAD_PARAMETER if the given component is not in its Alive state. Actions taken: December 5, 2006: received issue January 15, 2008: closed issue Discussion: End of Annotations:===== MG issue 10493: Clarify contract between execution context and non-initialized components Source: RTI (Rick Warren, [[MailTo(rick DOT warren AT SPAMFREE rti DOT com)]]) Severity: Minor Disposition: Resolution Proposed Summary The behavior of various !ExecutionContext methods (start, stop, activate_component, deactivate_component) are not fully specified in the case where a component has either (a) never been initialized, or (b) been finalized. Discussion Resolution The behavior should be as follows: * A context should not be allowed to start until all of its components are initialized. A failure should be indicated with PRECONDITION_NOT_MET. * Before a component can be finalized, all contexts in which it participates must be stopped. A failure should be indicated with PRECONDITION_NOT_MET. * Attempting to activate or deactivate a component that is not initialized or has been finalized should fail with PRECONDITION_NOT_MET. The following sequence diagrams are examples (thanks, Sakamoto-san): [attachment:rtc-initialize-sequence.png] [[BR]] Initialize and start [attachment:rtc-finalize-sequence.png] [[BR]] Stop and Finalize -- RickWarren, 2006/12/1 Revised Text