OpenDDS  Snapshot(2023/04/07-19:43)
Public Member Functions | Private Attributes | List of all members
OpenDDS::DCPS::PriorityMapper Class Referenceabstract

Encapsulate a TRANSPORT_PRIORITY value. More...

#include <PriorityMapper.h>

Inheritance diagram for OpenDDS::DCPS::PriorityMapper:
Inheritance graph
[legend]

Public Member Functions

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

Private Attributes

Priority priority_
 The TRANSPORT_PRIORITY value. More...
 

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 39 of file PriorityMapper.h.

Constructor & Destructor Documentation

◆ PriorityMapper()

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

Construct with a priority value.

Definition at line 14 of file PriorityMapper.inl.

References ACE_INLINE.

16 {
17 }
Priority & priority()
Accessors for the TRANSPORT_PRIORITY value.
Priority priority_
The TRANSPORT_PRIORITY value.

◆ ~PriorityMapper()

OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL OpenDDS::DCPS::PriorityMapper::~PriorityMapper ( )
virtual

Definition at line 17 of file PriorityMapper.cpp.

References OPENDDS_END_VERSIONED_NAMESPACE_DECL.

18 {
19 }

Member Function Documentation

◆ codepoint()

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

Access the mapped DiffServ codepoint value.

Implemented in OpenDDS::DCPS::DirectPriorityMapper.

◆ priority() [1/2]

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

Accessors for the TRANSPORT_PRIORITY value.

Definition at line 21 of file PriorityMapper.inl.

References ACE_INLINE, and priority_.

Referenced by OpenDDS::DCPS::DirectPriorityMapper::codepoint(), and OpenDDS::DCPS::DirectPriorityMapper::thread_priority().

22 {
23  return this->priority_;
24 }
Priority priority_
The TRANSPORT_PRIORITY value.

◆ priority() [2/2]

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

Definition at line 28 of file PriorityMapper.inl.

References OPENDDS_END_VERSIONED_NAMESPACE_DECL, and priority_.

29 {
30  return this->priority_;
31 }
Priority priority_
The TRANSPORT_PRIORITY value.

◆ thread_priority()

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_

Priority OpenDDS::DCPS::PriorityMapper::priority_
private

The TRANSPORT_PRIORITY value.

Definition at line 58 of file PriorityMapper.h.

Referenced by priority().


The documentation for this class was generated from the following files: