20 #ifdef OPENDDS_TESTING_FEATURES 23 #define OPENDDS_DRAND48() (rand()*(1./RAND_MAX)) 25 #define OPENDDS_DRAND48 drand48 29 #if !defined (__ACE_INLINE__) 64 ACE_TEXT (
"(%P|%t) WARNING: passive_connect_duration option ")
65 ACE_TEXT (
"is deprecated in the transport inst, must be ")
66 ACE_TEXT (
"defined in transport config.\n")));
77 ACE_TEXT(
"\n(%P|%t) TransportInst::dump() -\n%C"),
82 static const int NAME_INDENT(3);
83 static const int NAME_WIDTH(30);
90 formatted_name.reserve(NAME_INDENT + NAME_WIDTH);
92 formatted_name +=
name;
93 formatted_name +=
":";
94 if ((NAME_WIDTH + NAME_INDENT) > formatted_name.length()) {
95 formatted_name +=
OPENDDS_STRING((NAME_WIDTH + NAME_INDENT- formatted_name.length()),
' ');
97 return formatted_name;
161 const int BUFSIZE=1024;
162 char result[BUFSIZE];
164 if (std::count(addr_str.begin(), addr_str.end(),
':') < 2) {
165 OPENDDS_STRING::size_type pos = addr_str.find_last_of(
":");
166 ACE_OS::snprintf(result, BUFSIZE,
"%.*s:%hu", static_cast<int>(pos), addr_str.c_str(), port_number);
170 if (addr_str[0] !=
'[') {
171 ACE_OS::snprintf(result, BUFSIZE,
"[%s]:%hu", addr_str.c_str(), port_number);
174 OPENDDS_STRING::size_type pos = addr_str.find_last_of(
"]");
175 ACE_OS::snprintf(result, BUFSIZE,
"%.*s:%hu", static_cast<int>(pos+1), addr_str.c_str(), port_number);
232 #ifdef OPENDDS_TESTING_FEATURES 236 ACE_UNUSED_ARG(length);
238 "(%P|%t) ERROR: TransportInst::should_drop: " 239 "caller not conditioned on OPENDDS_TESTING_FEATURES\n"));
size_t receive_preallocated_message_blocks_
TransportImpl_rch get_or_create_impl()
#define ACE_GUARD(MUTEX, OBJ, LOCK)
ACE_UINT32 optimum_packet_size_
Optimum size (in bytes) of a packet (packet header + sample(s)).
const OPENDDS_STRING name_
virtual int get_string_value(const ACE_Configuration_Section_Key &key, const ACE_TCHAR *name, ACE_TString &value)
void set_port_in_addr_string(OPENDDS_STRING &addr_str, u_short port_number)
virtual void rtps_relay_only_now(bool)
virtual void use_rtps_relay_now(bool)
RcHandle< EventDispatcher > EventDispatcher_rch
virtual void use_ice_now(bool)
int snprintf(char *buf, size_t maxlen, const char *format,...) ACE_GCC_FORMAT_ATTRIBUTE(printf
String to_dds_string(unsigned short to_convert)
EventDispatcher_rch event_dispatcher()
void dump() const
Diagnostic aid.
const OPENDDS_STRING & name() const
void use_ice_now(bool flag)
void rtps_relay_only_now(bool flag)
ACE_Thread_Mutex config_lock_
RcHandle< TransportImpl > TransportImpl_rch
The type definition for the smart-pointer to the underlying type.
size_t receive_preallocated_data_blocks_
size_t queue_initial_pools_
bool should_drop(ssize_t length) const
size_t max_samples_per_packet_
Max number of samples that should ever be in a single packet.
bool thread_per_connection_
const OPENDDS_STRING transport_type_
TimeDuration fragment_reassembly_timeout_
#define ACE_GUARD_RETURN(MUTEX, OBJ, LOCK, RETURN)
#define GET_CONFIG_VALUE(CF, SECT, KEY, VALUE, TYPE)
virtual TransportImpl_rch new_impl()=0
size_t datalink_control_chunks_
EventDispatcher_rch event_dispatcher()
ACE_UINT32 max_packet_size_
Max size (in bytes) of a packet (packet header + sample(s))
size_t queue_messages_per_pool_
#define GET_CONFIG_TIME_VALUE(CF, SECT, KEY, VALUE)
long datalink_release_delay_
ReactorTask_rch reactor_task()
virtual int load(ACE_Configuration_Heap &cf, ACE_Configuration_Section_Key §)
ReactorTask_rch reactor_task()
TransportImpl_rch get_impl()
#define DBG_ENTRY_LVL(CNAME, MNAME, DBG_LVL)
void adjust_config_value()
String str(unsigned decimal_places=3, bool just_sec=false) const
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
DCPS::WeakRcHandle< ICE::Endpoint > get_ice_endpoint()
static OPENDDS_STRING formatNameForDump(const char *name)
RcHandle< ReactorTask > ReactorTask_rch
The type definition for the smart-pointer to the underlying type.
void use_rtps_relay_now(bool flag)
virtual WeakRcHandle< ICE::Endpoint > get_ice_endpoint()
virtual OPENDDS_STRING dump_to_str() const