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

ATM_QoS.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //==========================================================================
00004 /**
00005  *  @file    ATM_QoS.h
00006  *
00007  *  $Id: ATM_QoS.h,v 1.1.1.4 2003/02/21 18:36:32 chad Exp $
00008  *
00009  *  @author Joe Hoffert
00010  */
00011 //==========================================================================
00012 
00013 
00014 #ifndef ACE_ATM_QoS_H
00015 #define ACE_ATM_QoS_H
00016 #include "ace/pre.h"
00017 
00018 #include "ace/config-all.h"
00019 
00020 #if !defined(ACE_LACKS_PRAGMA_ONCE)
00021 #pragma once
00022 #endif /* ACE_LACKS_PRAGMA_ONCE */
00023 
00024 #if defined (ACE_HAS_ATM)
00025 
00026 #if defined (ACE_HAS_FORE_ATM_WS2)
00027 // just map to WS2 GQOS struct
00028 typedef ACE_QoS ATM_QoS;
00029 #elif defined (ACE_HAS_FORE_ATM_XTI)
00030 typedef struct netbuf ATM_QoS;
00031 #elif defined (ACE_HAS_LINUX_ATM)
00032 #include /**/ "atm.h"
00033 #include "ATM_Params.h"
00034 typedef struct atm_qos ATM_QoS;
00035 #else
00036 typedef int ATM_QoS;
00037 #endif /* ACE_HAS_FORE_ATM_WS2 || ACE_HAS_FORE_ATM_XTI || ACE_HAS_LINUX_ATM */
00038 
00039 /**
00040  * @class ACE_ATM_QoS
00041  *
00042  * @brief Define the QoS parameters for ATM
00043  *
00044  * This class wraps up QoS parameters for both ATM/XTI and
00045  * ATM/WinSock2 to make the mechanism for the ATM protocol
00046  * transparent.
00047  */
00048 class ACE_Export ACE_ATM_QoS
00049 {
00050 public:
00051   // Constants used for ATM options
00052   static const long LINE_RATE;
00053   static const int OPT_FLAGS_CPID;
00054   static const int OPT_FLAGS_PMP;
00055   static const int DEFAULT_SELECTOR;
00056   static const int DEFAULT_PKT_SIZE;
00057 
00058   // = Initializattion and termination methods.
00059   /// Default constructor.
00060   ACE_ATM_QoS(int = DEFAULT_PKT_SIZE);
00061 
00062   /// Constructor with a CBR rate.
00063   ACE_ATM_QoS(int,
00064               int = DEFAULT_PKT_SIZE);
00065 
00066   ~ACE_ATM_QoS ();
00067 
00068   /// Set the rate.
00069   void set_rate (ACE_HANDLE,
00070                  int,
00071                  int);
00072 
00073   /// Set CBR rate in cells per second.
00074   void set_cbr_rate (int,
00075                      int = DEFAULT_PKT_SIZE);
00076 
00077   /// Get ATM_QoS struct.
00078   ATM_QoS get_qos (void);
00079 
00080   /// Dump the state of an object.
00081   void dump (void) const;
00082 
00083   /// Declare the dynamic allocation hooks.
00084   ACE_ALLOC_HOOK_DECLARE;
00085 
00086 protected:
00087   /// Construct QoS options.
00088   char* construct_options(ACE_HANDLE,
00089                           int,
00090                           int,
00091                           long*);
00092 
00093 private:
00094   ATM_QoS qos_;
00095 };
00096 
00097 #if defined (__ACE_INLINE__)
00098 #include "ace/ATM_QoS.i"
00099 #endif /* __ACE_INLINE__ */
00100 
00101 #endif /* ACE_HAS_ATM */
00102 #include "ace/post.h"
00103 #endif /* ACE_ATM_QoS_H */

Generated on Mon Jun 16 11:19:09 2003 for ACE by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002