ACE
6.3.3
|
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_Blocks dynamically. More...
#include <Dynamic_Message_Strategy.h>
Public Types | |
enum | Priority_Status { PENDING = 0x01, LATE = 0x02, BEYOND_LATE = 0x04, ANY_STATUS = 0x07 } |
Public Member Functions | |
ACE_Dynamic_Message_Strategy (unsigned long static_bit_field_mask, unsigned long static_bit_field_shift, unsigned long dynamic_priority_max, unsigned 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... | |
unsigned long | static_bit_field_mask (void) const |
Get static bit field mask. More... | |
void | static_bit_field_mask (unsigned long) |
Set static bit field mask. More... | |
unsigned long | static_bit_field_shift (void) const |
Get left shift value to make room for static bit field. More... | |
void | static_bit_field_shift (unsigned long) |
Set left shift value to make room for static bit field. More... | |
unsigned long | dynamic_priority_max (void) const |
Get maximum supported priority value. More... | |
void | dynamic_priority_max (unsigned long) |
Set maximum supported priority value. More... | |
unsigned long | dynamic_priority_offset (void) const |
Get offset to boundary between signed range and unsigned range. More... | |
void | dynamic_priority_offset (unsigned 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 Member Functions | |
virtual void | convert_priority (ACE_Time_Value &priority, const ACE_Message_Block &mb)=0 |
Hook method for dynamic priority conversion. More... | |
Protected Attributes | |
unsigned long | static_bit_field_mask_ |
This is a bit mask with all ones in the static bit field. More... | |
unsigned long | static_bit_field_shift_ |
unsigned long | dynamic_priority_max_ |
Maximum supported priority value. More... | |
unsigned 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... | |
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_Blocks 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 members before using the static member functions.
Message priority status Values are defined as bit flags so that status combinations may be specified easily.
Enumerator | |
---|---|
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. |
ACE_Dynamic_Message_Strategy::ACE_Dynamic_Message_Strategy | ( | unsigned long | static_bit_field_mask, |
unsigned long | static_bit_field_shift, | ||
unsigned long | dynamic_priority_max, | ||
unsigned long | dynamic_priority_offset | ||
) |
Constructor.
|
virtual |
Virtual destructor.
|
protectedpure virtual |
Hook method for dynamic priority conversion.
Implemented in ACE_Laxity_Message_Strategy, and ACE_Deadline_Message_Strategy.
|
virtual |
Dump the state of the strategy.
Reimplemented in ACE_Laxity_Message_Strategy, and ACE_Deadline_Message_Strategy.
|
inline |
Get maximum supported priority value.
|
inline |
Set maximum supported priority value.
|
inline |
Get offset to boundary between signed range and unsigned range.
|
inline |
Set offset to boundary between signed range and unsigned range.
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.
|
inline |
Get static bit field mask.
|
inline |
Set static bit field mask.
|
inline |
Get left shift value to make room for static bit field.
|
inline |
Set left shift value to make room for static bit field.
|
protected |
Maximum supported priority value.
|
protected |
Offset to boundary between signed range and unsigned range.
|
protected |
Maximum late time value that can be represented.
|
protected |
Minimum pending time value that can be represented.
|
protected |
Time value by which to shift pending priority.
|
protected |
This is a bit mask with all ones in the static bit field.
|
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).