00001
00002 #include "SDOPackage.idl"
00003
00004 #pragma prefix "omg.org"
00005
00006 #define UNIQUE_ID_TYPE_NATIVE long
00007
00008 module RTC
00009 {
00010 typedef SDOPackage::UniqueIdentifier UniqueIdentifier;
00011 typedef SDOPackage::NVList NVList;
00012 typedef UNIQUE_ID_TYPE_NATIVE UniqueId;
00013
00017 enum ReturnCode_t
00018 {
00019 RTC_OK,
00020 RTC_ERROR,
00021 BAD_PARAMETER,
00022 UNSUPPORTED,
00023 OUT_OF_RESOURCES,
00024 PRECONDITION_NOT_MET
00025 };
00026
00030 enum LifeCycleState
00031 {
00032 INACTIVE_STATE,
00033 ACTIVE_STATE,
00034 ERROR_STATE,
00035 UNKNOWN_STATE
00036 };
00037
00041 interface ExecutionContext;
00042 typedef sequence<ExecutionContext> ExecutionContextList;
00043
00047 interface ComponentAction
00048 {
00049 UniqueId attach_executioncontext(in ExecutionContext exec_context);
00050 ReturnCode_t detach_executioncontext(in UniqueId ec_id);
00051 ReturnCode_t on_initialize();
00052 ReturnCode_t on_finalize();
00053 ReturnCode_t on_startup(in UniqueId ec_id);
00054 ReturnCode_t on_shutdown(in UniqueId ec_id);
00055 ReturnCode_t on_activated(in UniqueId ec_id);
00056 ReturnCode_t on_deactivated(in UniqueId ec_id);
00057 ReturnCode_t on_aborting(in UniqueId ec_id);
00058 ReturnCode_t on_error(in UniqueId ec_id);
00059 ReturnCode_t on_reset(in UniqueId ec_id);
00060 };
00061
00065 interface LightweightRTObject : ComponentAction
00066 {
00067 ReturnCode_t initialize();
00068 ReturnCode_t finalize();
00069 ReturnCode_t exit();
00070 boolean is_alive();
00071 ExecutionContextList get_contexts();
00072 ExecutionContext get_context(in UniqueId ec_id);
00073 };
00074
00078 enum ExecutionKind
00079 {
00080 PERIODIC,
00081 EVENT_DRIVEN,
00082 OTHER
00083 };
00084
00088 interface ExecutionContext
00089 {
00090 boolean is_running();
00091 ReturnCode_t start();
00092 ReturnCode_t stop();
00093 double get_rate();
00094 ReturnCode_t set_rate(in double rate);
00095 ReturnCode_t activate_component(in LightweightRTObject comp);
00096 ReturnCode_t deactivate_component(in LightweightRTObject comp);
00097 ReturnCode_t reset_component(in LightweightRTObject comp);
00098 LifeCycleState get_component_state(in LightweightRTObject comp);
00099 ExecutionKind get_kind();
00100 ReturnCode_t add(in LightweightRTObject comp);
00101 ReturnCode_t remove(in LightweightRTObject comp);
00102 };
00103
00111
00121
00129
00137
00145
00153
00162
00176
00185
00194
00199
00208
00226
00239
00254
00270
00288
00303
00314
00323
00331
00341