blob: 7d0f6fa41268e064e08a5fcbd370cd51647d1d1d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
// $Id$
// ============================================================================
//
// = LIBRARY
// TAO
//
// = FILENAME
// Linear_Network_Priority_Mapping.h
//
// = DESCRIPTION
// Declares the Linear_Network_Priority_Mapping interface,
//
// = AUTHOR
// Yamuna Krishnamurthy (yamuna@oomworks.com)
//
// ============================================================================
#ifndef TAO_LINEAR_NETWORK_PRIORITY_MAPPING_H
#define TAO_LINEAR_NETWORK_PRIORITY_MAPPING_H
#include /**/ "ace/pre.h"
#include "tao/orbconf.h"
#include "rtcorba_export.h"
#include "Network_Priority_Mapping.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
#if defined (TAO_HAS_CORBA_MESSAGING) && TAO_HAS_CORBA_MESSAGING != 0
class TAO_RTCORBA_Export TAO_Linear_Network_Priority_Mapping : public TAO_Network_Priority_Mapping
{
//
// = TITLE
// A simple implementation of the Network_Priority_Mapping interface
//
// = DESCRIPTION
// This implementation uses linear mapping between the range of
// priorities for a given scheduling class (ACE_SCHED_OTHER,
// ACE_SCHED_FIFO, ACE_SCHED_RR) and the valid range of CORBA
// priorities (0...32767)
//
public:
TAO_Linear_Network_Priority_Mapping (long policy);
// Default constructor
virtual ~TAO_Linear_Network_Priority_Mapping (void);
// The destructor
virtual CORBA::Boolean
to_network (RTCORBA::Priority corba_priority,
RTCORBA::NetworkPriority &network_priority);
virtual CORBA::Boolean
to_CORBA (RTCORBA::NetworkPriority network_priority,
RTCORBA::Priority &corba_priority);
private:
long policy_;
// The scheduling policy
int min_;
int max_;
int increment_;
};
#if defined (__ACE_INLINE__)
# include "Linear_Network_Priority_Mapping.i"
#endif /* __ACE_INLINE__ */
#endif /* TAO_HAS_CORBA_MESSAGING && TAO_HAS_CORBA_MESSAGING != 0 */
#include /**/ "ace/post.h"
#endif /* TAO_LINEAR_NETWORK_PRIORITY_MAPPING_H */
|