Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / TAO / tao / RTScheduling / RTScheduler.pidl
blob80e3e307ca199e63f727c10ec6e284c9c939ce17
1 // ================================================================
2 //
3 // = LIBRARY
4 //   TAO_RTScheduling
5 //
6 // = FILENAME
7 //   RTScheduling.pidl
8 //
9 // = DESCRIPTION
10 //   Some new data types included for GIOP 1.2
11 // ================================================================
12 #ifndef TAO_RTSCHEDULER_PIDL
13 #define TAO_RTSCHEDULER_PIDL
15 #include "tao/RTCORBA/RTCORBA_include.pidl"
16 #include "tao/PortableServer/PortableServer_include.pidl"
17 #include "tao/PI/PI_include.pidl"
18 #include "tao/PI_Server/ServerRequestInfo.pidl"
19 #include "tao/PortableInterceptor.pidl"
20 #include "tao/PI/PIForwardRequest.pidl"
22 module CORBA
24     // Extensions by this proposal:
25     native VoidData;
27     // Ada:  System.Address
28     // C:    void*
29     // C++:  void*
30     // Java: Object
34 module RTScheduling
36     // ------------------------------------------------------------------
37     // Interfaces that are useful to dynamically schedule applications
38     // ------------------------------------------------------------------
40     local interface ThreadAction
41     {
42         void do(in CORBA::VoidData data);
43     };
45     local interface DistributableThread
46     {
47         enum DT_State
48         {
49           ACTIVE,
50           CANCELLED
51         };
53         void cancel();
54             // raises CORBA::OBJECT_NOT_FOUND if
55             // the distributable thread is
56             // not known to the scheduler
57         readonly attribute DT_State state;
58     };
60     local interface Current
61         : RTCORBA::Current
62     {
63         DistributableThread
64             spawn
65                 (in ThreadAction      start,
66                 in CORBA::VoidData data,
67                 in string name,
68                 in CORBA::Policy sched_param,
69                 in CORBA::Policy implicit_sched_param,
70                 in unsigned long     stack_size,
71                     // zero means use the O/S default
72                 in RTCORBA::Priority base_priority);
74         exception UNSUPPORTED_SCHEDULING_DISCIPLINE {};
75     // The scheduling_parameter argument didn't match the
76     // active scheduling policy.
78         void begin_scheduling_segment
79             (in string        name,
80              in CORBA::Policy sched_param,
81              in CORBA::Policy implicit_sched_param)
82             raises (UNSUPPORTED_SCHEDULING_DISCIPLINE );
84         void update_scheduling_segment
85             (in string       name,
86              in CORBA::Policy sched_param,
87              in CORBA::Policy implicit_sched_param)
88             raises ( UNSUPPORTED_SCHEDULING_DISCIPLINE );
90         void end_scheduling_segment(in string name);
92         typedef sequence<octet> IdType;
94         readonly attribute IdType id;
95             // a globally unique id
97         //IdType get_current_id();
98             // returns id of thread that is running
100         DistributableThread lookup(in IdType id);
101             // returns a null reference if
102             // the distributable thread is
103             // not known to the local scheduler
105         readonly attribute CORBA::Policy scheduling_parameter;
106         readonly attribute CORBA::Policy implicit_scheduling_parameter;
108         typedef sequence<string> NameList;
110         readonly attribute NameList      current_scheduling_segment_names;
111             // Ordered from innermost segment name
112             // to outmost segment name
113     };
115     local interface ResourceManager
116         : RTCORBA::Mutex
117     {
118     };
120     local interface Scheduler
121     {
122         exception INCOMPATIBLE_SCHEDULING_DISCIPLINES {};
124         attribute          CORBA::PolicyList scheduling_policies;
125         readonly attribute CORBA::PolicyList poa_policies;
126         readonly attribute string            scheduling_discipline_name;
128         ResourceManager
129             create_resource_manager
130                 (in string        name,
131                  in CORBA::Policy scheduling_parameter);
133         void set_scheduling_parameter
134             (inout PortableServer::Servant resource,
135              in    string         name,
136              in    CORBA::Policy  scheduling_parameter);
138         void begin_new_scheduling_segment (in Current::IdType guid,
139                                         in string name,
140                                         in CORBA::Policy sched_param,
141                                         in CORBA::Policy implicit_sched_param)
142         raises (Current::UNSUPPORTED_SCHEDULING_DISCIPLINE);
144         void begin_nested_scheduling_segment (in Current::IdType guid,
145                                         in string name,
146                                         in CORBA::Policy sched_param,
147                                         in CORBA::Policy implicit_sched_param)
148         raises (Current::UNSUPPORTED_SCHEDULING_DISCIPLINE);
151         void update_scheduling_segment (in Current::IdType guid,
152                                         in string name,
153                                         in CORBA::Policy sched_param,
154                                         in CORBA::Policy implicit_sched_param)
155         raises (Current::UNSUPPORTED_SCHEDULING_DISCIPLINE);
157         void end_scheduling_segment (in Current::IdType guid,
158                                         in string name);
161         void end_nested_scheduling_segment (in Current::IdType guid,
162                                         in string name,
163                                         in CORBA::Policy outer_sched_param);
165         void send_request (in PortableInterceptor::ClientRequestInfo ri)
166         raises (PortableInterceptor::ForwardRequest);
168         void receive_request (in PortableInterceptor::ServerRequestInfo ri,
169                                 out Current::IdType guid,
170                                 out string name,
171                                 out CORBA::Policy sched_param,
172                                 out CORBA::Policy implicit_sched_param)
173         raises (PortableInterceptor::ForwardRequest);
175         void send_reply (in PortableInterceptor::ServerRequestInfo ri);
177         void send_exception (in PortableInterceptor::ServerRequestInfo ri)
178         raises (PortableInterceptor::ForwardRequest);
180         void send_other (in PortableInterceptor::ServerRequestInfo ri)
181         raises (PortableInterceptor::ForwardRequest);
183         void send_poll (in PortableInterceptor::ClientRequestInfo ri)
184         raises (PortableInterceptor::ForwardRequest);
186         void receive_reply (in PortableInterceptor::ClientRequestInfo ri);
188         void receive_exception (in PortableInterceptor::ClientRequestInfo ri)
189         raises (PortableInterceptor::ForwardRequest);
191         void receive_other (in PortableInterceptor::ClientRequestInfo ri)
192         raises (PortableInterceptor::ForwardRequest);
194         void cancel (in Current::IdType guid);
195     };
199 #endif /*TAO_RTSCHEDULER_PIDL*/