RTCORBA.pidl

Go to the documentation of this file.
00001 /**
00002  * @file RTCORBA.pidl
00003  *
00004  * $Id: RTCORBA.pidl 81200 2008-04-01 13:03:30Z johnnyw $
00005  *
00006  * @brief Pre-compiled IDL source for the RTCORBA module.
00007  *
00008  * The RTCORBA module specified in CORBA v2.4.2 Chapter 24 (February,
00009  * 2001).
00010  *
00011  * Changes to the original OMG idl:
00012  *
00013  *     1.  Two TAO-specific interfaces, UnixDomainProtocolProperties
00014  *         and SharedMemoryProtocolProperties, have been added to allow
00015  *         configuration of TAO's UIOP and SHMEM pluggable protocols
00016  *         through RTCORBA Protocol Policies.
00017  *     2.  TAO-specific support for named mutexes has been added.
00018  *     3.  Added RT_ORB::create_tcp_protocol_properties which seems
00019  *         to come and go from the formal specification, but is needed.
00020  *
00021  *   This file is used to generate the code in RTCORBAC.{h,inl,cpp}.
00022  *   The steps to regenerate the code are as follows:
00023  *
00024  *   1. Run the tao_idl compiler on the pidl file.  The command used for
00025  *   this is:
00026  *
00027  *     tao_idl -o orig -Gp -Gd -Sci -I../..
00028  *          -Wb,export_macro=TAO_RTCORBA_Export
00029  *          -Wb,export_include="rtcorba_export.h"
00030  *          -Wb,pre_include="ace/pre.h"
00031  *          -Wb,post_include="ace/post.h"
00032  *          RTCORBA.pidl
00033  *
00034  *   2. Then apply the patches in tao/RTCORBA/diffs to the generated code.
00035  *   The patches provide the following fixes: 1) remove several unnecessary
00036  *   includes, e.g., corba.h, stream.h, Policy.h, 3) add anything else we
00037  *   need into the namespace, i.e., TAO_Priority_Mapping, and 4) fix
00038  *   "nested_class" occurrences in the .cpp.
00039  *
00040  * Apply patches using the following commands:
00041  *
00042  *   patch < diffs/RTCORBA.diff
00043  *
00044  * Note: The diffs were generated with these commands:
00045  *
00046  *   for i in RTCORBAC.{h,inl,cpp}; do
00047  *     diff -wBbu orig/$i $i
00048  *   done > diffs/RTCORBA.diff
00049  *
00050  */
00051 
00052 #ifndef _RT_CORBA_IDL_
00053 #define _RT_CORBA_IDL_
00054 
00055 #include "tao/IOP.pidl"
00056 #include "tao/TimeBase.pidl"
00057 #include "tao/Policy.pidl"
00058 #include "tao/RTCORBA/RT_ProtocolProperties.pidl"
00059 
00060 #pragma prefix "omg.org"
00061 
00062 module RTCORBA
00063 {
00064   // Priorities.
00065   typedef short NativePriority;
00066   typedef short Priority;
00067   const Priority minPriority = 0;
00068   const Priority maxPriority = 32767;
00069 
00070   native PriorityMapping;
00071   native PriorityTransform;
00072 
00073   typedef long NetworkPriority;
00074   native NetworkPriorityMapping;
00075 
00076   // Threadpool types.
00077   typedef unsigned long ThreadpoolId;
00078 
00079   struct ThreadpoolLane
00080   {
00081     Priority lane_priority;
00082     unsigned long static_threads;
00083     unsigned long dynamic_threads;
00084   };
00085   typedef sequence <ThreadpoolLane> ThreadpoolLanes;
00086 
00087   // RT Policies.
00088 
00089   // Priority Model Policy.
00090   const CORBA::PolicyType PRIORITY_MODEL_POLICY_TYPE = 40;
00091   enum PriorityModel
00092   {
00093     CLIENT_PROPAGATED,
00094     SERVER_DECLARED
00095   };
00096 
00097   local interface PriorityModelPolicy : CORBA::Policy
00098   {
00099       readonly attribute PriorityModel priority_model;
00100       readonly attribute Priority server_priority;
00101   };
00102 
00103   // Threadpool Policy.
00104   const CORBA::PolicyType THREADPOOL_POLICY_TYPE = 41;
00105   local interface ThreadpoolPolicy : CORBA::Policy
00106   {
00107       readonly attribute ThreadpoolId threadpool;
00108   };
00109 
00110   struct Protocol
00111   {
00112       IOP::ProfileId protocol_type;
00113       ProtocolProperties orb_protocol_properties;
00114       ProtocolProperties transport_protocol_properties;
00115   };
00116 
00117   typedef sequence <Protocol> ProtocolList;
00118 
00119   // Server Protocol Policy
00120   const CORBA::PolicyType SERVER_PROTOCOL_POLICY_TYPE = 42;
00121 
00122   // Locality constrained interface
00123   local interface ServerProtocolPolicy : CORBA::Policy
00124   {
00125     readonly attribute ProtocolList protocols;
00126   };
00127 
00128   // Client Protocol Policy
00129   const CORBA::PolicyType CLIENT_PROTOCOL_POLICY_TYPE = 43;
00130 
00131   // Locality constrained interface
00132   local interface ClientProtocolPolicy : CORBA::Policy
00133   {
00134     readonly attribute ProtocolList protocols;
00135   };
00136 
00137   // Private Connection Policy
00138   const CORBA::PolicyType PRIVATE_CONNECTION_POLICY_TYPE = 44;
00139 
00140   // Locality constrained interface
00141   local interface PrivateConnectionPolicy : CORBA::Policy {};
00142 
00143   local interface TCPProtocolProperties : ProtocolProperties
00144   {
00145     attribute long send_buffer_size;
00146     attribute long recv_buffer_size;
00147     attribute boolean keep_alive;
00148     attribute boolean dont_route;
00149     attribute boolean no_delay;
00150     attribute boolean enable_network_priority;
00151   };
00152 
00153   local interface GIOPProtocolProperties : ProtocolProperties {};
00154 
00155   // Properties for TAO-specific protocols (these protocols &
00156   // interfaces are not specified by the OMG).
00157 
00158   // Communication over Unix Domain Sockets (Local IPC).
00159   local interface UnixDomainProtocolProperties : ProtocolProperties
00160   {
00161     attribute long send_buffer_size;
00162     attribute long recv_buffer_size;
00163   };
00164 
00165   // Communication over Shared Memory.
00166   local interface SharedMemoryProtocolProperties : ProtocolProperties
00167   {
00168     attribute long send_buffer_size;
00169     attribute long recv_buffer_size;
00170     attribute boolean keep_alive;
00171     attribute boolean dont_route;
00172     attribute boolean no_delay;
00173     attribute long preallocate_buffer_size;
00174     attribute string mmap_filename;
00175     attribute string mmap_lockname;
00176   };
00177 
00178   local interface UserDatagramProtocolProperties : ProtocolProperties
00179   {
00180     attribute long send_buffer_size;
00181     attribute long recv_buffer_size;
00182     attribute boolean enable_network_priority;
00183   };
00184 
00185   local interface StreamControlProtocolProperties : ProtocolProperties
00186   {
00187     attribute long send_buffer_size;
00188     attribute long recv_buffer_size;
00189     attribute boolean keep_alive;
00190     attribute boolean dont_route;
00191     attribute boolean no_delay;
00192     attribute boolean enable_network_priority;
00193   };
00194 
00195   // End of TAO-specific interfaces.
00196 
00197   // PriorityBandedConnectionPolicy.
00198   struct PriorityBand
00199   {
00200     Priority low;
00201     Priority high;
00202   };
00203   typedef sequence <PriorityBand> PriorityBands;
00204 
00205   const CORBA::PolicyType PRIORITY_BANDED_CONNECTION_POLICY_TYPE = 45;
00206   local interface PriorityBandedConnectionPolicy : CORBA::Policy
00207   {
00208     readonly attribute PriorityBands priority_bands;
00209   };
00210 
00211   // RT Current.
00212   local interface Current : CORBA::Current
00213   {
00214     attribute Priority the_priority;
00215   };
00216 
00217   // Mutex.
00218   local interface Mutex
00219   {
00220       void lock ();
00221       void unlock ();
00222       /// if max_wait = 0 then return immediately
00223       boolean try_lock (in TimeBase::TimeT max_wait);
00224   };
00225 
00226   // RTORB.
00227   local interface RTORB
00228   {
00229     // Mutex creation/destruction.
00230     Mutex create_mutex ();
00231     void destroy_mutex (in Mutex the_mutex);
00232 
00233     // TAO specific
00234     // Named Mutex creation/opening
00235     exception MutexNotFound {};
00236     Mutex create_named_mutex (in string name,
00237                               out boolean created_flag);
00238     Mutex open_named_mutex (in string name)
00239       raises (MutexNotFound);
00240 
00241     // End TAO specific
00242 
00243     TCPProtocolProperties create_tcp_protocol_properties(
00244                                                      in long send_buffer_size,
00245                                                      in long recv_buffer_size,
00246                                                      in boolean keep_alive,
00247                                                      in boolean dont_route,
00248                                                      in boolean no_delay,
00249                                                      in boolean enable_network_priority);
00250 
00251     UnixDomainProtocolProperties create_unix_domain_protocol_properties(
00252                                                      in long send_buffer_size,
00253                                                      in long recv_buffer_size);
00254 
00255     SharedMemoryProtocolProperties create_shared_memory_protocol_properties(
00256                                                      in long send_buffer_size,
00257                                                      in long recv_buffer_size,
00258                                                      in boolean keep_alive,
00259                                                      in boolean dont_route,
00260                                                      in boolean no_delay,
00261                                                      in long preallocate_buffer_size,
00262                                                      in string mmap_filename,
00263                                                      in string mmap_lockname);
00264 
00265     UserDatagramProtocolProperties create_user_datagram_protocol_properties(
00266                                                      in long send_buffer_size,
00267                                                      in long recv_buffer_size,
00268                                                      in boolean enable_network_priority);
00269 
00270     StreamControlProtocolProperties create_stream_control_protocol_properties(
00271                                                      in long send_buffer_size,
00272                                                      in long recv_buffer_size,
00273                                                      in boolean keep_alive,
00274                                                      in boolean dont_route,
00275                                                      in boolean no_delay,
00276                                                      in boolean enable_network_priority);
00277 
00278     // Threadpool creation/destruction.
00279     exception InvalidThreadpool {};
00280 
00281     ThreadpoolId create_threadpool (in unsigned long stacksize,
00282                                     in unsigned long static_threads,
00283                                     in unsigned long dynamic_threads,
00284                                     in Priority default_priority,
00285                                     in boolean allow_request_buffering,
00286                                     in unsigned long max_buffered_requests,
00287                                     in unsigned long max_request_buffer_size);
00288 
00289     ThreadpoolId create_threadpool_with_lanes (in unsigned long stacksize,
00290                                                in ThreadpoolLanes lanes,
00291                                                in boolean allow_borrowing,
00292                                                in boolean allow_request_buffering,
00293                                                in unsigned long max_buffered_requests,
00294                                                in unsigned long max_request_buffer_size);
00295 
00296     void destroy_threadpool (in ThreadpoolId threadpool)
00297       raises (InvalidThreadpool);
00298 
00299     // RT Policies creation.
00300     PriorityModelPolicy create_priority_model_policy (in PriorityModel priority_model,
00301                                                       in Priority server_priority);
00302 
00303     ThreadpoolPolicy create_threadpool_policy (in ThreadpoolId threadpool);
00304 
00305     PriorityBandedConnectionPolicy
00306       create_priority_banded_connection_policy (in PriorityBands priority_bands);
00307 
00308 
00309     ServerProtocolPolicy create_server_protocol_policy (in ProtocolList protocols);
00310 
00311     ClientProtocolPolicy create_client_protocol_policy (in ProtocolList protocols);
00312 
00313     PrivateConnectionPolicy create_private_connection_policy ();
00314   };
00315 };
00316 
00317 #endif /* _RT_CORBA_IDL_ */

Generated on Tue Feb 2 17:42:49 2010 for TAO_RTCORBA by  doxygen 1.4.7