OpenDDS::DCPS::PriorityMapper Class Reference

Encapsulate a TRANSPORT_PRIORITY value. More...

#include <PriorityMapper.h>

Inheritance diagram for OpenDDS::DCPS::PriorityMapper:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 PriorityMapper (Priority priority=0)
 Construct with a priority value.
virtual ~PriorityMapper ()
 Virtual destructor.
Prioritypriority ()
 Accessors for the TRANSPORT_PRIORITY value.
Priority priority () const
virtual short codepoint () const =0
 Access the mapped DiffServ codepoint value.
virtual short thread_priority () const =0
 Access the mapped thread priority value.

Private Attributes

Priority priority_
 The TRANSPORT_PRIORITY value.

Detailed Description

Encapsulate a TRANSPORT_PRIORITY value.

This interface allows a TRANSPORT_PRIORIY value to be mapped to values to use as DiffServ codepoint and thread priority values. Specific implementations of this interface can define specific mapping algorithms for conversion from the basic TRANSPORT_PRIORITY value to the values to use for network and thread prirorities.

We take our cue from the RTCORBA code base in defining the types of the priority values mapped to. RTCORBA defines both the network and thread priority values as shorts. Since this is well within the expected range of priority values to be mapped to and the short value can be expanded into larger types without complaint, this priority type should be without problem here.

Definition at line 37 of file PriorityMapper.h.


Constructor & Destructor Documentation

ACE_INLINE OpenDDS::DCPS::PriorityMapper::PriorityMapper ( Priority  priority = 0  ) 

Construct with a priority value.

Definition at line 12 of file PriorityMapper.inl.

00013   : priority_(priority)
00014 {
00015 }

OpenDDS::DCPS::PriorityMapper::~PriorityMapper (  )  [virtual]

Virtual destructor.

Definition at line 15 of file PriorityMapper.cpp.

00016 {
00017 }


Member Function Documentation

virtual short OpenDDS::DCPS::PriorityMapper::codepoint (  )  const [pure virtual]

Access the mapped DiffServ codepoint value.

Implemented in OpenDDS::DCPS::DirectPriorityMapper.

ACE_INLINE Priority OpenDDS::DCPS::PriorityMapper::priority (  )  const

Definition at line 26 of file PriorityMapper.inl.

References priority_.

00027 {
00028   return this->priority_;
00029 }

ACE_INLINE Priority & OpenDDS::DCPS::PriorityMapper::priority (  ) 

Accessors for the TRANSPORT_PRIORITY value.

Definition at line 19 of file PriorityMapper.inl.

References priority_.

Referenced by OpenDDS::DCPS::DirectPriorityMapper::thread_priority().

00020 {
00021   return this->priority_;
00022 }

virtual short OpenDDS::DCPS::PriorityMapper::thread_priority (  )  const [pure virtual]

Access the mapped thread priority value.

Implemented in OpenDDS::DCPS::DirectPriorityMapper.


Member Data Documentation

Priority OpenDDS::DCPS::PriorityMapper::priority_ [private]

The TRANSPORT_PRIORITY value.

Definition at line 57 of file PriorityMapper.h.

Referenced by priority().


The documentation for this class was generated from the following files:
Generated on Fri Feb 12 20:06:28 2016 for OpenDDS by  doxygen 1.4.7