#include <MulticastInst.h>
Definition at line 26 of file MulticastInst.h.
OpenDDS::DCPS::MulticastInst::MulticastInst | ( | const std::string & | name | ) | [explicit, private] |
Definition at line 51 of file MulticastInst.cpp.
References default_group_address(), defined(), group_address_, if(), ACE_Time_Value::msec(), nak_interval_, nak_timeout_, syn_interval_, and syn_timeout_.
00052 : TransportInst("multicast", name), 00053 default_to_ipv6_(DEFAULT_TO_IPV6), 00054 port_offset_(DEFAULT_PORT_OFFSET), 00055 reliable_(DEFAULT_RELIABLE), 00056 syn_backoff_(DEFAULT_SYN_BACKOFF), 00057 nak_depth_(DEFAULT_NAK_DEPTH), 00058 nak_delay_intervals_(DEFAULT_NAK_DELAY_INTERVALS), 00059 nak_max_(DEFAULT_NAK_MAX), 00060 ttl_(DEFAULT_TTL), 00061 #if defined (ACE_DEFAULT_MAX_SOCKET_BUFSIZ) 00062 rcv_buffer_size_(ACE_DEFAULT_MAX_SOCKET_BUFSIZ), 00063 #else 00064 // Use system default values. 00065 rcv_buffer_size_(0), 00066 #endif 00067 async_send_(DEFAULT_ASYNC_SEND) 00068 { 00069 default_group_address(this->group_address_); 00070 00071 this->syn_interval_.msec(DEFAULT_SYN_INTERVAL); 00072 this->syn_timeout_.msec(DEFAULT_SYN_TIMEOUT); 00073 00074 this->nak_interval_.msec(DEFAULT_NAK_INTERVAL); 00075 this->nak_timeout_.msec(DEFAULT_NAK_TIMEOUT); 00076 }
bool OpenDDS::DCPS::MulticastInst::async_send | ( | ) | const [inline] |
Definition at line 116 of file MulticastInst.h.
Referenced by OpenDDS::DCPS::MulticastSendStrategy::send_bytes_i().
00116 { return this->async_send_; }
void OpenDDS::DCPS::MulticastInst::default_group_address | ( | ACE_INET_Addr & | group_address | ) | [private] |
Definition at line 137 of file MulticastInst.cpp.
References default_to_ipv6_, port_offset_, and ACE_INET_Addr::set().
Referenced by load(), and MulticastInst().
00138 { 00139 if (this->default_to_ipv6_) { 00140 group_address.set(this->port_offset_, DEFAULT_IPV6_GROUP_ADDRESS); 00141 } else { 00142 group_address.set(this->port_offset_, DEFAULT_IPV4_GROUP_ADDRESS); 00143 } 00144 }
OPENDDS_STRING OpenDDS::DCPS::MulticastInst::dump_to_str | ( | ) | const [virtual] |
Diagnostic aid.
Reimplemented from OpenDDS::DCPS::TransportInst.
Definition at line 153 of file MulticastInst.cpp.
References async_send_, default_to_ipv6_, OpenDDS::DCPS::TransportInst::formatNameForDump(), ACE_INET_Addr::get_host_addr(), ACE_INET_Addr::get_port_number(), group_address_, local_address_, ACE_Time_Value::msec(), nak_delay_intervals_, nak_depth_, nak_interval_, nak_max_, nak_timeout_, OPENDDS_STRING, port_offset_, rcv_buffer_size_, reliable_, syn_backoff_, syn_interval_, syn_timeout_, and ttl_.
00154 { 00155 std::ostringstream os; 00156 os << TransportInst::dump_to_str() << std::endl; 00157 00158 os << formatNameForDump("group_address") << this->group_address_.get_host_addr() 00159 << ":" << this->group_address_.get_port_number() << std::endl; 00160 os << formatNameForDump("local_address") << this->local_address_ << std::endl; 00161 os << formatNameForDump("default_to_ipv6") << (this->default_to_ipv6_ ? "true" : "false") << std::endl; 00162 os << formatNameForDump("port_offset") << this->port_offset_ << std::endl; 00163 os << formatNameForDump("reliable") << (this->reliable_ ? "true" : "false") << std::endl; 00164 os << formatNameForDump("syn_backoff") << this->syn_backoff_ << std::endl; 00165 os << formatNameForDump("syn_interval") << this->syn_interval_.msec() << std::endl; 00166 os << formatNameForDump("syn_timeout") << this->syn_timeout_.msec() << std::endl; 00167 os << formatNameForDump("nak_depth") << this->nak_depth_ << std::endl; 00168 os << formatNameForDump("nak_interval") << this->nak_interval_.msec() << std::endl; 00169 os << formatNameForDump("nak_delay_intervals") << this->nak_delay_intervals_ << std::endl; 00170 os << formatNameForDump("nak_max") << this->nak_max_ << std::endl; 00171 os << formatNameForDump("nak_timeout") << this->nak_timeout_.msec() << std::endl; 00172 os << formatNameForDump("ttl") << int(this->ttl_) << std::endl; 00173 os << formatNameForDump("rcv_buffer_size"); 00174 00175 if (this->rcv_buffer_size_ == 0) { 00176 os << "System Default Value" << std::endl; 00177 } else { 00178 os << this->rcv_buffer_size_ << std::endl; 00179 } 00180 00181 os << formatNameForDump("async_send"); 00182 00183 #if defined (ACE_WIN32) && defined (ACE_HAS_WIN32_OVERLAPPED_IO) 00184 os << (this->async_send_ ? "true" : "false") << std::endl; 00185 #else 00186 os << "Not Supported on this Platform" << std::endl; 00187 #endif 00188 return OPENDDS_STRING(os.str()); 00189 }
bool OpenDDS::DCPS::MulticastInst::is_reliable | ( | ) | const [inline, virtual] |
Does the transport as configured support RELIABLE_RELIABILITY_QOS?
Implements OpenDDS::DCPS::TransportInst.
Definition at line 114 of file MulticastInst.h.
Referenced by populate_locator().
00114 { return this->reliable_; }
int OpenDDS::DCPS::MulticastInst::load | ( | ACE_Configuration_Heap & | cf, | |
ACE_Configuration_Section_Key & | sect | |||
) | [virtual] |
Overwrite the default configurations with the configuration from the given section in the ACE_Configuration_Heap object.
Reimplemented from OpenDDS::DCPS::TransportInst.
Definition at line 79 of file MulticastInst.cpp.
References ACE_TEXT(), async_send_, ACE_String_Base< ACE_CHAR_T >::c_str(), default_group_address(), default_to_ipv6_, GET_CONFIG_STRING_VALUE, GET_CONFIG_TIME_VALUE, GET_CONFIG_TSTRING_VALUE, GET_CONFIG_VALUE, group_address_, ACE_String_Base< ACE_CHAR_T >::is_empty(), local_address_, nak_delay_intervals_, nak_depth_, nak_interval_, nak_max_, nak_timeout_, port_offset_, rcv_buffer_size_, reliable_, ACE_INET_Addr::set(), syn_backoff_, syn_interval_, syn_timeout_, and ttl_.
00081 { 00082 TransportInst::load(cf, sect); // delegate to parent 00083 00084 GET_CONFIG_VALUE(cf, sect, ACE_TEXT("default_to_ipv6"), 00085 this->default_to_ipv6_, bool) 00086 00087 GET_CONFIG_VALUE(cf, sect, ACE_TEXT("port_offset"), 00088 this->port_offset_, u_short) 00089 00090 ACE_TString group_address_s; 00091 GET_CONFIG_TSTRING_VALUE(cf, sect, ACE_TEXT("group_address"), 00092 group_address_s) 00093 if (group_address_s.is_empty()) { 00094 // TODO: Passing 0 instead of transport id. Does this cause complications? 00095 default_group_address(this->group_address_); 00096 } else { 00097 this->group_address_.set(group_address_s.c_str()); 00098 } 00099 00100 GET_CONFIG_STRING_VALUE(cf, sect, ACE_TEXT("local_address"), 00101 this->local_address_); 00102 00103 GET_CONFIG_VALUE(cf, sect, ACE_TEXT("reliable"), this->reliable_, bool) 00104 00105 GET_CONFIG_VALUE(cf, sect, ACE_TEXT("syn_backoff"), 00106 this->syn_backoff_, double) 00107 00108 GET_CONFIG_TIME_VALUE(cf, sect, ACE_TEXT("syn_interval"), this->syn_interval_) 00109 00110 GET_CONFIG_TIME_VALUE(cf, sect, ACE_TEXT("syn_timeout"), this->syn_timeout_) 00111 00112 GET_CONFIG_VALUE(cf, sect, ACE_TEXT("nak_depth"), 00113 this->nak_depth_, size_t) 00114 00115 GET_CONFIG_TIME_VALUE(cf, sect, ACE_TEXT("nak_interval"), this->nak_interval_) 00116 00117 GET_CONFIG_VALUE(cf, sect, ACE_TEXT("nak_delay_intervals"), 00118 this->nak_delay_intervals_, size_t) 00119 00120 GET_CONFIG_VALUE(cf, sect, ACE_TEXT("nak_max"), this->nak_max_, size_t) 00121 00122 GET_CONFIG_TIME_VALUE(cf, sect, ACE_TEXT("nak_timeout"), this->nak_timeout_) 00123 00124 GET_CONFIG_VALUE(cf, sect, ACE_TEXT("ttl"), this->ttl_, unsigned char) 00125 00126 GET_CONFIG_VALUE(cf, sect, ACE_TEXT("rcv_buffer_size"), 00127 this->rcv_buffer_size_, size_t) 00128 00129 #if defined (ACE_WIN32) && defined (ACE_HAS_WIN32_OVERLAPPED_IO) 00130 GET_CONFIG_VALUE(cf, sect, ACE_TEXT("async_send"), this->async_send_, bool) 00131 #endif 00132 00133 return 0; 00134 }
TransportImpl_rch OpenDDS::DCPS::MulticastInst::new_impl | ( | ) | [private, virtual] |
Implements OpenDDS::DCPS::TransportInst.
Definition at line 147 of file MulticastInst.cpp.
References OpenDDS::DCPS::ref().
00148 { 00149 return make_rch<MulticastTransport>(ref(*this)); 00150 }
size_t OpenDDS::DCPS::MulticastInst::populate_locator | ( | OpenDDS::DCPS::TransportLocator & | trans_info | ) | const [virtual] |
Populate a transport locator sequence. Return the number of "locators.".
Implements OpenDDS::DCPS::TransportInst.
Definition at line 192 of file MulticastInst.cpp.
References ACE_OutputCDR::buffer(), OpenDDS::DCPS::TransportLocator::data, group_address_, is_reliable(), len, ACE_OutputCDR::total_length(), and OpenDDS::DCPS::TransportLocator::transport_type.
Referenced by OpenDDS::DCPS::MulticastTransport::connection_info_i().
00193 { 00194 if (this->group_address_ != ACE_INET_Addr()) { 00195 NetworkAddress network_address(this->group_address_); 00196 00197 ACE_OutputCDR cdr; 00198 cdr << network_address; 00199 cdr << ACE_OutputCDR::from_boolean (ACE_CDR::Boolean (this->is_reliable ())); 00200 00201 const CORBA::ULong len = static_cast<CORBA::ULong>(cdr.total_length()); 00202 char* buffer = const_cast<char*>(cdr.buffer()); // safe 00203 00204 info.transport_type = "multicast"; 00205 info.data = TransportBLOB(len, len, reinterpret_cast<CORBA::Octet*>(buffer)); 00206 return 1; 00207 } else { 00208 return 0; 00209 } 00210 }
friend class MulticastType [friend] |
Definition at line 121 of file MulticastInst.h.
RcHandle<T> OpenDDS::DCPS::make_rch | ( | U const & | ) | [friend] |
Sending using asynchronous I/O on Windows platforms that support it. The default value is: false. This parameter has no effect on non-Windows platforms and Windows platforms that don't support asynchronous I/O.
Definition at line 106 of file MulticastInst.h.
Referenced by OpenDDS::DCPS::MulticastTransport::configure_i(), dump_to_str(), and load().
Enables IPv6 default group address selection. The default value is: false.
Definition at line 31 of file MulticastInst.h.
Referenced by default_group_address(), dump_to_str(), and load().
The multicast group to join to send/receive data. The default value is: 224.0.0.128:<port> [IANA 2009-11-17], or [FF01::80]:<port> [IANA 2009-08-28]
Definition at line 41 of file MulticastInst.h.
Referenced by OpenDDS::DCPS::MulticastSendStrategy::async_send(), OpenDDS::DCPS::MulticastTransport::configure_i(), dump_to_str(), load(), OpenDDS::DCPS::MulticastTransport::make_datalink(), MulticastInst(), and populate_locator().
std::string OpenDDS::DCPS::MulticastInst::local_address_ |
If non-empty, the address to pass to ACE which indicates the local network interface which should be used for joining the multicast group.
Definition at line 46 of file MulticastInst.h.
Referenced by OpenDDS::DCPS::MulticastTransport::configure_i(), dump_to_str(), OpenDDS::DCPS::MulticastDataLink::join(), and load().
The number of interval's between nak's for a sample (after initial nak). The default value is: 4.
Definition at line 81 of file MulticastInst.h.
Referenced by dump_to_str(), load(), and OpenDDS::DCPS::ReliableSession::send_naks().
The number of datagrams to retain in order to service repair requests (reliable only). The default value is: 32.
Definition at line 71 of file MulticastInst.h.
Referenced by dump_to_str(), load(), and OpenDDS::DCPS::MulticastDataLink::MulticastDataLink().
The minimum number of milliseconds to wait between repair requests (reliable only). The default value is: 500.
Definition at line 76 of file MulticastInst.h.
Referenced by dump_to_str(), load(), MulticastInst(), and OpenDDS::DCPS::NakWatchdog::next_interval().
The maximum number of a missing sample will be nak'ed. The default value is: 3.
Definition at line 85 of file MulticastInst.h.
Referenced by dump_to_str(), load(), and OpenDDS::DCPS::ReliableSession::send_naks().
The maximum number of milliseconds to wait before giving up on a repair response (reliable only). The default value is: 30000 (30 seconds).
Definition at line 90 of file MulticastInst.h.
Referenced by dump_to_str(), OpenDDS::DCPS::ReliableSession::expire_naks(), load(), and MulticastInst().
The default port number (when group_address is not set) The default value is: 49152 [IANA 2009-11-16].
Definition at line 35 of file MulticastInst.h.
Referenced by default_group_address(), dump_to_str(), and load().
The size of the socket receive buffer. The default value is: ACE_DEFAULT_MAX_SOCKET_BUFSIZ if it's defined, otherwise, 0. If the value is 0, the system default value is used.
Definition at line 100 of file MulticastInst.h.
Referenced by dump_to_str(), OpenDDS::DCPS::MulticastDataLink::join(), and load().
Enables reliable communication. This option will eventually be deprecated. The default value is: true.
Definition at line 51 of file MulticastInst.h.
Referenced by dump_to_str(), and load().
The exponential base used during handshake retries; smaller values yield shorter delays between attempts. The default value is: 2.0.
Definition at line 56 of file MulticastInst.h.
Referenced by dump_to_str(), load(), and OpenDDS::DCPS::SynWatchdog::next_interval().
The minimum number of milliseconds to wait between handshake attempts during association. The default value is: 250.
Definition at line 61 of file MulticastInst.h.
Referenced by dump_to_str(), load(), MulticastInst(), and OpenDDS::DCPS::SynWatchdog::next_interval().
The maximum number of milliseconds to wait before giving up on a handshake response during association. The default value is: 30000 (30 seconds).
Definition at line 66 of file MulticastInst.h.
Referenced by dump_to_str(), load(), MulticastInst(), and OpenDDS::DCPS::SynWatchdog::next_timeout().
unsigned char OpenDDS::DCPS::MulticastInst::ttl_ |
time-to-live. The default value is: 1 (in same subnet)
Definition at line 94 of file MulticastInst.h.
Referenced by dump_to_str(), and load().