00001 /* 00002 * 00003 * 00004 * Distributed under the OpenDDS License. 00005 * See: http://www.opendds.org/license.html 00006 */ 00007 00008 #include "DCPS/DdsDcps_pch.h" //Only the _pch include should start with DCPS/ 00009 00010 #include "RepoIdConverter.h" 00011 00012 namespace OpenDDS { 00013 namespace DCPS { 00014 00015 RepoIdConverter::RepoIdConverter(const RepoId& repoId) 00016 : GuidConverter(repoId) 00017 {} 00018 00019 RepoIdConverter::~RepoIdConverter() 00020 {} 00021 00022 OpenDDS::Federator::RepoKey 00023 RepoIdConverter::federationId() const 00024 { 00025 return guid_.guidPrefix[4] << 24 | 00026 guid_.guidPrefix[5] << 16 | 00027 guid_.guidPrefix[6] << 8 | 00028 guid_.guidPrefix[7]; 00029 } 00030 00031 ParticipantId 00032 RepoIdConverter::participantId() const 00033 { 00034 return guid_.guidPrefix[ 8] << 24 | 00035 guid_.guidPrefix[ 9] << 16 | 00036 guid_.guidPrefix[10] << 8 | 00037 guid_.guidPrefix[11]; 00038 } 00039 00040 } // namespace DCPS 00041 } // namespace OpenDDS