Parameters.h

Go to the documentation of this file.
00001 // file      : ace/RMCast/Parameters.h
00002 // author    : Boris Kolpackov <boris@kolpackov.net>
00003 // cvs-id    : Parameters.h,v 1.2 2005/10/16 14:31:48 schmidt Exp
00004 
00005 #ifndef ACE_RMCAST_PARAMETERS_H
00006 #define ACE_RMCAST_PARAMETERS_H
00007 
00008 #include "ace/Time_Value.h"
00009 
00010 
00011 namespace ACE_RMCast
00012 {
00013   class Parameters
00014   {
00015   public:
00016     Parameters (
00017       // Loss and reordering simulator.
00018       //
00019       bool simulator = false,
00020 
00021       // MTU(1500) - IP-hdr - UDP-hdr
00022       //
00023       unsigned short max_packet_size = 1470,
00024 
00025       // How often various worker threads wakeup to do
00026       // cacellation checks, queue run-throughs, etc.
00027       //
00028       ACE_Time_Value const& tick  = ACE_Time_Value (0, 2000),
00029 
00030       // How long to wait, in ticks, before sending NAK.
00031       //
00032       unsigned long nak_timeout = 1,
00033 
00034       // How long to wait, in ticks, before sending NRTM.
00035       //
00036       unsigned long nrtm_timeout = 10,
00037 
00038       // How long to retain a message for retransmission, in ticks.
00039       //
00040       unsigned long retention_timeout = 500,  // 1 sec
00041 
00042       size_t addr_map_size = 50
00043     )
00044         : simulator_ (simulator),
00045           max_packet_size_ (max_packet_size),
00046           tick_ (tick),
00047           nak_timeout_ (nak_timeout),
00048           nrtm_timeout_ (nrtm_timeout),
00049           retention_timeout_ (retention_timeout),
00050           addr_map_size_(addr_map_size)
00051     {
00052     }
00053 
00054   public:
00055     bool
00056     simulator () const
00057     {
00058       return simulator_;
00059     }
00060 
00061     unsigned short
00062     max_packet_size () const
00063     {
00064       return max_packet_size_;
00065     }
00066 
00067     ACE_Time_Value const&
00068     tick () const
00069     {
00070       return tick_;
00071     }
00072 
00073     unsigned long
00074     nak_timeout () const
00075     {
00076       return nak_timeout_;
00077     }
00078 
00079     unsigned long
00080     nrtm_timeout () const
00081     {
00082       return nrtm_timeout_;
00083     }
00084 
00085     unsigned long
00086     retention_timeout () const
00087     {
00088       return retention_timeout_;
00089     }
00090 
00091     size_t
00092     addr_map_size () const
00093     {
00094       return addr_map_size_;
00095     }
00096 
00097   private:
00098     bool simulator_;
00099     unsigned short max_packet_size_;
00100     ACE_Time_Value tick_;
00101     unsigned long nak_timeout_;
00102     unsigned long nrtm_timeout_;
00103     unsigned long retention_timeout_;
00104     size_t addr_map_size_;
00105   };
00106 }
00107 
00108 
00109 #endif  // ACE_RMCAST_PARAMETERS_H

Generated on Thu Nov 9 11:40:40 2006 for ACE_RMCast by doxygen 1.3.6