OpenDDS::DCPS::GuidConverter Class Reference

Conversion processing and GUID value testing utilities. More...

#include <GuidUtils.h>

Collaboration diagram for OpenDDS::DCPS::GuidConverter:

Collaboration graph
[legend]
List of all members.

Public Types

 KeyBits = 24
 KeyMask = ((0x1<<KeyBits)-1)
enum  { KeyBits = 24 }
 The GUID_t.entityId.entityKey is 3 bytes. More...
enum  { KeyMask = ((0x1<<KeyBits)-1) }
 And is maskable. More...

Public Member Functions

 GuidConverter (GUID_t &guid)
 Construct from a GUID in order to modify it.
 GuidConverter (GUID_t *guid)
 Construct from a GUID pointer in order to modify it.
 GuidConverter (long federation, long participant)
 Construct with federation and participant id values to form a GUID with.
 operator GUID_t () const
 Copy out a GUID value.
 operator long () const
 Convert to long value.
 operator const char * () const
 Convert to diagnostic string.
long federationId () const
 Extract the federation Id value.
long participantId () const
 Extract the participant unique identifier.
long value () const
 Extract the entity key value.
long vendor () const
 Extract the VendorId value.
EntityKind type () const
 Extract the summary EntityKind value.
CORBA::Octet kind () const
 Access the actual kind octet.
CORBA::Octet & kind ()
CORBA::Octet * key ()
 Access the key value.
bool isBuiltin () const
 The GUID identifies an Entity of a Builtin type.
bool isUser () const
 Thie GUID identifies an Entity defined by the User.
bool isVendor () const
 The GUID identifies an Entity defined by a specific Vendor.
bool isKeyed () const
 The GUID identifies a Reader or Writer that is for a Keyed topic.

Private Attributes

GUID_tguid_
 Reference of a GUID to modify.
GUID_t newGuid_
 GUID formed with handles.
char output_ [64]
 String conversion buffer.

Detailed Description

Conversion processing and GUID value testing utilities.

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 GUID_t values with a specific federation Id and Participant instance handle as well as extracting the Instance handle for an Entity from the GUID_t value. Tests for Entity Kind as well as the type (User v. Builtin) of Entity are also included.

Since the GUID_t type is formed of octets in network order, we do all processing byte by byte to avoid any endian issues.

Currently the GUID_t 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


Member Enumeration Documentation

anonymous enum

The GUID_t.entityId.entityKey is 3 bytes.

Enumerator:
KeyBits 

anonymous enum

And is maskable.

Enumerator:
KeyMask 


Constructor & Destructor Documentation

OpenDDS::DCPS::GuidConverter::GuidConverter ( GUID_t guid  ) 

Construct from a GUID in order to modify it.

OpenDDS::DCPS::GuidConverter::GuidConverter ( GUID_t guid  ) 

Construct from a GUID pointer in order to modify it.

OpenDDS::DCPS::GuidConverter::GuidConverter ( long  federation,
long  participant 
)

Construct with federation and participant id values to form a GUID with.


Member Function Documentation

long OpenDDS::DCPS::GuidConverter::federationId (  )  const

Extract the federation Id value.

bool OpenDDS::DCPS::GuidConverter::isBuiltin (  )  const

The GUID identifies an Entity of a Builtin type.

bool OpenDDS::DCPS::GuidConverter::isKeyed (  )  const

The GUID identifies a Reader or Writer that is for a Keyed topic.

bool OpenDDS::DCPS::GuidConverter::isUser (  )  const

Thie GUID identifies an Entity defined by the User.

bool OpenDDS::DCPS::GuidConverter::isVendor (  )  const

The GUID identifies an Entity defined by a specific Vendor.

CORBA::Octet * OpenDDS::DCPS::GuidConverter::key (  ) 

Access the key value.

CORBA::Octet & OpenDDS::DCPS::GuidConverter::kind (  ) 

CORBA::Octet OpenDDS::DCPS::GuidConverter::kind (  )  const

Access the actual kind octet.

OpenDDS::DCPS::GuidConverter::operator const char * (  )  const

Convert to diagnostic string.

OpenDDS::DCPS::GuidConverter::operator GUID_t (  )  const

Copy out a GUID value.

OpenDDS::DCPS::GuidConverter::operator long (  )  const

Convert to long value.

long OpenDDS::DCPS::GuidConverter::participantId (  )  const

Extract the participant unique identifier.

EntityKind OpenDDS::DCPS::GuidConverter::type (  )  const

Extract the summary EntityKind value.

long OpenDDS::DCPS::GuidConverter::value (  )  const

Extract the entity key value.

long OpenDDS::DCPS::GuidConverter::vendor (  )  const

Extract the VendorId value.


Member Data Documentation

GUID_t& OpenDDS::DCPS::GuidConverter::guid_ [private]

Reference of a GUID to modify.

GUID_t OpenDDS::DCPS::GuidConverter::newGuid_ [private]

GUID formed with handles.

char OpenDDS::DCPS::GuidConverter::output_[64] [mutable, private]

String conversion buffer.


The documentation for this class was generated from the following files:
Generated on Fri Nov 7 09:37:36 2008 for OpenDDS by  doxygen 1.4.7