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

Public Member Functions

 TypeLookupReplyWriter (const DCPS::GUID_t &pub_id, Sedp &sedp, ACE_INT64 seq_init=1)
 
virtual ~TypeLookupReplyWriter ()
 
bool send_type_lookup_reply (XTypes::TypeLookup_Reply &type_lookup_reply, const DCPS::GUID_t &reader)
 
- Public Member Functions inherited from OpenDDS::RTPS::Sedp::Writer
 Writer (const DCPS::GUID_t &pub_id, Sedp &sedp, ACE_INT64 seq_init=1)
 
virtual ~Writer ()
 
bool assoc (const DCPS::AssociationData &subscription)
 
void transport_assoc_done (int flags, const DCPS::GUID_t &remote)
 
void data_delivered (const DCPS::DataSampleElement *)
 
void data_dropped (const DCPS::DataSampleElement *, bool by_transport)
 
void data_acked (const GUID_t &remote)
 
void control_delivered (const DCPS::Message_Block_Ptr &sample)
 
void control_dropped (const DCPS::Message_Block_Ptr &sample, bool dropped_by_transport)
 
void notify_publication_disconnected (const DCPS::ReaderIdSeq &)
 
void notify_publication_reconnected (const DCPS::ReaderIdSeq &)
 
void notify_publication_lost (const DCPS::ReaderIdSeq &)
 
void remove_associations (const DCPS::ReaderIdSeq &, bool)
 
void replay_durable_data_for (const DCPS::GUID_t &remote_sub_id)
 
void retrieve_inline_qos_data (InlineQosData &) const
 
const DCPS::SequenceNumberget_seq () const
 
DDS::ReturnCode_t write_parameter_list (const ParameterList &plist, const DCPS::GUID_t &reader, DCPS::SequenceNumber &sequence)
 
void end_historic_samples (const DCPS::GUID_t &reader)
 
void request_ack (const DCPS::GUID_t &reader)
 
void send_deferred_samples (const GUID_t &reader)
 
- Public Member Functions inherited from OpenDDS::DCPS::TransportSendListener
virtual ~TransportSendListener ()
 
virtual SendControlStatus send_control_customized (const DataLinkSet_rch &links, const DataSampleHeader &header, ACE_Message_Block *msg, void *extra)
 
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
 

Protected Member Functions

virtual bool deferrable () const
 
- Protected Member Functions inherited from OpenDDS::RTPS::Sedp::Writer
typedef OPENDDS_MAP (DCPS::SequenceNumber, DCPS::DataSampleElement *) PerReaderDeferredSamples
 
typedef OPENDDS_MAP (GUID_t, PerReaderDeferredSamples) DeferredSamples
 
void send_sample (DCPS::Message_Block_Ptr payload, size_t size, const DCPS::GUID_t &reader, DCPS::SequenceNumber &sequence, bool historic=false)
 
void send_sample_i (DCPS::DataSampleElement *el)
 
void set_header_fields (DCPS::DataSampleHeader &dsh, size_t size, const DCPS::GUID_t &reader, DCPS::SequenceNumber &sequence, bool historic_sample=false, DCPS::MessageId id=DCPS::SAMPLE_DATA)
 
void write_control_msg (DCPS::Message_Block_Ptr payload, size_t size, DCPS::MessageId id, DCPS::SequenceNumber seq=DCPS::SequenceNumber())
 
- Protected Member Functions inherited from OpenDDS::DCPS::TransportSendListener
 TransportSendListener ()
 
- Protected Member Functions inherited from OpenDDS::DCPS::RcObject
 RcObject ()
 
- Protected Member Functions inherited from OpenDDS::DCPS::TransportClient
void cdr_encapsulation (bool encap)
 

Additional Inherited Members

- Public Types inherited from OpenDDS::DCPS::TransportClient
enum  { ASSOC_OK = 1, ASSOC_ACTIVE = 2 }
 
- Protected Attributes inherited from OpenDDS::RTPS::Sedp::Writer
DeferredSamples deferred_samples_
 
DCPS::SequenceNumber seq_
 
- 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 586 of file Sedp.h.

Constructor & Destructor Documentation

◆ TypeLookupReplyWriter()

OpenDDS::RTPS::Sedp::TypeLookupReplyWriter::TypeLookupReplyWriter ( const DCPS::GUID_t pub_id,
Sedp sedp,
ACE_INT64  seq_init = 1 
)
inline

Definition at line 588 of file Sedp.h.

589  : Writer(pub_id, sedp, seq_init)
590  {}
Writer(const DCPS::GUID_t &pub_id, Sedp &sedp, ACE_INT64 seq_init=1)
Definition: Sedp.cpp:3180

◆ ~TypeLookupReplyWriter()

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

Definition at line 3615 of file Sedp.cpp.

3616 {
3617 }

Member Function Documentation

◆ deferrable()

virtual bool OpenDDS::RTPS::Sedp::TypeLookupReplyWriter::deferrable ( ) const
inlineprotectedvirtual

Reimplemented from OpenDDS::RTPS::Sedp::Writer.

Definition at line 599 of file Sedp.h.

600  {
601  return true;
602  }

◆ send_type_lookup_reply()

bool OpenDDS::RTPS::Sedp::TypeLookupReplyWriter::send_type_lookup_reply ( XTypes::TypeLookup_Reply type_lookup_reply,
const DCPS::GUID_t reader 
)

Definition at line 3696 of file Sedp.cpp.

References ACE_DEBUG, ACE_ERROR, ACE_Message_Block::cont(), OpenDDS::DCPS::DCPS_debug_level, OpenDDS::DCPS::FINAL, OpenDDS::DCPS::DataSampleHeader::get_max_serialized_size(), OpenDDS::XTypes::TypeLookup_Reply::header, LM_DEBUG, LM_ERROR, ACE_Message_Block::MB_DATA, OpenDDS::DCPS::move(), DDS::RPC::ReplyHeader::relatedRequestId, DDS::RPC::REMOTE_EX_OK, DDS::RPC::ReplyHeader::remoteEx, OpenDDS::RTPS::Sedp::Writer::send_sample(), OpenDDS::RTPS::Sedp::Writer::seq_, OpenDDS::DCPS::serialized_size(), OpenDDS::DCPS::EncapsulationHeader::serialized_size, and OpenDDS::RTPS::to_opendds_seqnum().

3699 {
3700  if (DCPS::DCPS_debug_level >= 8) {
3701  const DDS::SampleIdentity id = type_lookup_reply.header.relatedRequestId;
3702  ACE_DEBUG((LM_DEBUG, "(%P|%t) Sedp::TypeLookupReplyWriter::send_type_lookup_reply: "
3703  "to %C seq: %q\n", DCPS::LogGuid(reader).c_str(),
3704  to_opendds_seqnum(id.sequence_number).getValue()));
3705  }
3706 
3707  type_lookup_reply.header.remoteEx = DDS::RPC::REMOTE_EX_OK;
3708 
3709  // Determine message length
3710  const size_t size = DCPS::EncapsulationHeader::serialized_size +
3711  DCPS::serialized_size(type_lookup_encoding, type_lookup_reply);
3712 
3713  // Build and send type lookup message
3714  DCPS::Message_Block_Ptr payload(
3715  new ACE_Message_Block(
3718  new ACE_Message_Block(size)));
3719  Serializer serializer(payload->cont(), type_lookup_encoding);
3720  DCPS::EncapsulationHeader encap;
3721  bool success = true;
3722  if (encap.from_encoding(serializer.encoding(), DCPS::FINAL) &&
3723  serializer << encap && serializer << type_lookup_reply) {
3724  DCPS::SequenceNumber sn(seq_++);
3725  send_sample(move(payload), size, reader, sn);
3726  } else {
3727  if (DCPS::DCPS_debug_level) {
3728  ACE_ERROR((LM_ERROR, "(%P|%t) ERROR: "
3729  "Sedp::TypeLookupReplyWriter::send_type_lookup_reply: serialization failed\n"));
3730  }
3731  success = false;
3732  }
3733 
3734  return success;
3735 }
#define ACE_DEBUG(X)
#define ACE_ERROR(X)
T::rv_reference move(T &p)
Definition: unique_ptr.h:141
void serialized_size(const Encoding &encoding, size_t &size, const SequenceNumber &)
static size_t get_max_serialized_size()
Similar to IDL compiler generated methods.
unique_ptr< ACE_Message_Block, Message_Block_Deleter > Message_Block_Ptr
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
void send_sample(DCPS::Message_Block_Ptr payload, size_t size, const DCPS::GUID_t &reader, DCPS::SequenceNumber &sequence, bool historic=false)
Definition: Sedp.cpp:3247
DCPS::SequenceNumber to_opendds_seqnum(const RTPS::SequenceNumber_t &rtps_seqnum)
Definition: MessageUtils.h:132
static const size_t serialized_size
Definition: Serializer.h:251
DCPS::SequenceNumber seq_
Definition: Sedp.h:505

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