OpenDDS  Snapshot(2023/04/07-19:43)
Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions | Private Attributes | Friends | List of all members
OpenDDS::DCPS::TransportConfig Class Reference

#include <TransportConfig.h>

Inheritance diagram for OpenDDS::DCPS::TransportConfig:
Inheritance graph
[legend]
Collaboration diagram for OpenDDS::DCPS::TransportConfig:
Collaboration graph
[legend]

Public Member Functions

OPENDDS_STRING name () const
 
typedef OPENDDS_VECTOR (TransportInst_rch) InstancesType
 
void sorted_insert (const TransportInst_rch &inst)
 
void populate_locators (OpenDDS::DCPS::TransportLocatorSeq &trans_info) const
 
- Public Member Functions inherited from OpenDDS::DCPS::RcObject
virtual ~RcObject ()
 
virtual void _add_ref ()
 
virtual void _remove_ref ()
 
long ref_count () const
 
WeakObject_get_weak_object () const
 

Public Attributes

InstancesType instances_
 
bool swap_bytes_
 
unsigned long passive_connect_duration_
 

Static Public Attributes

static const unsigned long DEFAULT_PASSIVE_CONNECT_DURATION = 60000
 

Private Member Functions

 TransportConfig (const OPENDDS_STRING &name)
 
 ~TransportConfig ()
 

Private Attributes

const OPENDDS_STRING name_
 

Friends

class TransportRegistry
 
template<typename T , typename U >
RcHandle< T > OpenDDS::DCPS::make_rch (U const &)
 

Additional Inherited Members

- Protected Member Functions inherited from OpenDDS::DCPS::RcObject
 RcObject ()
 

Detailed Description

Definition at line 28 of file TransportConfig.h.

Constructor & Destructor Documentation

◆ TransportConfig()

OpenDDS::DCPS::TransportConfig::TransportConfig ( const OPENDDS_STRING name)
explicitprivate

Definition at line 21 of file TransportConfig.cpp.

◆ ~TransportConfig()

OpenDDS::DCPS::TransportConfig::~TransportConfig ( )
private

Definition at line 27 of file TransportConfig.cpp.

28 {}

Member Function Documentation

◆ name()

OPENDDS_STRING OpenDDS::DCPS::TransportConfig::name ( void  ) const
inline

◆ OPENDDS_VECTOR()

typedef OpenDDS::DCPS::TransportConfig::OPENDDS_VECTOR ( TransportInst_rch  )

◆ populate_locators()

void OpenDDS::DCPS::TransportConfig::populate_locators ( OpenDDS::DCPS::TransportLocatorSeq trans_info) const

Definition at line 42 of file TransportConfig.cpp.

References OpenDDS::DCPS::CONNINFO_ALL, OpenDDS::DCPS::grow(), instances_, and OPENDDS_END_VERSIONED_NAMESPACE_DECL.

Referenced by OpenDDS::FaceTSS::config::Parser::parse(), and OpenDDS::DCPS::StaticDiscovery::parse_endpoints().

43 {
44  for (InstancesType::const_iterator pos = instances_.begin(), limit = instances_.end();
45  pos != limit;
46  ++pos) {
47  const CORBA::ULong idx = DCPS::grow(trans_info) - 1;
48  if ((*pos)->populate_locator(trans_info[idx], CONNINFO_ALL) == 0) {
49  trans_info.length(idx);
50  }
51  }
52 }
ACE_CDR::ULong ULong
Seq::size_type grow(Seq &seq)
Definition: Util.h:151
static const ConnectionInfoFlags CONNINFO_ALL

◆ sorted_insert()

void OpenDDS::DCPS::TransportConfig::sorted_insert ( const TransportInst_rch inst)

Insert the TransportInst in sorted order (by name) in the instances_ list. Use when the names of the TransportInst objects are specifically assigned to have the sorted order make sense.

Definition at line 31 of file TransportConfig.cpp.

References instances_, name(), OpenDDS::DCPS::TransportInst::name(), and OPENDDS_STRING.

Referenced by OpenDDS::DCPS::MulticastLoader::init(), OpenDDS::DCPS::UdpLoader::init(), OpenDDS::DCPS::TcpLoader::init(), and OpenDDS::DCPS::RtpsUdpLoader::load().

32 {
33  const OPENDDS_STRING name = inst->name();
34  InstancesType::iterator it = instances_.begin();
35  while (it != instances_.end() && (*it)->name() < name) {
36  ++it;
37  }
38  instances_.insert(it, inst);
39 }
#define OPENDDS_STRING
OPENDDS_STRING name() const

Friends And Related Function Documentation

◆ OpenDDS::DCPS::make_rch

template<typename T , typename U >
RcHandle<T> OpenDDS::DCPS::make_rch ( U const &  )
friend

◆ TransportRegistry

friend class TransportRegistry
friend

Definition at line 53 of file TransportConfig.h.

Member Data Documentation

◆ DEFAULT_PASSIVE_CONNECT_DURATION

const unsigned long OpenDDS::DCPS::TransportConfig::DEFAULT_PASSIVE_CONNECT_DURATION = 60000
static

◆ instances_

InstancesType OpenDDS::DCPS::TransportConfig::instances_

◆ name_

const OPENDDS_STRING OpenDDS::DCPS::TransportConfig::name_
private

Definition at line 59 of file TransportConfig.h.

◆ passive_connect_duration_

unsigned long OpenDDS::DCPS::TransportConfig::passive_connect_duration_

The time period in milliseconds for the acceptor side of a connection to wait for the connection. The default is 60 seconds

Definition at line 43 of file TransportConfig.h.

Referenced by OpenDDS::DCPS::TransportClient::enable_transport_using_config(), OpenDDS::RTPS::Sedp::init(), and OpenDDS::DCPS::TransportRegistry::load_transport_configuration().

◆ swap_bytes_

bool OpenDDS::DCPS::TransportConfig::swap_bytes_

The documentation for this class was generated from the following files: