OpenDDS  Snapshot(2023/04/28-20:55)
Public Member Functions | Protected Attributes | List of all members
OpenDDS::RTPS::Sedp::Endpoint Class Reference
Inheritance diagram for OpenDDS::RTPS::Sedp::Endpoint:
Inheritance graph
[legend]
Collaboration diagram for OpenDDS::RTPS::Sedp::Endpoint:
Collaboration graph
[legend]

Public Member Functions

 Endpoint (const DCPS::GUID_t &repo_id, Sedp &sedp)
 
virtual ~Endpoint ()
 
bool check_transport_qos (const DCPS::TransportInst &)
 
DCPS::GUID_t get_guid () const
 
DDS::DomainId_t domain_id () const
 
CORBA::Long get_priority_value (const DCPS::AssociationData &) const
 
void set_crypto_handles (DDS::Security::ParticipantCryptoHandle p, DDS::Security::NativeCryptoHandle e=DDS::HANDLE_NIL)
 
DDS::Security::ParticipantCryptoHandle get_crypto_handle () const
 
DDS::Security::NativeCryptoHandle get_endpoint_crypto_handle () const
 
void shutting_down ()
 
OPENDDS_STRING get_instance_name (const DCPS::GUID_t &id) const
 
EntityId_t counterpart_entity_id () const
 
GUID_t make_counterpart_guid (const DCPS::GUID_t &remote_part) const
 
bool associated_with_counterpart (const DCPS::GUID_t &remote_part) const
 
bool pending_association_with_counterpart (const DCPS::GUID_t &remote_part) const
 
bool associated_with_counterpart_if_not_pending (const DCPS::GUID_t &remote_part) const
 
RcHandle< DCPS::BitSubscriberget_builtin_subscriber_proxy () const
 
- Public Member Functions inherited from OpenDDS::DCPS::TransportClient
void use_datalink (const GUID_t &remote_id, const DataLink_rch &link)
 
 TransportClient ()
 
virtual ~TransportClient ()
 
void enable_transport (bool reliable, bool durable)
 
void enable_transport_using_config (bool reliable, bool durable, const TransportConfig_rch &tc)
 
bool swap_bytes () const
 
bool cdr_encapsulation () const
 
const TransportLocatorSeqconnection_info () const
 
void populate_connection_info ()
 
bool is_reliable () const
 
bool associate (const AssociationData &peer, bool active)
 
void disassociate (const GUID_t &peerId)
 
void stop_associating ()
 
void stop_associating (const GUID_t *repos, CORBA::ULong length)
 
void send_final_acks ()
 
void transport_stop ()
 
void register_for_reader (const GUID_t &participant, const GUID_t &writerid, const GUID_t &readerid, const TransportLocatorSeq &locators, OpenDDS::DCPS::DiscoveryListener *listener)
 
void unregister_for_reader (const GUID_t &participant, const GUID_t &writerid, const GUID_t &readerid)
 
void register_for_writer (const GUID_t &participant, const GUID_t &readerid, const GUID_t &writerid, const TransportLocatorSeq &locators, DiscoveryListener *listener)
 
void unregister_for_writer (const GUID_t &participant, const GUID_t &readerid, const GUID_t &writerid)
 
void update_locators (const GUID_t &remote, const TransportLocatorSeq &locators)
 
WeakRcHandle< ICE::Endpointget_ice_endpoint ()
 
bool send_response (const GUID_t &peer, const DataSampleHeader &header, Message_Block_Ptr payload)
 
void send (SendStateDataSampleList send_list, ACE_UINT64 transaction_id=0)
 
SendControlStatus send_w_control (SendStateDataSampleList send_list, const DataSampleHeader &header, Message_Block_Ptr msg, const GUID_t &destination)
 
SendControlStatus send_control (const DataSampleHeader &header, Message_Block_Ptr msg)
 
SendControlStatus send_control_to (const DataSampleHeader &header, Message_Block_Ptr msg, const GUID_t &destination)
 
bool remove_sample (const DataSampleElement *sample)
 
bool remove_all_msgs ()
 
virtual void add_link (const DataLink_rch &link, const GUID_t &peer)
 
void terminate_send_if_suspended ()
 
bool associated_with (const GUID_t &remote) const
 
bool pending_association_with (const GUID_t &remote) const
 
GUID_t repo_id () const
 
void data_acked (const GUID_t &remote)
 
bool is_leading (const GUID_t &reader_id) 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
 

Protected Attributes

DCPS::GUID_t repo_id_
 
Sedpsedp_
 
AtomicBool shutting_down_
 
DDS::Security::ParticipantCryptoHandle participant_crypto_handle_
 
DDS::Security::NativeCryptoHandle endpoint_crypto_handle_
 

Additional Inherited Members

- Public Types inherited from OpenDDS::DCPS::TransportClient
enum  { ASSOC_OK = 1, ASSOC_ACTIVE = 2 }
 
- Protected Member Functions inherited from OpenDDS::DCPS::TransportClient
void cdr_encapsulation (bool encap)
 
- Protected Member Functions inherited from OpenDDS::DCPS::RcObject
 RcObject ()
 

Detailed Description

Definition at line 344 of file Sedp.h.

Constructor & Destructor Documentation

◆ Endpoint()

OpenDDS::RTPS::Sedp::Endpoint::Endpoint ( const DCPS::GUID_t repo_id,
Sedp sedp 
)
inline

Definition at line 346 of file Sedp.h.

347  : repo_id_(repo_id)
348  , sedp_(sedp)
349  , shutting_down_(false)
350 #ifdef OPENDDS_SECURITY
353 #endif
354  {}
const InstanceHandle_t HANDLE_NIL
DDS::Security::ParticipantCryptoHandle participant_crypto_handle_
Definition: Sedp.h:427
DDS::Security::NativeCryptoHandle endpoint_crypto_handle_
Definition: Sedp.h:428
AtomicBool shutting_down_
Definition: Sedp.h:425
DCPS::GUID_t repo_id_
Definition: Sedp.h:423

◆ ~Endpoint()

OpenDDS::RTPS::Sedp::Endpoint::~Endpoint ( )
virtual

Definition at line 3121 of file Sedp.cpp.

Member Function Documentation

◆ associated_with_counterpart()

bool OpenDDS::RTPS::Sedp::Endpoint::associated_with_counterpart ( const DCPS::GUID_t remote_part) const

Definition at line 3162 of file Sedp.cpp.

Referenced by OpenDDS::RTPS::Sedp::Writer::send_sample().

3163 {
3164  return associated_with(make_counterpart_guid(remote_part));
3165 }
bool associated_with(const GUID_t &remote) const
GUID_t make_counterpart_guid(const DCPS::GUID_t &remote_part) const
Definition: Sedp.cpp:3157

◆ associated_with_counterpart_if_not_pending()

bool OpenDDS::RTPS::Sedp::Endpoint::associated_with_counterpart_if_not_pending ( const DCPS::GUID_t remote_part) const

Definition at line 3167 of file Sedp.cpp.

3169 {
3170  const GUID_t counterpart = make_counterpart_guid(remote_part);
3171  return associated_with(counterpart) || !pending_association_with(counterpart);
3172 }
bool associated_with(const GUID_t &remote) const
bool pending_association_with(const GUID_t &remote) const
GUID_t make_counterpart_guid(const DCPS::GUID_t &remote_part) const
Definition: Sedp.cpp:3157

◆ check_transport_qos()

bool OpenDDS::RTPS::Sedp::Endpoint::check_transport_qos ( const DCPS::TransportInst )
inlinevirtual

Implements OpenDDS::DCPS::TransportClient.

Definition at line 359 of file Sedp.h.

360  {
361  return true;
362  }

◆ counterpart_entity_id()

EntityId_t OpenDDS::RTPS::Sedp::Endpoint::counterpart_entity_id ( ) const

Definition at line 3127 of file Sedp.cpp.

References ACE_ERROR, OpenDDS::DCPS::DCPS_debug_level, OpenDDS::DCPS::EntityId_t::entityKind, OpenDDS::DCPS::ENTITYKIND_BUILTIN_READER_NO_KEY, OpenDDS::DCPS::ENTITYKIND_BUILTIN_READER_WITH_KEY, OpenDDS::DCPS::ENTITYKIND_BUILTIN_UNKNOWN, OpenDDS::DCPS::ENTITYKIND_BUILTIN_WRITER_NO_KEY, OpenDDS::DCPS::ENTITYKIND_BUILTIN_WRITER_WITH_KEY, and LM_ERROR.

3128 {
3129  EntityId_t rv = repo_id_.entityId;
3130  switch (rv.entityKind) {
3133  break;
3134 
3137  break;
3138 
3141  break;
3142 
3145  break;
3146 
3147  default:
3148  if (DCPS::DCPS_debug_level) {
3149  ACE_ERROR((LM_ERROR, "(%P|%t) ERROR: Sedp::Endpoint::counterpart_entity_id: "
3150  "Unexpected entityKind: %u\n", rv.entityKind));
3151  }
3152  rv.entityKind = DCPS::ENTITYKIND_BUILTIN_UNKNOWN;
3153  }
3154  return rv;
3155 }
#define ACE_ERROR(X)
const octet ENTITYKIND_BUILTIN_WRITER_WITH_KEY
Definition: DdsDcpsGuid.idl:33
const octet ENTITYKIND_BUILTIN_WRITER_NO_KEY
Definition: DdsDcpsGuid.idl:34
const octet ENTITYKIND_BUILTIN_UNKNOWN
Definition: DdsDcpsGuid.idl:31
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
DCPS::GUID_t repo_id_
Definition: Sedp.h:423
const octet ENTITYKIND_BUILTIN_READER_NO_KEY
Definition: DdsDcpsGuid.idl:35
const octet ENTITYKIND_BUILTIN_READER_WITH_KEY
Definition: DdsDcpsGuid.idl:36
key EntityId_t entityId
Definition: DdsDcpsGuid.idl:59

◆ domain_id()

DDS::DomainId_t OpenDDS::RTPS::Sedp::Endpoint::domain_id ( ) const
inlinevirtual

Implements OpenDDS::DCPS::TransportClient.

Definition at line 369 of file Sedp.h.

370  {
371  return 0; // not used for SEDP
372  }

◆ get_builtin_subscriber_proxy()

RcHandle< DCPS::BitSubscriber > OpenDDS::RTPS::Sedp::Endpoint::get_builtin_subscriber_proxy ( ) const
virtual

Reimplemented from OpenDDS::DCPS::TransportClient.

Definition at line 3174 of file Sedp.cpp.

3175 {
3176  return sedp_.spdp_.bit_subscriber_;
3177 }
DCPS::RcHandle< DCPS::BitSubscriber > bit_subscriber_
Definition: Spdp.h:379

◆ get_crypto_handle()

DDS::Security::ParticipantCryptoHandle OpenDDS::RTPS::Sedp::Endpoint::get_crypto_handle ( ) const
inlinevirtual

Reimplemented from OpenDDS::DCPS::TransportClient.

Definition at line 390 of file Sedp.h.

391  {
393  }
DDS::Security::ParticipantCryptoHandle participant_crypto_handle_
Definition: Sedp.h:427

◆ get_endpoint_crypto_handle()

DDS::Security::NativeCryptoHandle OpenDDS::RTPS::Sedp::Endpoint::get_endpoint_crypto_handle ( ) const
inline

Definition at line 395 of file Sedp.h.

396  {
398  }
DDS::Security::NativeCryptoHandle endpoint_crypto_handle_
Definition: Sedp.h:428

◆ get_guid()

DCPS::GUID_t OpenDDS::RTPS::Sedp::Endpoint::get_guid ( ) const
inlinevirtual

◆ get_instance_name()

OPENDDS_STRING OpenDDS::RTPS::Sedp::Endpoint::get_instance_name ( const DCPS::GUID_t id) const
inline

Definition at line 405 of file Sedp.h.

References OpenDDS::DCPS::GUID_t::entityId, OpenDDS::DCPS::ENTITYID_PARTICIPANT, OpenDDS::DCPS::EntityId_t::entityKey, OpenDDS::DCPS::EntityId_t::entityKind, OpenDDS::DCPS::GUID_t::guidPrefix, OpenDDS::DCPS::make_id(), OPENDDS_STRING, OpenDDS::DCPS::to_dds_string(), and OpenDDS::DCPS::to_hex_dds_string().

Referenced by OpenDDS::RTPS::Sedp::TypeLookupRequestWriter::send_type_lookup_request().

406  {
407  const DCPS::GUID_t participant = make_id(id, ENTITYID_PARTICIPANT);
408  return OPENDDS_STRING("dds.builtin.TOS.") +
409  DCPS::to_hex_dds_string(&participant.guidPrefix[0], sizeof(DCPS::GuidPrefix_t)) +
410  DCPS::to_hex_dds_string(&participant.entityId.entityKey[0], sizeof(DCPS::EntityKey_t)) +
411  DCPS::to_dds_string(unsigned(participant.entityId.entityKind), true);
412  }
String to_dds_string(unsigned short to_convert)
octet EntityKey_t[3]
Definition: DdsDcpsGuid.idl:22
#define OPENDDS_STRING
const EntityId_t ENTITYID_PARTICIPANT
Definition: GuidUtils.h:37
String to_hex_dds_string(const unsigned char *data, const size_t size, const char delim, const size_t delim_every)
octet GuidPrefix_t[12]
Definition: DdsDcpsGuid.idl:19
GUID_t make_id(const GuidPrefix_t &prefix, const EntityId_t &entity)
Definition: GuidUtils.h:200

◆ get_priority_value()

CORBA::Long OpenDDS::RTPS::Sedp::Endpoint::get_priority_value ( const DCPS::AssociationData ) const
inlinevirtual

◆ make_counterpart_guid()

GUID_t OpenDDS::RTPS::Sedp::Endpoint::make_counterpart_guid ( const DCPS::GUID_t remote_part) const

Definition at line 3157 of file Sedp.cpp.

References OpenDDS::DCPS::make_id().

3158 {
3159  return make_id(remote_part, counterpart_entity_id());
3160 }
GUID_t make_id(const GuidPrefix_t &prefix, const EntityId_t &entity)
Definition: GuidUtils.h:200
EntityId_t counterpart_entity_id() const
Definition: Sedp.cpp:3127

◆ pending_association_with_counterpart()

bool OpenDDS::RTPS::Sedp::Endpoint::pending_association_with_counterpart ( const DCPS::GUID_t remote_part) const

◆ set_crypto_handles()

void OpenDDS::RTPS::Sedp::Endpoint::set_crypto_handles ( DDS::Security::ParticipantCryptoHandle  p,
DDS::Security::NativeCryptoHandle  e = DDS::HANDLE_NIL 
)
inline

Definition at line 383 of file Sedp.h.

Referenced by OpenDDS::RTPS::Sedp::init().

385  {
388  }
DDS::Security::ParticipantCryptoHandle participant_crypto_handle_
Definition: Sedp.h:427
DDS::Security::NativeCryptoHandle endpoint_crypto_handle_
Definition: Sedp.h:428

◆ shutting_down()

void OpenDDS::RTPS::Sedp::Endpoint::shutting_down ( void  )
inline

Definition at line 401 of file Sedp.h.

Referenced by OpenDDS::RTPS::Sedp::ignore().

401 { shutting_down_ = true; }
AtomicBool shutting_down_
Definition: Sedp.h:425

Member Data Documentation

◆ endpoint_crypto_handle_

DDS::Security::NativeCryptoHandle OpenDDS::RTPS::Sedp::Endpoint::endpoint_crypto_handle_
protected

Definition at line 428 of file Sedp.h.

◆ participant_crypto_handle_

DDS::Security::ParticipantCryptoHandle OpenDDS::RTPS::Sedp::Endpoint::participant_crypto_handle_
protected

Definition at line 427 of file Sedp.h.

◆ repo_id_

DCPS::GUID_t OpenDDS::RTPS::Sedp::Endpoint::repo_id_
protected

◆ sedp_

Sedp& OpenDDS::RTPS::Sedp::Endpoint::sedp_
protected

◆ shutting_down_

AtomicBool OpenDDS::RTPS::Sedp::Endpoint::shutting_down_
protected

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