Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# ACE_Dynamic_Message_Strategy Class Reference

An abstract base class which provides dynamic priority evaluation methods for use by the <ACE_Dynamic_Message_Queue> class or any other class which needs to manage the priorities of a collection of <ACE_Message_Block>s dynamically. More...

`#include <Message_Block.h>`

Inheritance diagram for ACE_Dynamic_Message_Strategy:

[legend]
Collaboration diagram for ACE_Dynamic_Message_Strategy:

[legend]
List of all members.

## Public Types
enum | Priority_Status { PENDING = 0x01, LATE = 0x02, BEYOND_LATE = 0x04, ANY_STATUS = 0x07 }
## Public Methods
| ACE_Dynamic_Message_Strategy (u_long static_bit_field_mask, u_long static_bit_field_shift, u_long dynamic_priority_max, u_long dynamic_priority_offset)
| Constructor. More...
virtual | ~ACE_Dynamic_Message_Strategy (void)
| Virtual destructor. More...
Priority_Status | priority_status (ACE_Message_Block &mb, const ACE_Time_Value &tv)
| Updates the message's priority and returns its priority status. More...
u_long | static_bit_field_mask (void) const
| Get static bit field mask. More...
void | static_bit_field_mask (u_long)
| Set static bit field mask. More...
u_long | static_bit_field_shift (void) const
| Get left shift value to make room for static bit field. More...
void | static_bit_field_shift (u_long)
| Set left shift value to make room for static bit field. More...
u_long | dynamic_priority_max (void) const
| Get maximum supported priority value. More...
void | dynamic_priority_max (u_long)
| Set maximum supported priority value. More...
u_long | dynamic_priority_offset (void) const
| Get offset to boundary between signed range and unsigned range. More...
void | dynamic_priority_offset (u_long)
| Set offset to boundary between signed range and unsigned range. More...
virtual void | dump (void) const
| Dump the state of the strategy. More...
## Protected Methods
virtual void | convert_priority (ACE_Time_Value &priority, const ACE_Message_Block &mb)=0
| Hook method for dynamic priority conversion. More...
## Protected Attributes
u_long | static_bit_field_mask_
| This is a bit mask with all ones in the static bit field. More...
u_long | static_bit_field_shift_
| This is a left shift value to make room for static bit field: this value should be the logarithm base 2 of (static_bit_field_mask_ + 1). More...
u_long | dynamic_priority_max_
| Maximum supported priority value. More...
u_long | dynamic_priority_offset_
| Offset to boundary between signed range and unsigned range. More...
ACE_Time_Value | max_late_
| Maximum late time value that can be represented. More...
ACE_Time_Value | min_pending_
| Minimum pending time value that can be represented. More...
ACE_Time_Value | pending_shift_
| Time value by which to shift pending priority. More...

## Detailed Description

An abstract base class which provides dynamic priority evaluation methods for use by the <ACE_Dynamic_Message_Queue> class or any other class which needs to manage the priorities of a collection of <ACE_Message_Block>s dynamically.

Methods for deadline and laxity based priority evaluation are provided. These methods assume a specific partitioning of the message priority number into a higher order dynamic bit field and a lower order static priority bit field. The default partitioning assumes an unsigned dynamic message priority field of 22 bits and an unsigned static message priority field of 10 bits. This corresponds to the initial values of the static class members. To provide a different partitioning, assign a different set of values to the static class memebers before using the static member functions.

## Member Enumeration Documentation

enum ACE_Dynamic_Message_Strategy::Priority_Status

  | Enumeration values:
  PENDING | Message can still make its deadline.
  LATE | Message cannot make its deadline.
  BEYOND_LATE | Message is so late its priority is undefined.
  ANY_STATUS | Mask to match any priority status.

## Constructor & Destructor Documentation

ACE_Dynamic_Message_Strategy::ACE_Dynamic_Message_Strategy | ( | u_long | static_bit_field_mask,
|  | u_long | static_bit_field_shift,
|  | u_long | dynamic_priority_max,
|  | u_long | dynamic_priority_offset
| ) |

| Constructor.

ACE_Dynamic_Message_Strategy::~ACE_Dynamic_Message_Strategy | ( | void |  | ) | `[virtual]`

| Virtual destructor.

## Member Function Documentation

virtual void ACE_Dynamic_Message_Strategy::convert_priority | ( | ACE_Time_Value & | priority,
|  | const ACE_Message_Block & | mb
| ) | `[protected, pure virtual]`

| Hook method for dynamic priority conversion. Reimplemented in ACE_Deadline_Message_Strategy, and ACE_Laxity_Message_Strategy.

void ACE_Dynamic_Message_Strategy::dump | ( | void |  | ) | const`[virtual]`

| Dump the state of the strategy. Reimplemented in ACE_Deadline_Message_Strategy, and ACE_Laxity_Message_Strategy.

ACE_INLINE void ACE_Dynamic_Message_Strategy::dynamic_priority_max | ( | u_long | ul | ) |

| Set maximum supported priority value.

ACE_INLINE u_long ACE_Dynamic_Message_Strategy::dynamic_priority_max | ( | void |  | ) | const

| Get maximum supported priority value.

ACE_INLINE void ACE_Dynamic_Message_Strategy::dynamic_priority_offset | ( | u_long | ul | ) |

| Set offset to boundary between signed range and unsigned range.

ACE_INLINE u_long ACE_Dynamic_Message_Strategy::dynamic_priority_offset | ( | void |  | ) | const

| Get offset to boundary between signed range and unsigned range.

ACE_INLINE ACE_Dynamic_Message_Strategy::Priority_Status ACE_Dynamic_Message_Strategy::priority_status | ( | ACE_Message_Block & | mb,
|  | const ACE_Time_Value & | tv
| ) |

| Updates the message's priority and returns its priority status.

ACE_INLINE void ACE_Dynamic_Message_Strategy::static_bit_field_mask | ( | u_long | ul | ) |

| Set static bit field mask.

ACE_INLINE u_long ACE_Dynamic_Message_Strategy::static_bit_field_mask | ( | void |  | ) | const

| Get static bit field mask.

ACE_INLINE void ACE_Dynamic_Message_Strategy::static_bit_field_shift | ( | u_long | ul | ) |

| Set left shift value to make room for static bit field.

ACE_INLINE u_long ACE_Dynamic_Message_Strategy::static_bit_field_shift | ( | void |  | ) | const

| Get left shift value to make room for static bit field.

## Member Data Documentation

u_long ACE_Dynamic_Message_Strategy::dynamic_priority_max_`[protected]`

| Maximum supported priority value.

u_long ACE_Dynamic_Message_Strategy::dynamic_priority_offset_`[protected]`

| Offset to boundary between signed range and unsigned range.

ACE_Time_Value ACE_Dynamic_Message_Strategy::max_late_`[protected]`

| Maximum late time value that can be represented.

ACE_Time_Value ACE_Dynamic_Message_Strategy::min_pending_`[protected]`

| Minimum pending time value that can be represented.

ACE_Time_Value ACE_Dynamic_Message_Strategy::pending_shift_`[protected]`

| Time value by which to shift pending priority.

u_long ACE_Dynamic_Message_Strategy::static_bit_field_mask_`[protected]`

| This is a bit mask with all ones in the static bit field.

u_long ACE_Dynamic_Message_Strategy::static_bit_field_shift_`[protected]`

| This is a left shift value to make room for static bit field: this value should be the logarithm base 2 of (static_bit_field_mask_ + 1).

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

- Message_Block.h
- Message_Block.cpp
- Message_Block.i