diff options
Diffstat (limited to 'modules/CIAO/performance-tests/Protocols/Sender/Custom_Network_Priority_Mapping.h')
-rw-r--r-- | modules/CIAO/performance-tests/Protocols/Sender/Custom_Network_Priority_Mapping.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/modules/CIAO/performance-tests/Protocols/Sender/Custom_Network_Priority_Mapping.h b/modules/CIAO/performance-tests/Protocols/Sender/Custom_Network_Priority_Mapping.h new file mode 100644 index 00000000000..fac5d84a433 --- /dev/null +++ b/modules/CIAO/performance-tests/Protocols/Sender/Custom_Network_Priority_Mapping.h @@ -0,0 +1,58 @@ +// $Id$ + +// ============================================================================ +// +// = LIBRARY +// TAO +// +// = FILENAME +// Custom_Network_Priority_Mapping.h +// +// = DESCRIPTION +// 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 : public TAO_Network_Priority_Mapping +{ + // + // = TITLE + // A simple implementation of the Network_Priority_Mapping interface + // + // = DESCRIPTION + // 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) + // +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 */ |