OpenDDS
Snapshot(2023/04/07-19:43)
|
Encapsulate a TRANSPORT_PRIORITY value. More...
#include <PriorityMapper.h>
Public Member Functions | |
PriorityMapper (Priority priority=0) | |
Construct with a priority value. More... | |
virtual | ~PriorityMapper () |
Priority & | priority () |
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... | |
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.
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.
|
virtual |
Definition at line 17 of file PriorityMapper.cpp.
References OPENDDS_END_VERSIONED_NAMESPACE_DECL.
|
pure virtual |
Access the mapped DiffServ codepoint value.
Implemented in OpenDDS::DCPS::DirectPriorityMapper.
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().
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_.
|
pure virtual |
Access the mapped thread priority value.
Implemented in OpenDDS::DCPS::DirectPriorityMapper.
|
private |
The TRANSPORT_PRIORITY value.
Definition at line 58 of file PriorityMapper.h.
Referenced by priority().