00001 /* 00002 * 00003 * 00004 * Distributed under the OpenDDS License. 00005 * See: http://www.opendds.org/license.html 00006 */ 00007 00008 #ifndef OPENDDS_DCPS_GUID_IDL 00009 #define OPENDDS_DCPS_GUID_IDL 00010 00011 module OpenDDS 00012 { 00013 module DCPS 00014 { 00015 // Vendor Id value from RTPS specification. 00016 typedef octet GuidVendorId_t[2]; 00017 00018 // GUID prefix bytes - uniquely specify the participant. 00019 typedef octet GuidPrefix_t[12]; 00020 00021 // Key portion of Entity identifier. 00022 typedef octet EntityKey_t[3]; 00023 00024 // Uniquely identify each entity within a participant. 00025 struct EntityId_t { 00026 EntityKey_t entityKey; 00027 octet entityKind; 00028 }; 00029 00030 const octet ENTITYKIND_BUILTIN_UNKNOWN = 0xc0; 00031 const octet ENTITYKIND_BUILTIN_PARTICIPANT = 0xc1; 00032 const octet ENTITYKIND_BUILTIN_WRITER_WITH_KEY = 0xc2; 00033 const octet ENTITYKIND_BUILTIN_WRITER_NO_KEY = 0xc3; 00034 const octet ENTITYKIND_BUILTIN_READER_NO_KEY = 0xc4; 00035 const octet ENTITYKIND_BUILTIN_READER_WITH_KEY = 0xc7; 00036 00037 const octet ENTITYKIND_USER_UNKNOWN = 0x00; 00038 const octet ENTITYKIND_USER_WRITER_WITH_KEY = 0x02; 00039 const octet ENTITYKIND_USER_WRITER_NO_KEY = 0x03; 00040 const octet ENTITYKIND_USER_READER_NO_KEY = 0x04; 00041 const octet ENTITYKIND_USER_READER_WITH_KEY = 0x07; 00042 00043 // Vendor specific Kinds have the following bit pattern: 01xx_xxxx 00044 const octet ENTITYKIND_OPENDDS_SUBSCRIBER = 0x41; 00045 const octet ENTITYKIND_OPENDDS_PUBLISHER = 0x42; 00046 00047 const octet ENTITYKIND_OPENDDS_TOPIC = 0x45; 00048 const octet ENTITYKIND_OPENDDS_USER = 0x4a; 00049 00050 // Used in testing. 00051 const octet ENTITYKIND_OPENDDS_NIL_WRITER = 0x4e; 00052 00053 #if 0 // GUID_t is not actually a DCPS_DATA_TYPE (see comment below). 00054 // We'll just commit the generated *KeyLessThan in GuidUtils.h. 00055 // Specifying the GUID type as a DCPS data type with a complex key forces 00056 // the generation of the logical less than functor for the type. 00057 #pragma DCPS_DATA_TYPE "OpenDDS::DCPS::GUID_t" 00058 #pragma DCPS_DATA_KEY "OpenDDS::DCPS::GUID_t guidPrefix[11]" 00059 #pragma DCPS_DATA_KEY "OpenDDS::DCPS::GUID_t guidPrefix[10]" 00060 #pragma DCPS_DATA_KEY "OpenDDS::DCPS::GUID_t guidPrefix[ 9]" 00061 #pragma DCPS_DATA_KEY "OpenDDS::DCPS::GUID_t guidPrefix[ 8]" 00062 #pragma DCPS_DATA_KEY "OpenDDS::DCPS::GUID_t guidPrefix[ 7]" 00063 #pragma DCPS_DATA_KEY "OpenDDS::DCPS::GUID_t guidPrefix[ 6]" 00064 #pragma DCPS_DATA_KEY "OpenDDS::DCPS::GUID_t guidPrefix[ 5]" 00065 #pragma DCPS_DATA_KEY "OpenDDS::DCPS::GUID_t guidPrefix[ 4]" 00066 #pragma DCPS_DATA_KEY "OpenDDS::DCPS::GUID_t guidPrefix[ 3]" 00067 #pragma DCPS_DATA_KEY "OpenDDS::DCPS::GUID_t guidPrefix[ 2]" 00068 #pragma DCPS_DATA_KEY "OpenDDS::DCPS::GUID_t guidPrefix[ 1]" 00069 #pragma DCPS_DATA_KEY "OpenDDS::DCPS::GUID_t guidPrefix[ 0]" 00070 #pragma DCPS_DATA_KEY "OpenDDS::DCPS::GUID_t entityId.entityKey[2]" 00071 #pragma DCPS_DATA_KEY "OpenDDS::DCPS::GUID_t entityId.entityKey[1]" 00072 #pragma DCPS_DATA_KEY "OpenDDS::DCPS::GUID_t entityId.entityKey[0]" 00073 #pragma DCPS_DATA_KEY "OpenDDS::DCPS::GUID_t entityId.entityKind" 00074 #endif 00075 // The actual GUID itself. 00076 struct GUID_t { 00077 GuidPrefix_t guidPrefix; 00078 EntityId_t entityId; 00079 }; 00080 00081 typedef sequence<GUID_t> GUIDSeq; 00082 00083 }; }; // module OpenDDS::DCPS 00084 00085 #endif /* OPENDDS_DCPS_GUID_IDL */