RTCORBA.pidl

Go to the documentation of this file.
00001 /**
00002  * @file RTCORBA.pidl
00003  *
00004  * RTCORBA.pidl,v 1.15 2006/03/14 15:32:23 jtc Exp
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 was 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 -Ge 1 -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 
00059 #pragma prefix "omg.org"
00060 
00061 module RTCORBA
00062 {
00063   // Priorities.
00064   typedef short NativePriority;
00065   typedef short Priority;
00066   const Priority minPriority = 0;
00067   const Priority maxPriority = 32767;
00068 
00069   native PriorityMapping;
00070   native PriorityTransform;
00071 
00072   typedef long NetworkPriority;
00073   native NetworkPriorityMapping;
00074 
00075   // Threadpool types.
00076   typedef unsigned long ThreadpoolId;
00077 
00078   struct ThreadpoolLane
00079   {
00080     Priority lane_priority;
00081     unsigned long static_threads;
00082     unsigned long dynamic_threads;
00083   };
00084   typedef sequence <ThreadpoolLane> ThreadpoolLanes;
00085 
00086   // RT Policies.
00087 
00088   // Priority Model Policy.
00089   const CORBA::PolicyType PRIORITY_MODEL_POLICY_TYPE = 40;
00090   enum PriorityModel
00091   {
00092     CLIENT_PROPAGATED,
00093     SERVER_DECLARED
00094   };
00095 
00096   local interface PriorityModelPolicy : CORBA::Policy
00097   {
00098       readonly attribute PriorityModel priority_model;
00099       readonly attribute Priority server_priority;
00100   };
00101 
00102   // Threadpool Policy.
00103   const CORBA::PolicyType THREADPOOL_POLICY_TYPE = 41;
00104   local interface ThreadpoolPolicy : CORBA::Policy
00105   {
00106       readonly attribute ThreadpoolId threadpool;
00107   };
00108 
00109   // Protocol Properties.
00110   local interface ProtocolProperties {};
00111 
00112   struct Protocol
00113   {
00114       IOP::ProfileId protocol_type;
00115       ProtocolProperties orb_protocol_properties;
00116       ProtocolProperties transport_protocol_properties;
00117   };
00118 
00119   typedef sequence <Protocol> ProtocolList;
00120 
00121   // Server Protocol Policy
00122   const CORBA::PolicyType SERVER_PROTOCOL_POLICY_TYPE = 42;
00123 
00124   // Locality constrained interface
00125   local interface ServerProtocolPolicy : CORBA::Policy
00126   {
00127     readonly attribute ProtocolList protocols;
00128   };
00129 
00130   // Client Protocol Policy
00131   const CORBA::PolicyType CLIENT_PROTOCOL_POLICY_TYPE = 43;
00132 
00133   // Locality constrained interface
00134   local interface ClientProtocolPolicy : CORBA::Policy
00135   {
00136     readonly attribute ProtocolList protocols;
00137   };
00138 
00139   // Private Connection Policy
00140   const CORBA::PolicyType PRIVATE_CONNECTION_POLICY_TYPE = 44;
00141 
00142   // Locality constrained interface
00143   local interface PrivateConnectionPolicy : CORBA::Policy {};
00144 
00145   local interface TCPProtocolProperties : ProtocolProperties
00146   {
00147     attribute long send_buffer_size;
00148     attribute long recv_buffer_size;
00149     attribute boolean keep_alive;
00150     attribute boolean dont_route;
00151     attribute boolean no_delay;
00152     attribute boolean enable_network_priority;
00153   };
00154 
00155   local interface GIOPProtocolProperties : ProtocolProperties {};
00156 
00157   // Properties for TAO-specific protocols (these protocols &
00158   // interfaces are not specified by the OMG).
00159 
00160   // Communication over Unix Domain Sockets (Local IPC).
00161   local interface UnixDomainProtocolProperties : ProtocolProperties
00162   {
00163     attribute long send_buffer_size;
00164     attribute long recv_buffer_size;
00165   };
00166 
00167   // Communication over Shared Memory.
00168   local interface SharedMemoryProtocolProperties : ProtocolProperties
00169   {
00170     attribute long send_buffer_size;
00171     attribute long recv_buffer_size;
00172     attribute boolean keep_alive;
00173     attribute boolean dont_route;
00174     attribute boolean no_delay;
00175     attribute long preallocate_buffer_size;
00176     attribute string mmap_filename;
00177     attribute string mmap_lockname;
00178   };
00179 
00180   local interface UserDatagramProtocolProperties : ProtocolProperties
00181   {
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       boolean try_lock (in TimeBase::TimeT max_wait);
00223     // if max_wait = 0 then return immediately
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 boolean enable_network_priority);
00267 
00268     StreamControlProtocolProperties create_stream_control_protocol_properties(
00269                                                      in long send_buffer_size,
00270                                                      in long recv_buffer_size,
00271                                                      in boolean keep_alive,
00272                                                      in boolean dont_route,
00273                                                      in boolean no_delay,
00274                                                      in boolean enable_network_priority);
00275 
00276     // Threadpool creation/destruction.
00277     exception InvalidThreadpool {};
00278 
00279     ThreadpoolId create_threadpool (in unsigned long stacksize,
00280                                     in unsigned long static_threads,
00281                                     in unsigned long dynamic_threads,
00282                                     in Priority default_priority,
00283                                     in boolean allow_request_buffering,
00284                                     in unsigned long max_buffered_requests,
00285                                     in unsigned long max_request_buffer_size);
00286 
00287     ThreadpoolId create_threadpool_with_lanes (in unsigned long stacksize,
00288                                                in ThreadpoolLanes lanes,
00289                                                in boolean allow_borrowing,
00290                                                in boolean allow_request_buffering,
00291                                                in unsigned long max_buffered_requests,
00292                                                in unsigned long max_request_buffer_size);
00293 
00294     void destroy_threadpool (in ThreadpoolId threadpool)
00295       raises (InvalidThreadpool);
00296 
00297     // RT Policies creation.
00298     PriorityModelPolicy create_priority_model_policy (in PriorityModel priority_model,
00299                                                       in Priority server_priority);
00300 
00301     ThreadpoolPolicy create_threadpool_policy (in ThreadpoolId threadpool);
00302 
00303     PriorityBandedConnectionPolicy
00304       create_priority_banded_connection_policy (in PriorityBands priority_bands);
00305 
00306 
00307     ServerProtocolPolicy create_server_protocol_policy (in ProtocolList protocols);
00308 
00309     ClientProtocolPolicy create_client_protocol_policy (in ProtocolList protocols);
00310 
00311     PrivateConnectionPolicy create_private_connection_policy ();
00312   };
00313 };
00314 
00315 #endif /* _RT_CORBA_IDL_ */

Generated on Thu Nov 9 12:58:02 2006 for TAO_RTCORBA by doxygen 1.3.6