3 //=============================================================================
5 * @file ORB_Constants.h
7 * Constants needed by various files.
10 * @author Ossama Othman
12 //=============================================================================
14 #ifndef TAO_ORB_CONSTANTS_H
15 #define TAO_ORB_CONSTANTS_H
17 #include /**/ "ace/pre.h"
19 #include "tao/Basic_Types.h"
21 #if !defined (ACE_LACKS_PRAGMA_ONCE)
23 #endif /* ACE_LACKS_PRAGMA_ONCE */
25 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
27 // A hash define for the regular two way operation.
28 #define TAO_TWOWAY_RESPONSE_FLAG 255
32 /// The OMG Vendor Minor Codeset ID (VMCID).
34 * This number is reserved by the OMG as a prefix to all the
35 * standard system exception minor codes. Check the CORBA/IIOP
36 * specification for details.
38 * OMG defined system exception minor codes should be logically
39 * OR-ed with this constant when passing such minor codes to a
40 * @c CORBA::SystemException constructor. For example, throwing a
41 * @c CORBA::BAD_PARAM exception with an OMG defined minor code of
42 * @c 2 is done as follows:
45 * throw ::CORBA::BAD_PARAM (CORBA::OMGVMCID | 2, CORBA::COMPLETED_NO);
51 * throw ::CORBA::BAD_PARAM (2, CORBA::COMPLETED_NO);
54 const ULong OMGVMCID
= 0x4f4d0000U
;
59 /// TAO Vendor Minor Codeset ID (VMCID).
61 * TAO Vendor Minor Codeset ID (VMCID) assigned by the OMG. Do
62 * *NOT* change at random. The TAO VMCID is an ASCII representation
63 * of @c TA0xxxx (close enough since a VMCID only consists of the
64 * higher order 20 bits of a 32 bit unsigned long integer). The
65 * first 16 bits are @c TA, and the remaining 4 are @c 0.
67 * @note Remember that we can only play with the lower order 12
68 * bits. @c MAX_MINOR_CODE is there to remind us of that.
70 * @see @c MAX_MINOR_CODE
72 const CORBA::ULong VMCID
= 0x54410000U
;
74 /// Maximum allowed TAO system exception minor code.
76 * Vendors are only allowed to use the lower order 12 bits of their
77 * when defining vendor-specific exception minor codes.
78 * @c MAX_MINOR_CODE is the maximum minor code value available to
79 * TAO. Do not exceed it when defining TAO system exception minor
84 const CORBA::ULong MAX_MINOR_CODE
= VMCID
| 0xfffU
;
86 /// TAO Vendor @c PolicyType Valueset ID (VPVID)
88 * TAO Vendor @c PolicyType Valueset ID (VPVID) assigned by the
89 * OMG. This value was automatically assigned when TAO's VMCID was
90 * assigned. Its value is always the same as the VMCID.
92 * As with TAO-specific system exception minor codes, the
93 * TAO-specific @c PolicyType space occupies the lower order 12 bits
94 * of the TAO VPVID, i.e.
97 * TAO::VPVID <= TAO PolicyType <= TAO::VPVID | 0xfffU.
100 * For example, TAO-specific @c PolicyTypes should be defined by
101 * logically "OR-ing" a 12 bit or less (i.e. 0x0U <= value <=
102 * 0xfffU) value with @c TAO::VPVID.
106 const CORBA::ULong VPVID
= VMCID
;
109 /// A dummy service context that is inserted in the service context
110 /// list to preserve the alignment in DSI based gateways, so no
111 /// marshaling/demarshaling is required.
113 * @note This is *extremely* brittle but works.
115 const CORBA::ULong TAO_SVC_CONTEXT_ALIGN
= 0x54414f00U
;
118 * @name TAO-Specific Profile IDs
120 * The TAO @c IOP::ProfileId range @c 0x54414f00 - @c 0x54414f0f has
121 * been reserved with the OMG.
123 * @note It is *NOT* necessary to list your own protocols here.
125 * @note The values below are subject to change at any point.
128 /// Local IPC (Unix Domain)
129 const CORBA::ULong TAO_TAG_UIOP_PROFILE
= 0x54414f00U
;
132 // const CORBA::ULong TAO_TAG_AIOP_PROFILE = 0x54414f01U;
135 const CORBA::ULong TAO_TAG_SHMEM_PROFILE
= 0x54414f02U
;
138 // const CORBA::ULong TAO_TAG_MSGQ_PROFILE = 0x54414f03U;
141 const CORBA::ULong TAO_TAG_DIOP_PROFILE
= 0x54414f04U
;
144 const CORBA::ULong TAO_TAG_COIOP_PROFILE
= 0x54414f05U
;
147 const CORBA::ULong TAO_TAG_SCIOP_PROFILE
= 0x54414f0EU
;
149 /// Tandem (HP) File System Protocol
150 const CORBA::ULong TAO_TAG_NSKFS_PROFILE
= 0x00003039U
;
152 /// Tandem (HP) Pathsend Protocol
153 const CORBA::ULong TAO_TAG_NSKPW_PROFILE
= 0x0000303AU
;
155 // Default DiffServ CodePoint.
156 const int IPDSFIELD_DSCP_DEFAULT
= 0x00;
159 * @name Minor Code Encoding
161 * Encode the location in 5 bits, and the errno in 7 bits:
164 * 0x 0101 0100 0100 0001 0000 ____ _ ___ ____
165 * T A 0 location errno
170 * @name Location Encoding
172 * The location encoding is the 5 bits, after the @ errno encoding.
175 const CORBA::ULong TAO_INVOCATION_LOCATION_FORWARD_MINOR_CODE
= (0x01U
<< 7);
176 const CORBA::ULong TAO_INVOCATION_SEND_REQUEST_MINOR_CODE
= (0x02U
<< 7);
177 const CORBA::ULong TAO_POA_DISCARDING
= (0x03U
<< 7);
178 const CORBA::ULong TAO_POA_HOLDING
= (0x04U
<< 7);
179 const CORBA::ULong TAO_UNHANDLED_SERVER_CXX_EXCEPTION
= (0x05U
<< 7);
180 const CORBA::ULong TAO_INVOCATION_RECV_REQUEST_MINOR_CODE
= (0x06U
<< 7);
181 const CORBA::ULong TAO_CONNECTOR_REGISTRY_NO_USABLE_PROTOCOL
= (0x07U
<< 7);
182 const CORBA::ULong TAO_MPROFILE_CREATION_ERROR
= (0x08U
<< 7);
183 const CORBA::ULong TAO_TIMEOUT_CONNECT_MINOR_CODE
= (0x09U
<< 7);
184 const CORBA::ULong TAO_TIMEOUT_SEND_MINOR_CODE
= (0x0AU
<< 7);
185 const CORBA::ULong TAO_TIMEOUT_RECV_MINOR_CODE
= (0x0BU
<< 7);
186 const CORBA::ULong TAO_IMPLREPO_MINOR_CODE
= (0x0CU
<< 7);
187 const CORBA::ULong TAO_ACCEPTOR_REGISTRY_OPEN_LOCATION_CODE
= (0x0DU
<< 7);
188 const CORBA::ULong TAO_ORB_CORE_INIT_LOCATION_CODE
= (0x0EU
<< 7);
189 const CORBA::ULong TAO_POLICY_NARROW_CODE
= (0x0FU
<< 7);
190 const CORBA::ULong TAO_GUARD_FAILURE
= (0x10U
<< 7);
191 const CORBA::ULong TAO_POA_BEING_DESTROYED
= (0x11U
<< 7);
192 const CORBA::ULong TAO_POA_INACTIVE
= (0x12U
<< 7);
193 const CORBA::ULong TAO_CONNECTOR_REGISTRY_INIT_LOCATION_CODE
= (0x13U
<< 7);
194 const CORBA::ULong TAO_AMH_REPLY_LOCATION_CODE
= (0x14U
<< 7);
195 const CORBA::ULong TAO_RTCORBA_THREAD_CREATION_LOCATION_CODE
= (0x15U
<< 7);
196 // *Don't* use TAO_<location>_MINOR_CODE greater than 0x1FU!
200 TAO_END_VERSIONED_NAMESPACE_DECL
202 #include /**/ "ace/post.h"
204 #endif /* TAO_ORB_CONSTANTS_H */