import"RTC.idl";
attach_context
Description
Inform this RTC that it is participating in the given execution context. Return a handle that represents the association of this RTC with the context.
Semantics
This operation is intended to be invoked by ExecutionContextOperations::add_component (see Section 5.2.2.6.6). It is not intended for use by other clients.
detach_context
Description
Inform this RTC that it is no longer participating in the given execution context.
Semantics
This operation is intended to be invoked by ExecutionContextOperations::remove_component (see Section 5.2.2.6.7). It is not intended for use by other clients.
Constraints
- This operation may not be invoked if this RTC is not already participating in the execution context. Such a call shall fail with ReturnCode_t::PRECONDITION_NOT_MET.
- This operation may not be invoked if this RTC is Active in the indicated execution context. Otherwise, it shall fail with ReturnCode_t::PRECONDITION_NOT_MET.
exit
Description
Stop the RTC’s execution context(s) and finalize it along with its contents.
Semantics
Any execution contexts for which the RTC is the owner shall be stopped. If the RTC participates in any execution contexts belonging to another RTC that contains it, directly or indirectly (i.e., the containing RTC is the owner of the ExecutionContext), it shall be deactivated in those contexts. After the RTC is no longer Active in any Running execution context, it and any RTCs contained transitively within it shall be finalized.
Constraints
An RTC cannot be exited if it has not yet been initialized. Any attempt to exit an RTC that is in the Created state shall fail with ReturnCode_t::PRECONDITION_NOT_MET.
finalize
Description
Finalize the RTC that realizes this interface, preparing it for destruction.
Semantics
This invocation of this operation shall result in the invocation of the callback ComponentAction::on_finalize
Constraints
- 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 5.9.
- An RTC may not be finalized while it is in the Created state. Any attempt to invoke this operation while in that state shall fail with ReturnCode_t::PRECONDITION_NOT_MET.
- Application developers are not expected to call this operation directly; it exists for use by the RTC infrastructure.
get_context
Description
Obtain a reference to the execution context represented by the given handle.
Semantics
The mapping from handle to context is specific to a particular RTC instance. The given handle must have been obtained by a previous call to attach_context on this RTC.
get_context_handle
Description
This operation returns a handle that is associated with the given execution context.
Mode RTC::ModeCapable::get_current_mode |
( |
| ) |
|
|
inherited |
get_current_mode
Description
This operation shall return the last mode to have stabilized. If no mode has been explicitly set, the current mode shall be the default mode.
Constraints
- This operation shall never return nil.
get_current_mode_in_context
Description
This operation returns the current mode of the component as seen by the indicated execution context.
Semantics
The manner in which this property changes is described in Figure 5.26.
Mode RTC::ModeCapable::get_default_mode |
( |
| ) |
|
|
inherited |
get_default_mode
Description
This operation shall return the mode in which the RTC shall be when no other mode has been set.
Constraints
- This operation shall not return nil.
get_owned_contexts
Description
This operation returns a list of all execution contexts owned by this RTC.
- get_participating_contexts
Description
This operation returns a list of all execution contexts in which this RTC participates.
Semantics
Each call to attach_context causes the provided context to be added to this list. Each call to detach_context causes the provided context to be removed from this list.
Mode RTC::ModeCapable::get_pending_mode |
( |
| ) |
|
|
inherited |
get_pending_mode
Description
This operation shall return the last mode to have been passed to set_mode that has not yet stabilized. Once the RTC’s mode has stabilized, this operation shall return nil.
get_pending_mode_in_context
Description
If the last mode to be requested by a call to set_mode is different than the current mode as seen by the indicated execution context (see get_current_mode_in_context), this operation returns the former. If the requested mode has already been seen in that context, it returns nil.
Semantics
See Figure 5.26 for a description of how the pending mode relates to the current mode within a given execution context.
initialize
Description
Initialize the RTC that realizes this interface.
Semantics
The invocation of this operation shall result in the invocation of the callback ComponentAction::on_initialize.
Constraints
- An RTC may be initialized only while it is in the Created state. Any attempt to invoke this operation while in another state shall fail with ReturnCode_t::PRECONDITION_NOT_MET.
- Application developers are not expected to call this operation directly; it exists for use by the RTC infrastructure.
is_alive
Description
A component is alive or not regardless of the execution context from which it is observed. However, whether or not it is Active, Inactive, or in Error is dependent on the execution context(s) (see Figure 5.7) in which it is running. That is, it may be Active in one context but Inactive in another. Therefore, this operation shall report whether this RTC is either Active, Inactive, or in Error; which of those states a component is in with respect to a particular context may be queried from the context itself.
on_aborting
Description
The RTC is transitioning from the Active state to the Error state in some execution context.
Semantics
This callback is invoked only a single time for time that the RTC transitions into the Error state from another state. This behavior is in contrast to that of on_error.
on_activated
Description
The RTC has been activated in the given execution context.
on_deactivated
Description
The RTC has been deactivated in the given execution context.
on_error
Description
The RTC remains in the Error state.
Semantics
If the RTC is in the Error state relative to some execution context when it would otherwise be invoked from that context (according to the context’s ExecutionKind), this callback shall be invoked instead. For example,
on_finalize
Description
The RTC is being destroyed.
Semantics
Any final RTC-specific tear-down logic should be performed here.
on_initialize
Description
The RTC has been initialized and entered the Alive state.
Semantics
Any RTC-specific initialization logic should be performed here.
on_mode_changed
Description
This callback is invoked each time the observed mode of a component has changed with respect to a particular execution context.
Semantics
If the context is PERIODIC, this callback shall come before the next call to on_execute (see Section 5.3.1.2.1) within that context. The new mode can be retrieved with get_current_mode_in_context. If the result is the same as the result of get_current_mode, the mode has stabilized.
on_reset
Description
The RTC is in the Error state. An attempt is being made to recover it such that it can return to the Inactive state.
Semantics
If the RTC was successfully recovered and can safely return to the Inactive state, this method shall complete with ReturnCode_t::OK. Any other result shall indicate that the RTC should remain in the Error state.
on_shutdown
Description
The given execution context, in which the RTC is participating, has transitioned from Running to Stopped.
on_startup
Description
The given execution context, in which the RTC is participating, has transitioned from Stopped to Running.
ReturnCode_t RTC::ModeCapable::set_mode |
( |
in Mode |
new_mode, |
|
|
in boolean |
immediate |
|
) |
| |
|
inherited |
set_mode
Description
This operation shall request that the RTC change to the indicated mode.
Semantics
Usually, the new mode will be pending in each execution context in which the component executes until the next sample period (if the execution kind is PERIODIC); at that point it will become the current mode in that context and there will no longer be a pending mode. However, in some cases it is important for a mode change to take place immediately; for example, a serious fault has occurred and the component must enter an emergency mode to ensure fail-safe behavior in a safety-critical system. In such a case, immediate should be true and the mode change will take place in all contexts without waiting for the next sample period.
The documentation for this interface was generated from the following file: