OpenDDS::DCPS::RepoIdConverter Class Reference

Conversion processing and value testing utilities for DCPS Information Repository identifiers. More...

#include <RepoIdConverter.h>

Inheritance diagram for OpenDDS::DCPS::RepoIdConverter:
Inheritance graph
[legend]
Collaboration diagram for OpenDDS::DCPS::RepoIdConverter:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 RepoIdConverter (const RepoId &repoId)
 ~RepoIdConverter ()
OpenDDS::Federator::RepoKey federationId () const
 Get the federeation id from the GUID.
ParticipantId participantId () const
 Get the participant id from the GUID.

Detailed Description

Conversion processing and value testing utilities for DCPS Information Repository identifiers.

This class encapsulates the conversion of a GUID_t value to and from other types used within OpenDDS.

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 67 of file RepoIdConverter.h.


Constructor & Destructor Documentation

OpenDDS::DCPS::RepoIdConverter::RepoIdConverter ( const RepoId repoId  ) 

Definition at line 17 of file RepoIdConverter.cpp.

00018   : GuidConverter(repoId)
00019 {}

OpenDDS::DCPS::RepoIdConverter::~RepoIdConverter (  ) 

Definition at line 21 of file RepoIdConverter.cpp.

00022 {}


Member Function Documentation

OpenDDS::Federator::RepoKey OpenDDS::DCPS::RepoIdConverter::federationId (  )  const

Get the federeation id from the GUID.

Definition at line 25 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(), and TAO_DDS_DCPSInfo_i::add_topic().

00026 {
00027   return guid_.guidPrefix[4] << 24 |
00028          guid_.guidPrefix[5] << 16 |
00029          guid_.guidPrefix[6] <<  8 |
00030          guid_.guidPrefix[7];
00031 }

Here is the caller graph for this function:

ParticipantId OpenDDS::DCPS::RepoIdConverter::participantId (  )  const

Get the participant id from the GUID.

Definition at line 34 of file RepoIdConverter.cpp.

References OpenDDS::DCPS::GuidConverter::guid_, and OpenDDS::DCPS::GUID_t::guidPrefix.

Referenced by TAO_DDS_DCPSInfo_i::add_domain_participant().

00035 {
00036   return guid_.guidPrefix[ 8] << 24 |
00037          guid_.guidPrefix[ 9] << 16 |
00038          guid_.guidPrefix[10] <<  8 |
00039          guid_.guidPrefix[11];
00040 }

Here is the caller graph for this function:


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 10 Aug 2018 for OpenDDS by  doxygen 1.6.1