RTC::ModeCapable Interface Reference

ModeCapable. More...

import "RTC.idl";

Inheritance diagram for RTC::ModeCapable:
RTC::MultiModeObject

List of all members.

Public Member Functions

Mode get_default_mode ()
 get_default_mode
Mode get_current_mode ()
 get_current_mode
Mode get_current_mode_in_context (in ExecutionContext exec_context)
 get_current_mode_in_context
Mode get_pending_mode ()
 get_pending_mode
Mode get_pending_mode_in_context (in ExecutionContext exec_context)
 get_pending_mode_in_context
ReturnCode_t set_mode (in Mode new_mode, in boolean immediate)
 set_mode

Detailed Description

ModeCapable.

Description

The ModeCapable interface provides access to an object’s modes and a means to set the current mode.

Semantics

A given RTC may support multiple modes as well as multiple execution contexts. In such a case, a request for a mode change (e.g., from "cruise control on" to "cruise control off") may come asynchronously with respect to one or more of those execution contexts. The mode of an RTC may therefore be observed to be different from one execution context to another. - A mode is pending in a given execution context when a mode change has been requested but the new mode has not yet been observed by that context.

Figure 5.26 depicts a state machine that describes mode changes. Each parallel region in the composite state Mode Pending represents an execution context. The trigger "sample" within that state is considered to have occurred: - …just before the next call to on_execute (see Section 5.3.1.2.1) in the case where immediate is false and the execution kind is PERIODIC, …


Member Function Documentation

Mode RTC::ModeCapable::get_current_mode (  ) 

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.
Mode RTC::ModeCapable::get_current_mode_in_context ( in ExecutionContext  exec_context  ) 

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 (  ) 

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.
Mode RTC::ModeCapable::get_pending_mode (  ) 

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.

Mode RTC::ModeCapable::get_pending_mode_in_context ( in ExecutionContext  exec_context  ) 

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.

ReturnCode_t RTC::ModeCapable::set_mode ( in Mode  new_mode,
in boolean  immediate 
)

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:
Generated on Fri Oct 28 18:31:20 2016 for OpenRTM-aist IDL by  doxygen 1.6.3