RTC.idl

Go to the documentation of this file.
00001 // RTC.idl
00002 
00003 #include "SDOPackage.idl"
00004 
00005 #pragma prefix "omg.org"
00006 
00007 #define EXECUTION_HANDLE_TYPE_NATIVE long
00008 
00009 module RTC
00010 {
00028   typedef EXECUTION_HANDLE_TYPE_NATIVE ExecutionContextHandle_t;
00029 
00030   typedef SDOPackage::UniqueIdentifier UniqueIdentifier;
00031   typedef SDOPackage::NVList NVList;
00032   
00079   enum ReturnCode_t
00080   {
00081     RTC_OK,
00082     RTC_ERROR,
00083     BAD_PARAMETER,
00084     UNSUPPORTED,
00085     OUT_OF_RESOURCES,
00086     PRECONDITION_NOT_MET
00087   };
00088 
00100   enum LifeCycleState
00101   {
00113     CREATED_STATE,
00114 
00135     INACTIVE_STATE,
00136 
00156     ACTIVE_STATE,
00157 
00172     ERROR_STATE
00173   };
00174   
00175   interface ExecutionContext;
00176   typedef sequence<ExecutionContext> ExecutionContextList;
00177 
00201   interface ComponentAction
00202   {
00219     ReturnCode_t on_initialize();
00220 
00237     ReturnCode_t on_finalize();
00238 
00252     ReturnCode_t on_startup(in ExecutionContextHandle_t exec_handle);
00253 
00267     ReturnCode_t on_shutdown(in ExecutionContextHandle_t exec_handle);
00268 
00281     ReturnCode_t on_activated(in ExecutionContextHandle_t exec_handle);
00282 
00295     ReturnCode_t on_deactivated(in ExecutionContextHandle_t exec_handle);
00296 
00316     ReturnCode_t on_aborting(in ExecutionContextHandle_t exec_handle);
00317 
00345     ReturnCode_t on_error(in ExecutionContextHandle_t exec_handle);
00346 
00367     ReturnCode_t on_reset(in ExecutionContextHandle_t exec_handle);
00368   };
00369   
00440   interface LightweightRTObject
00441     : ComponentAction
00442   {
00466     ReturnCode_t initialize();
00467 
00501     ReturnCode_t finalize();
00502 
00524     boolean is_alive(in ExecutionContext exec_context);
00525 
00556     ReturnCode_t exit();
00557 
00578     ExecutionContextHandle_t attach_context(in ExecutionContext exec_context);
00579 
00608     ReturnCode_t detach_context(in ExecutionContextHandle_t exec_handle);
00609 
00629     ExecutionContext get_context(in ExecutionContextHandle_t exec_handle);
00630 
00649     ExecutionContextList get_owned_contexts();
00650 
00681     ExecutionContextList get_participating_contexts();
00682     
00699     ExecutionContextHandle_t get_context_handle(in ExecutionContext cxt);
00700   };
00701   
00716   enum ExecutionKind
00717   {
00732     PERIODIC,
00747     EVENT_DRIVEN,
00762     OTHER
00763   };
00764   
00831   interface ExecutionContext
00832   {
00833     
00852     boolean is_running();
00853     
00886     ReturnCode_t start();
00887     
00915     ReturnCode_t stop();
00916     
00944     double get_rate();
00945     
00979     ReturnCode_t set_rate(in double rate);
00980     
01012     ReturnCode_t add_component(in LightweightRTObject comp);
01013     
01043     ReturnCode_t remove_component(in LightweightRTObject comp);
01044     
01084     ReturnCode_t activate_component(in LightweightRTObject comp);
01085     
01119     ReturnCode_t deactivate_component(in LightweightRTObject comp);
01120     
01155     ReturnCode_t reset_component(in LightweightRTObject comp);
01156     
01179     LifeCycleState get_component_state(in LightweightRTObject comp);
01180     
01194     ExecutionKind get_kind();
01195   };
01196   
01197   
01213   interface DataFlowComponentAction
01214   {
01240     ReturnCode_t on_execute(in ExecutionContextHandle_t exec_handle);
01267     ReturnCode_t on_state_update(in ExecutionContextHandle_t exec_handle);
01286     ReturnCode_t on_rate_changed(in ExecutionContextHandle_t exec_handle);
01287   };
01288   
01314   interface DataFlowComponent
01315     : LightweightRTObject, DataFlowComponentAction
01316   {
01317   };
01318   
01340   interface Fsm
01341     : LightweightRTObject
01342   {
01343   };
01344   
01360   interface FsmParticipantAction
01361   {
01362     
01381     ReturnCode_t on_action(in ExecutionContextHandle_t exec_handle);
01382   };
01383   
01391   interface FsmParticipant
01392     : LightweightRTObject, FsmParticipantAction
01393   {
01394   };
01395   
01409   interface Mode
01410   {
01411   };
01412   
01455   interface ModeCapable
01456   {
01474     Mode get_default_mode();
01493     Mode get_current_mode();
01511     Mode get_current_mode_in_context(in ExecutionContext exec_context);
01526     Mode get_pending_mode();
01548     Mode get_pending_mode_in_context(in ExecutionContext exec_context);
01575     ReturnCode_t set_mode(in Mode new_mode,
01576                           in boolean immediate);
01577   };
01578   
01590   interface MultiModeComponentAction
01591   {
01614     ReturnCode_t on_mode_changed(in ExecutionContextHandle_t exec_handle);
01615   };
01616   
01624   interface MultiModeObject
01625     : LightweightRTObject, ModeCapable, MultiModeComponentAction
01626   {
01627   };
01628   
01629   interface RTObject;
01630   
01642   enum PortInterfacePolarity
01643   {
01657     PROVIDED,
01670     REQUIRED
01671   };
01672   
01688   struct PortInterfaceProfile
01689   {
01702     string instance_name;
01715     string type_name;
01729     PortInterfacePolarity polarity;
01730   };
01731   
01732   typedef sequence<PortInterfaceProfile> PortInterfaceProfileList;
01733   
01734   interface PortService;
01735   typedef sequence<PortService> PortServiceList;
01736   typedef sequence<RTObject> RTCList;
01737   
01751   struct ConnectorProfile
01752   {
01765     string name;
01780     UniqueIdentifier connector_id;
01794     PortServiceList ports;
01813     NVList properties;
01814   };
01815   
01816   typedef sequence<ConnectorProfile> ConnectorProfileList;
01817   
01833   struct PortProfile
01834   {
01853     string name;
01867     PortInterfaceProfileList interfaces;
01880     PortService port_ref;
01894     ConnectorProfileList connector_profiles;
01907     RTObject owner;
01926     NVList properties;
01927   };
01928   
01929   typedef sequence<PortProfile> PortProfileList;
01930   
01938   struct ExecutionContextProfile
01939   {
01952     ExecutionKind kind;
01972     double rate;
01985     RTObject owner;
01998     RTCList participants;
02018     NVList properties;
02019   };
02020   
02021   typedef sequence<ExecutionContextProfile>
02022   ExecutionContextProfileList;
02023   
02037   interface FsmObject
02038   {
02073     ReturnCode_t send_stimulus(in string message,
02074                                in ExecutionContextHandle_t exec_handle);
02075   };
02076   
02096   struct FsmBehaviorProfile
02097   {
02112     FsmParticipantAction action_component;
02125     UniqueIdentifier id;
02126   };
02127   
02128   typedef sequence<FsmBehaviorProfile> FsmBehaviorProfileList;
02143   struct FsmProfile
02144   {
02158     FsmBehaviorProfileList behavior_profiles;
02159   };
02160   
02174   interface FsmService
02175     : SDOPackage::SDOService
02176   {
02195     FsmProfile get_fsm_profile();
02209     ReturnCode_t set_fsm_profile(in FsmProfile fsm_profile);
02210   };
02211   
02225   struct ComponentProfile
02226   {
02244     string instance_name;
02262     string type_name;
02276     string description;
02295     string version;
02309     string vendor;
02324     string category;
02344     PortProfileList port_profiles;
02359     RTObject parent;
02378     NVList properties;
02379   };
02380   
02381   typedef sequence<ComponentProfile> ComponentProfileList;
02382   
02410   interface PortService
02411     : SDOPackage::SDOService
02412   {
02425     PortProfile get_port_profile();
02439     ConnectorProfileList get_connector_profiles();
02453     ConnectorProfile get_connector_profile(in UniqueIdentifier connector_id);
02476     ReturnCode_t connect(inout ConnectorProfile connector_profile);
02498     ReturnCode_t disconnect(in UniqueIdentifier connector_id);
02512     ReturnCode_t disconnect_all();
02537     ReturnCode_t notify_connect(inout ConnectorProfile connector_profile);
02562     ReturnCode_t notify_disconnect(in UniqueIdentifier connector_id);
02563   };
02564   
02583   interface ExecutionContextService
02584     : ExecutionContext, SDOPackage::SDOService
02585   {
02599     ExecutionContextProfile get_profile();
02600   };
02601   
02602   typedef sequence<ExecutionContextService>
02603   ExecutionContextServiceList;
02604   
02618   interface RTObject
02619     : LightweightRTObject, SDOPackage::SDO
02620   {
02633     ComponentProfile get_component_profile();
02646     PortServiceList get_ports();
02647   };
02648 };
02649 

Generated on Sun May 24 14:09:07 2009 for OpenRTM by  doxygen 1.5.3