diff options
Diffstat (limited to 'TAO/tao/RTCORBA/RTCORBA.pidl')
-rw-r--r-- | TAO/tao/RTCORBA/RTCORBA.pidl | 315 |
1 files changed, 315 insertions, 0 deletions
diff --git a/TAO/tao/RTCORBA/RTCORBA.pidl b/TAO/tao/RTCORBA/RTCORBA.pidl new file mode 100644 index 00000000000..b8cde7545e0 --- /dev/null +++ b/TAO/tao/RTCORBA/RTCORBA.pidl @@ -0,0 +1,315 @@ +/** + * @file RTCORBA.pidl + * + * $Id$ + * + * @brief Pre-compiled IDL source for the RTCORBA module. + * + * The RTCORBA module specified in CORBA v2.4.2 Chapter 24 (February, + * 2001). + * + * Changes to the original OMG idl: + * + * 1. Two TAO-specific interfaces, UnixDomainProtocolProperties + * and SharedMemoryProtocolProperties, have been added to allow + * configuration of TAO's UIOP and SHMEM pluggable protocols + * through RTCORBA Protocol Policies. + * 2. TAO-specific support for named mutexes has been added. + * 3. Added RT_ORB::create_tcp_protocol_properties which seems + * to come and go from the formal specification, but is needed. + * + * This file was used to generate the code in RTCORBAC.{h,inl,cpp}. + * The steps to regenerate the code are as follows: + * + * 1. Run the tao_idl compiler on the pidl file. The command used for + * this is: + * + * tao_idl -o orig -Gp -Gd -Sci -I../.. + * -Wb,export_macro=TAO_RTCORBA_Export + * -Wb,export_include="rtcorba_export.h" + * -Wb,pre_include="ace/pre.h" + * -Wb,post_include="ace/post.h" + * RTCORBA.pidl + * + * 2. Then apply the patches in tao/RTCORBA/diffs to the generated code. + * The patches provide the following fixes: 1) remove several unnecessary + * includes, e.g., corba.h, stream.h, Policy.h, 3) add anything else we + * need into the namespace, i.e., TAO_Priority_Mapping, and 4) fix + * "nested_class" occurrences in the .cpp. + * + * Apply patches using the following commands: + * + * patch < diffs/RTCORBA.diff + * + * Note: The diffs were generated with these commands: + * + * for i in RTCORBAC.{h,inl,cpp}; do + * diff -wBbu orig/$i $i + * done > diffs/RTCORBA.diff + * + */ + +#ifndef _RT_CORBA_IDL_ +#define _RT_CORBA_IDL_ + +#include "tao/IOP.pidl" +#include "tao/TimeBase.pidl" +#include "tao/Policy.pidl" + +#pragma prefix "omg.org" + +module RTCORBA +{ + // Priorities. + typedef short NativePriority; + typedef short Priority; + const Priority minPriority = 0; + const Priority maxPriority = 32767; + + native PriorityMapping; + native PriorityTransform; + + typedef long NetworkPriority; + native NetworkPriorityMapping; + + // Threadpool types. + typedef unsigned long ThreadpoolId; + + struct ThreadpoolLane + { + Priority lane_priority; + unsigned long static_threads; + unsigned long dynamic_threads; + }; + typedef sequence <ThreadpoolLane> ThreadpoolLanes; + + // RT Policies. + + // Priority Model Policy. + const CORBA::PolicyType PRIORITY_MODEL_POLICY_TYPE = 40; + enum PriorityModel + { + CLIENT_PROPAGATED, + SERVER_DECLARED + }; + + local interface PriorityModelPolicy : CORBA::Policy + { + readonly attribute PriorityModel priority_model; + readonly attribute Priority server_priority; + }; + + // Threadpool Policy. + const CORBA::PolicyType THREADPOOL_POLICY_TYPE = 41; + local interface ThreadpoolPolicy : CORBA::Policy + { + readonly attribute ThreadpoolId threadpool; + }; + + // Protocol Properties. + local interface ProtocolProperties {}; + + struct Protocol + { + IOP::ProfileId protocol_type; + ProtocolProperties orb_protocol_properties; + ProtocolProperties transport_protocol_properties; + }; + + typedef sequence <Protocol> ProtocolList; + + // Server Protocol Policy + const CORBA::PolicyType SERVER_PROTOCOL_POLICY_TYPE = 42; + + // Locality constrained interface + local interface ServerProtocolPolicy : CORBA::Policy + { + readonly attribute ProtocolList protocols; + }; + + // Client Protocol Policy + const CORBA::PolicyType CLIENT_PROTOCOL_POLICY_TYPE = 43; + + // Locality constrained interface + local interface ClientProtocolPolicy : CORBA::Policy + { + readonly attribute ProtocolList protocols; + }; + + // Private Connection Policy + const CORBA::PolicyType PRIVATE_CONNECTION_POLICY_TYPE = 44; + + // Locality constrained interface + local interface PrivateConnectionPolicy : CORBA::Policy {}; + + local interface TCPProtocolProperties : ProtocolProperties + { + attribute long send_buffer_size; + attribute long recv_buffer_size; + attribute boolean keep_alive; + attribute boolean dont_route; + attribute boolean no_delay; + attribute boolean enable_network_priority; + }; + + local interface GIOPProtocolProperties : ProtocolProperties {}; + + // Properties for TAO-specific protocols (these protocols & + // interfaces are not specified by the OMG). + + // Communication over Unix Domain Sockets (Local IPC). + local interface UnixDomainProtocolProperties : ProtocolProperties + { + attribute long send_buffer_size; + attribute long recv_buffer_size; + }; + + // Communication over Shared Memory. + local interface SharedMemoryProtocolProperties : ProtocolProperties + { + attribute long send_buffer_size; + attribute long recv_buffer_size; + attribute boolean keep_alive; + attribute boolean dont_route; + attribute boolean no_delay; + attribute long preallocate_buffer_size; + attribute string mmap_filename; + attribute string mmap_lockname; + }; + + local interface UserDatagramProtocolProperties : ProtocolProperties + { + attribute boolean enable_network_priority; + }; + + local interface StreamControlProtocolProperties : ProtocolProperties + { + attribute long send_buffer_size; + attribute long recv_buffer_size; + attribute boolean keep_alive; + attribute boolean dont_route; + attribute boolean no_delay; + attribute boolean enable_network_priority; + }; + + // End of TAO-specific interfaces. + + // PriorityBandedConnectionPolicy. + struct PriorityBand + { + Priority low; + Priority high; + }; + typedef sequence <PriorityBand> PriorityBands; + + const CORBA::PolicyType PRIORITY_BANDED_CONNECTION_POLICY_TYPE = 45; + local interface PriorityBandedConnectionPolicy : CORBA::Policy + { + readonly attribute PriorityBands priority_bands; + }; + + // RT Current. + local interface Current : CORBA::Current + { + attribute Priority the_priority; + }; + + // Mutex. + local interface Mutex + { + void lock (); + void unlock (); + /// if max_wait = 0 then return immediately + boolean try_lock (in TimeBase::TimeT max_wait); + }; + + // RTORB. + local interface RTORB + { + // Mutex creation/destruction. + Mutex create_mutex (); + void destroy_mutex (in Mutex the_mutex); + + // TAO specific + // Named Mutex creation/opening + exception MutexNotFound {}; + Mutex create_named_mutex (in string name, + out boolean created_flag); + Mutex open_named_mutex (in string name) + raises (MutexNotFound); + + // End TAO specific + + TCPProtocolProperties create_tcp_protocol_properties( + in long send_buffer_size, + in long recv_buffer_size, + in boolean keep_alive, + in boolean dont_route, + in boolean no_delay, + in boolean enable_network_priority); + + UnixDomainProtocolProperties create_unix_domain_protocol_properties( + in long send_buffer_size, + in long recv_buffer_size); + + SharedMemoryProtocolProperties create_shared_memory_protocol_properties( + in long send_buffer_size, + in long recv_buffer_size, + in boolean keep_alive, + in boolean dont_route, + in boolean no_delay, + in long preallocate_buffer_size, + in string mmap_filename, + in string mmap_lockname); + + UserDatagramProtocolProperties create_user_datagram_protocol_properties( + in boolean enable_network_priority); + + StreamControlProtocolProperties create_stream_control_protocol_properties( + in long send_buffer_size, + in long recv_buffer_size, + in boolean keep_alive, + in boolean dont_route, + in boolean no_delay, + in boolean enable_network_priority); + + // Threadpool creation/destruction. + exception InvalidThreadpool {}; + + ThreadpoolId create_threadpool (in unsigned long stacksize, + in unsigned long static_threads, + in unsigned long dynamic_threads, + in Priority default_priority, + in boolean allow_request_buffering, + in unsigned long max_buffered_requests, + in unsigned long max_request_buffer_size); + + ThreadpoolId create_threadpool_with_lanes (in unsigned long stacksize, + in ThreadpoolLanes lanes, + in boolean allow_borrowing, + in boolean allow_request_buffering, + in unsigned long max_buffered_requests, + in unsigned long max_request_buffer_size); + + void destroy_threadpool (in ThreadpoolId threadpool) + raises (InvalidThreadpool); + + // RT Policies creation. + PriorityModelPolicy create_priority_model_policy (in PriorityModel priority_model, + in Priority server_priority); + + ThreadpoolPolicy create_threadpool_policy (in ThreadpoolId threadpool); + + PriorityBandedConnectionPolicy + create_priority_banded_connection_policy (in PriorityBands priority_bands); + + + ServerProtocolPolicy create_server_protocol_policy (in ProtocolList protocols); + + ClientProtocolPolicy create_client_protocol_policy (in ProtocolList protocols); + + PrivateConnectionPolicy create_private_connection_policy (); + }; +}; + +#endif /* _RT_CORBA_IDL_ */ |