MulticastInst.h

Go to the documentation of this file.
00001 /*
00002  *
00003  *
00004  * Distributed under the OpenDDS License.
00005  * See: http://www.opendds.org/license.html
00006  */
00007 
00008 #ifndef DCPS_MULTICASTINST_H
00009 #define DCPS_MULTICASTINST_H
00010 
00011 #include "Multicast_Export.h"
00012 #include "MulticastTransport.h"
00013 
00014 #include "ace/INET_Addr.h"
00015 #include "ace/Time_Value.h"
00016 
00017 #include "dds/DCPS/transport/framework/TransportInst.h"
00018 
00019 #include <string>
00020 
00021 OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL
00022 
00023 namespace OpenDDS {
00024 namespace DCPS {
00025 
00026 class OpenDDS_Multicast_Export MulticastInst
00027   : public TransportInst {
00028 public:
00029   /// Enables IPv6 default group address selection.
00030   /// The default value is: false.
00031   bool default_to_ipv6_;
00032 
00033   /// The default port number (when group_address is not set)
00034   /// The default value is: 49152 [IANA 2009-11-16].
00035   u_short port_offset_;
00036 
00037   /// The multicast group to join to send/receive data.
00038   /// The default value is:
00039   ///   224.0.0.128:<port> [IANA 2009-11-17], or
00040   ///    [FF01::80]:<port> [IANA 2009-08-28]
00041   ACE_INET_Addr group_address_;
00042 
00043   /// If non-empty, the address to pass to ACE which indicates the
00044   /// local network interface which should be used for joining the
00045   /// multicast group.
00046   std::string local_address_;
00047 
00048   /// Enables reliable communication. This option will eventually
00049   /// be deprecated.
00050   /// The default value is: true.
00051   bool reliable_;
00052 
00053   /// The exponential base used during handshake retries; smaller
00054   /// values yield shorter delays between attempts.
00055   /// The default value is: 2.0.
00056   double syn_backoff_;
00057 
00058   /// The minimum number of milliseconds to wait between handshake
00059   /// attempts during association.
00060   /// The default value is: 250.
00061   ACE_Time_Value syn_interval_;
00062 
00063   /// The maximum number of milliseconds to wait before giving up
00064   /// on a handshake response during association.
00065   /// The default value is: 30000 (30 seconds).
00066   ACE_Time_Value syn_timeout_;
00067 
00068   /// The number of datagrams to retain in order to service repair
00069   /// requests (reliable only).
00070   /// The default value is: 32.
00071   size_t nak_depth_;
00072 
00073   /// The minimum number of milliseconds to wait between repair
00074   /// requests (reliable only).
00075   /// The default value is: 500.
00076   ACE_Time_Value nak_interval_;
00077 
00078   /// The number of interval's between nak's for a sample
00079   /// (after initial nak).
00080   /// The default value is: 4.
00081   size_t nak_delay_intervals_;
00082 
00083   /// The maximum number of a missing sample will be nak'ed.
00084   /// The default value is: 3.
00085   size_t nak_max_;
00086 
00087   /// The maximum number of milliseconds to wait before giving up
00088   /// on a repair response (reliable only).
00089   /// The default value is: 30000 (30 seconds).
00090   ACE_Time_Value nak_timeout_;
00091 
00092   /// time-to-live.
00093   /// The default value is: 1 (in same subnet)
00094   unsigned char ttl_;
00095 
00096   /// The size of the socket receive buffer.
00097   /// The default value is: ACE_DEFAULT_MAX_SOCKET_BUFSIZ if it's defined,
00098   /// otherwise, 0.
00099   /// If the value is 0, the system default value is used.
00100   size_t rcv_buffer_size_;
00101 
00102   /// Sending using asynchronous I/O on Windows platforms that support it.
00103   /// The default value is: false.
00104   /// This parameter has no effect on non-Windows platforms and Windows platforms
00105   /// that don't support asynchronous I/O.
00106   bool async_send_;
00107 
00108   virtual int load(ACE_Configuration_Heap& cf,
00109                    ACE_Configuration_Section_Key& sect);
00110 
00111   /// Diagnostic aid.
00112   virtual OPENDDS_STRING dump_to_str() const;
00113 
00114   bool is_reliable() const { return this->reliable_; }
00115 
00116   bool async_send() const { return this->async_send_; }
00117 
00118   virtual size_t populate_locator(OpenDDS::DCPS::TransportLocator& trans_info) const;
00119 
00120 private:
00121   friend class MulticastType;
00122   template <typename T, typename U>
00123   friend RcHandle<T> OpenDDS::DCPS::make_rch(U const&);
00124   explicit MulticastInst(const std::string& name);
00125 
00126   void default_group_address(ACE_INET_Addr& group_address);
00127 
00128   TransportImpl_rch new_impl();
00129 };
00130 
00131 } // namespace DCPS
00132 } // namespace OpenDDS
00133 
00134 OPENDDS_END_VERSIONED_NAMESPACE_DECL
00135 
00136 #endif  /* DCPS_MULTICASTINST_H */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 10 Aug 2018 for OpenDDS by  doxygen 1.6.1