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

Public Member Functions

 Reader (const DCPS::GUID_t &sub_id, Sedp &sedp)
 
virtual ~Reader ()
 
bool assoc (const DCPS::AssociationData &publication)
 
void data_received (const DCPS::ReceivedDataSample &sample)
 
void notify_subscription_disconnected (const DCPS::WriterIdSeq &)
 
void notify_subscription_reconnected (const DCPS::WriterIdSeq &)
 
void notify_subscription_lost (const DCPS::WriterIdSeq &)
 
void remove_associations (const DCPS::WriterIdSeq &, bool)
 
- Public Member Functions inherited from OpenDDS::DCPS::TransportReceiveListener
virtual ~TransportReceiveListener ()
 
virtual void transport_discovery_change ()
 
- 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 Member Functions inherited from OpenDDS::RTPS::Sedp::Endpoint
 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
 

Private Member Functions

virtual void data_received_i (const DCPS::ReceivedDataSample &sample, const DCPS::EntityId_t &entity_id, DCPS::Serializer &ser, DCPS::Extensibility extensibility)=0
 

Private Attributes

DCPS::TransportMessageBlockAllocator mb_alloc_
 

Additional Inherited Members

- Public Types inherited from OpenDDS::DCPS::TransportClient
enum  { ASSOC_OK = 1, ASSOC_ACTIVE = 2 }
 
- Protected Member Functions inherited from OpenDDS::DCPS::TransportReceiveListener
 TransportReceiveListener ()
 
- Protected Member Functions inherited from OpenDDS::DCPS::RcObject
 RcObject ()
 
- Protected Member Functions inherited from OpenDDS::DCPS::TransportClient
void cdr_encapsulation (bool encap)
 
- Protected Attributes inherited from OpenDDS::RTPS::Sedp::Endpoint
DCPS::GUID_t repo_id_
 
Sedpsedp_
 
AtomicBool shutting_down_
 
DDS::Security::ParticipantCryptoHandle participant_crypto_handle_
 
DDS::Security::NativeCryptoHandle endpoint_crypto_handle_
 

Detailed Description

Definition at line 607 of file Sedp.h.

Constructor & Destructor Documentation

◆ Reader()

OpenDDS::RTPS::Sedp::Reader::Reader ( const DCPS::GUID_t sub_id,
Sedp sedp 
)
inline

Definition at line 612 of file Sedp.h.

References OpenDDS::RTPS::Sedp::data_received().

613  : Endpoint(sub_id, sedp)
615  {}
DCPS::TransportMessageBlockAllocator mb_alloc_
Definition: Sedp.h:636
Endpoint(const DCPS::GUID_t &repo_id, Sedp &sedp)
Definition: Sedp.h:346

◆ ~Reader()

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

Definition at line 4066 of file Sedp.cpp.

4067 {
4068 }

Member Function Documentation

◆ assoc()

bool OpenDDS::RTPS::Sedp::Reader::assoc ( const DCPS::AssociationData publication)

Definition at line 4083 of file Sedp.cpp.

References OpenDDS::DCPS::TransportClient::associate().

4084 {
4085  return associate(publication, false);
4086 }
bool associate(const AssociationData &peer, bool active)

◆ data_received()

void OpenDDS::RTPS::Sedp::Reader::data_received ( const DCPS::ReceivedDataSample sample)
virtual

Implements OpenDDS::DCPS::TransportReceiveListener.

Definition at line 4109 of file Sedp.cpp.

References ACE_DEBUG, ACE_ERROR, ACE_TEXT(), OpenDDS::DCPS::LogGuid::c_str(), OpenDDS::DCPS::ReceivedDataSample::data(), OpenDDS::DCPS::DCPS_debug_level, OpenDDS::DCPS::DISPOSE_INSTANCE, OpenDDS::DCPS::DISPOSE_UNREGISTER_INSTANCE, OpenDDS::STUN::encoding(), OpenDDS::DCPS::GUID_t::entityId, OpenDDS::RTPS::ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_SECURE_WRITER, OpenDDS::DCPS::ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_WRITER, OpenDDS::RTPS::ENTITYID_P2P_BUILTIN_PARTICIPANT_STATELESS_WRITER, OpenDDS::RTPS::ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_WRITER, OpenDDS::RTPS::ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_WRITER, OpenDDS::DCPS::ENTITYID_SEDP_BUILTIN_PUBLICATIONS_WRITER, OpenDDS::RTPS::ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_WRITER, OpenDDS::DCPS::ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_WRITER, OpenDDS::RTPS::ENTITYID_SPDP_RELIABLE_BUILTIN_PARTICIPANT_SECURE_WRITER, OpenDDS::DCPS::ENTITYID_TL_SVC_REPLY_WRITER, OpenDDS::RTPS::ENTITYID_TL_SVC_REPLY_WRITER_SECURE, OpenDDS::DCPS::ENTITYID_TL_SVC_REQ_WRITER, OpenDDS::RTPS::ENTITYID_TL_SVC_REQ_WRITER_SECURE, OpenDDS::XTypes::extensibility(), OpenDDS::DCPS::FINAL, OpenDDS::DCPS::ReceivedDataSample::header_, OpenDDS::DCPS::DataSampleHeader::key_fields_only_, LM_DEBUG, LM_ERROR, OpenDDS::DCPS::DataSampleHeader::message_id_, OpenDDS::DCPS::MUTABLE, OpenDDS::DCPS::DataSampleHeader::publication_id_, OpenDDS::DCPS::SAMPLE_DATA, OpenDDS::RTPS::Sedp::Endpoint::shutting_down_, OpenDDS::DCPS::to_string(), and OpenDDS::DCPS::UNREGISTER_INSTANCE.

4110 {
4111  if (shutting_down_) {
4112  return;
4113  }
4114 
4115  if (DCPS::DCPS_debug_level >= 9) {
4116  ACE_DEBUG((LM_DEBUG, "(%P|%t) Sedp::Reader::data_received: from %C\n",
4117  DCPS::LogGuid(sample.header_.publication_id_).c_str()));
4118  }
4119 
4120  const DCPS::MessageId id =
4121  static_cast<DCPS::MessageId>(sample.header_.message_id_);
4122 
4123  switch (id) {
4124  case DCPS::SAMPLE_DATA:
4128  const DCPS::EntityId_t entity_id = sample.header_.publication_id_.entityId;
4129  const bool full_message = !sample.header_.key_fields_only_;
4130 
4131  // Figure Out Extensibility of Data Based On Entity Id
4132  const bool is_mutable =
4134 #ifdef OPENDDS_SECURITY
4136 #endif
4138 #ifdef OPENDDS_SECURITY
4141 #endif
4142  false;
4143  const bool is_final =
4144  (entity_id == ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_WRITER && full_message) ||
4145 #ifdef OPENDDS_SECURITY
4146  (entity_id == ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_SECURE_WRITER && full_message) ||
4149 #endif
4150  entity_id == ENTITYID_TL_SVC_REQ_WRITER ||
4151  entity_id == ENTITYID_TL_SVC_REPLY_WRITER ||
4152 #ifdef OPENDDS_SECURITY
4153  entity_id == ENTITYID_TL_SVC_REQ_WRITER_SECURE ||
4154  entity_id == ENTITYID_TL_SVC_REPLY_WRITER_SECURE ||
4155 #endif
4156  false;
4157  if (is_mutable == is_final) {
4158  if (is_mutable) {
4159  ACE_ERROR((LM_ERROR, "(%P|%t) ERROR: Sedp::Reader::data_received: "
4160  "entity id extensibility error over %C: both is_final and is_mutable are %d\n",
4161  to_string(entity_id).c_str(), is_mutable));
4162  }
4163  break;
4164  }
4166  is_mutable ? DCPS::MUTABLE : DCPS::FINAL;
4167 
4168  // Get Encoding from Encapsulation
4169  Encoding encoding;
4170  DCPS::Message_Block_Ptr payload(sample.data(&mb_alloc_));
4171  Serializer ser(payload.get(), encoding);
4172  DCPS::EncapsulationHeader encap;
4173  if (!(ser >> encap)) {
4174  ACE_ERROR((LM_ERROR, ACE_TEXT("(%P|%t) ERROR: Sedp::Reader::data_received - ")
4175  ACE_TEXT("failed to deserialize encapsulation header\n")));
4176  return;
4177  }
4178  if (!encap.to_encoding(encoding, extensibility)) {
4179  return;
4180  }
4181  ser.encoding(encoding);
4182 
4183  data_received_i(sample, entity_id, ser, extensibility);
4184  break;
4185  }
4186 
4187  default:
4188  break;
4189  }
4190 }
const EntityId_t ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_SECURE_WRITER
Definition: MessageTypes.h:81
#define ACE_DEBUG(X)
#define ACE_ERROR(X)
DCPS::TransportMessageBlockAllocator mb_alloc_
Definition: Sedp.h:636
const EntityId_t ENTITYID_TL_SVC_REQ_WRITER
Definition: GuidUtils.h:52
const EntityId_t ENTITYID_TL_SVC_REQ_WRITER_SECURE
Definition: MessageTypes.h:90
MessageId
One byte message id (<256)
virtual void data_received_i(const DCPS::ReceivedDataSample &sample, const DCPS::EntityId_t &entity_id, DCPS::Serializer &ser, DCPS::Extensibility extensibility)=0
const EntityId_t ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_SECURE_WRITER
Definition: MessageTypes.h:79
unique_ptr< ACE_Message_Block, Message_Block_Deleter > Message_Block_Ptr
const EntityId_t ENTITYID_TL_SVC_REPLY_WRITER_SECURE
Definition: MessageTypes.h:92
const EntityId_t ENTITYID_TL_SVC_REPLY_WRITER
Definition: GuidUtils.h:54
const EntityId_t ENTITYID_SEDP_BUILTIN_PUBLICATIONS_WRITER
Definition: GuidUtils.h:40
const EntityId_t ENTITYID_P2P_BUILTIN_PARTICIPANT_STATELESS_WRITER
Definition: MessageTypes.h:83
AtomicBool shutting_down_
Definition: Sedp.h:425
const EntityId_t ENTITYID_P2P_BUILTIN_PARTICIPANT_VOLATILE_SECURE_WRITER
Definition: MessageTypes.h:85
ACE_TEXT("TCP_Factory")
const EntityId_t ENTITYID_SEDP_BUILTIN_PUBLICATIONS_SECURE_WRITER
Definition: MessageTypes.h:77
const EntityId_t ENTITYID_SEDP_BUILTIN_SUBSCRIPTIONS_WRITER
Definition: GuidUtils.h:42
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
const char * to_string(MessageId value)
const EntityId_t ENTITYID_SPDP_RELIABLE_BUILTIN_PARTICIPANT_SECURE_WRITER
Definition: MessageTypes.h:87
const EntityId_t ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_WRITER
Definition: GuidUtils.h:46
const DCPS::Encoding encoding(DCPS::Encoding::KIND_UNALIGNED_CDR, DCPS::ENDIAN_BIG)
extensibility(MUTABLE) struct TypeLookup_getTypes_In
Definition: TypeLookup.idl:29

◆ data_received_i()

virtual void OpenDDS::RTPS::Sedp::Reader::data_received_i ( const DCPS::ReceivedDataSample sample,
const DCPS::EntityId_t entity_id,
DCPS::Serializer ser,
DCPS::Extensibility  extensibility 
)
privatepure virtual

◆ notify_subscription_disconnected()

void OpenDDS::RTPS::Sedp::Reader::notify_subscription_disconnected ( const DCPS::WriterIdSeq )
inlinevirtual

Implements OpenDDS::DCPS::TransportReceiveListener.

Definition at line 625 of file Sedp.h.

625 {}

◆ notify_subscription_lost()

void OpenDDS::RTPS::Sedp::Reader::notify_subscription_lost ( const DCPS::WriterIdSeq )
inlinevirtual

Implements OpenDDS::DCPS::TransportReceiveListener.

Definition at line 627 of file Sedp.h.

627 {}

◆ notify_subscription_reconnected()

void OpenDDS::RTPS::Sedp::Reader::notify_subscription_reconnected ( const DCPS::WriterIdSeq )
inlinevirtual

Implements OpenDDS::DCPS::TransportReceiveListener.

Definition at line 626 of file Sedp.h.

626 {}

◆ remove_associations()

void OpenDDS::RTPS::Sedp::Reader::remove_associations ( const DCPS::WriterIdSeq ,
bool   
)
inlinevirtual

Implements OpenDDS::DCPS::TransportReceiveListener.

Definition at line 628 of file Sedp.h.

References OpenDDS::XTypes::extensibility().

628 {}

Member Data Documentation

◆ mb_alloc_

DCPS::TransportMessageBlockAllocator OpenDDS::RTPS::Sedp::Reader::mb_alloc_
private

Definition at line 636 of file Sedp.h.


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