summaryrefslogtreecommitdiff
path: root/CIAO/performance-tests/Protocols/Sender/Custom_Network_Priority_Mapping.h
blob: 93d67b423c1479f91a0855e1ab480f8e4650f46f (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

//=============================================================================
/**
 *  @file   Custom_Network_Priority_Mapping.h
 *
 * Declares the Custom_Network_Priority_Mapping interface,
 *
 *  @author Yamuna Krishnamurthy (yamuna@oomworks.com)
 */
//=============================================================================


#ifndef CUSTOM_NETWORK_PRIORITY_MAPPING_H
#define CUSTOM_NETWORK_PRIORITY_MAPPING_H

#include /**/ "ace/pre.h"
#include "tao/RTCORBA/Network_Priority_Mapping.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

/**
 * @class Custom_Network_Priority_Mapping
 *
 * @brief A simple implementation of the Network_Priority_Mapping interface
 *
 * This implementation uses custom 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)
 */
class Custom_Network_Priority_Mapping : public TAO_Network_Priority_Mapping
{
public:
  Custom_Network_Priority_Mapping (void);

  CORBA::Boolean to_network (RTCORBA::Priority corba_priority,
                             RTCORBA::NetworkPriority &network_priority);

  CORBA::Boolean to_CORBA (RTCORBA::NetworkPriority network_priority,
                           RTCORBA::Priority &corba_priority);

  void corba_priority (RTCORBA::Priority corba_priority);

 private:
  RTCORBA::Priority corba_priority_;
};


#include /**/ "ace/post.h"
#endif /* CUSTOM_NETWORK_PRIORITY_MAPPING_H */