#include <RepoIdConverter.h>
Inheritance diagram for OpenDDS::DCPS::RepoIdConverter:
Public Member Functions | |
RepoIdConverter (const RepoId &repoId) | |
~RepoIdConverter () | |
OpenDDS::Federator::RepoKey | federationId () const |
ParticipantId | participantId () const |
This class encapsulates the conversion of a GUID_t value to and from other types used within OpenDDS. This includes the ability to create new RepoId values with a specific federation Id and Participant instance handle as well as extracting the Instance handle for an Entity from the RepoId value. Tests for Entity Kind as well as the type (User v. Builtin) of Entity are also included.
Currently the RepoId is a typedef for GUID_t. This class assumes responsibility for insulating users from future change.
Currently the RepoId is mapped from various internal values. These mappings are:
byte structure reference content ---- --------------------- -------------------------- 0 GUID_t.guidPrefix[ 0] == VendorId_t == 0x00 for OCI (used for OpenDDS) 1 GUID_t.guidPrefix[ 1] == VendorId_t == 0x03 for OCI (used for OpenDDS) 2 GUID_t.guidPrefix[ 2] == 0x00 3 GUID_t.guidPrefix[ 3] == 0x00
4 GUID_t.guidPrefix[ 4] == federation id (MS byte) 5 GUID_t.guidPrefix[ 5] == federation id 6 GUID_t.guidPrefix[ 6] == federation id 7 GUID_t.guidPrefix[ 7] == federation id (LS byte)
8 GUID_t.guidPrefix[ 8] == particpant id (MS byte) 9 GUID_t.guidPrefix[ 9] == particpant id 10 GUID_t.guidPrefix[10] == particpant id 11 GUID_t.guidPrefix[11] == particpant id (LS byte)
12 GUID_t.entityId.entityKey[ 0] == entity id[0] (MS byte) 13 GUID_t.entityId.entityKey[ 1] == entity id[1] 14 GUID_t.entityId.entityKey[ 2] == entity id[2] (LS byte) 15 GUID_t.entityId.entityKind == entity kind
Definition at line 69 of file RepoIdConverter.h.
OpenDDS::DCPS::RepoIdConverter::RepoIdConverter | ( | const RepoId & | repoId | ) |
OpenDDS::DCPS::RepoIdConverter::~RepoIdConverter | ( | ) |
OpenDDS::Federator::RepoKey OpenDDS::DCPS::RepoIdConverter::federationId | ( | ) | const |
Definition at line 23 of file RepoIdConverter.cpp.
References OpenDDS::DCPS::GuidConverter::guid_, and OpenDDS::DCPS::GUID_t::guidPrefix.
Referenced by TAO_DDS_DCPSInfo_i::add_domain_participant(), TAO_DDS_DCPSInfo_i::add_publication(), TAO_DDS_DCPSInfo_i::add_subscription(), TAO_DDS_DCPSInfo_i::add_topic(), and TAO_DDS_DCPSInfo_i::receive_image().
00024 { 00025 return guid_.guidPrefix[4] << 24 | 00026 guid_.guidPrefix[5] << 16 | 00027 guid_.guidPrefix[6] << 8 | 00028 guid_.guidPrefix[7]; 00029 }
ParticipantId OpenDDS::DCPS::RepoIdConverter::participantId | ( | ) | const |
Definition at line 32 of file RepoIdConverter.cpp.
References OpenDDS::DCPS::GuidConverter::guid_, and OpenDDS::DCPS::GUID_t::guidPrefix.
Referenced by TAO_DDS_DCPSInfo_i::add_domain_participant(), and TAO_DDS_DCPSInfo_i::receive_image().
00033 { 00034 return guid_.guidPrefix[ 8] << 24 | 00035 guid_.guidPrefix[ 9] << 16 | 00036 guid_.guidPrefix[10] << 8 | 00037 guid_.guidPrefix[11]; 00038 }