OpenDDS::DCPS::RtpsUdpReceiveStrategy::MessageReceiver Struct Reference

Collaboration diagram for OpenDDS::DCPS::RtpsUdpReceiveStrategy::MessageReceiver:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 MessageReceiver (const GuidPrefix_t &local)
void reset (const ACE_INET_Addr &remote_address, const RTPS::Header &hdr)
void submsg (const RTPS::Submessage &s)
void submsg (const RTPS::InfoDestinationSubmessage &id)
void submsg (const RTPS::InfoReplySubmessage &ir)
void submsg (const RTPS::InfoReplyIp4Submessage &iri4)
void submsg (const RTPS::InfoTimestampSubmessage &it)
void submsg (const RTPS::InfoSourceSubmessage &is)
void fill_header (DataSampleHeader &header) const

Public Attributes

GuidPrefix_t local_
RTPS::ProtocolVersion_t source_version_
RTPS::VendorId_t source_vendor_
GuidPrefix_t source_guid_prefix_
GuidPrefix_t dest_guid_prefix_
DCPS::LocatorSeq unicast_reply_locator_list_
DCPS::LocatorSeq multicast_reply_locator_list_
bool have_timestamp_
RTPS::Time_t timestamp_

Detailed Description

Definition at line 105 of file RtpsUdpReceiveStrategy.h.


Constructor & Destructor Documentation

OpenDDS::DCPS::RtpsUdpReceiveStrategy::MessageReceiver::MessageReceiver ( const GuidPrefix_t local  )  [explicit]

Definition at line 672 of file RtpsUdpReceiveStrategy.cpp.

References OpenDDS::DCPS::assign(), dest_guid_prefix_, OpenDDS::RTPS::Time_t::fraction, local_, OpenDDS::RTPS::ProtocolVersion_t::major, OpenDDS::RTPS::ProtocolVersion_t::minor, OpenDDS::RTPS::Time_t::seconds, source_guid_prefix_, source_vendor_, source_version_, timestamp_, and OpenDDS::RTPS::VendorId_t::vendorId.

00673   : have_timestamp_(false)
00674 {
00675   RTPS::assign(local_, local);
00676   source_version_.major = source_version_.minor = 0;
00677   source_vendor_.vendorId[0] = source_vendor_.vendorId[1] = 0;
00678   for (size_t i = 0; i < sizeof(GuidPrefix_t); ++i) {
00679     source_guid_prefix_[i] = 0;
00680     dest_guid_prefix_[i] = 0;
00681   }
00682   timestamp_.seconds = 0;
00683   timestamp_.fraction = 0;
00684 }

Here is the call graph for this function:


Member Function Documentation

void OpenDDS::DCPS::RtpsUdpReceiveStrategy::MessageReceiver::fill_header ( DataSampleHeader header  )  const
void OpenDDS::DCPS::RtpsUdpReceiveStrategy::MessageReceiver::reset ( const ACE_INET_Addr remote_address,
const RTPS::Header hdr 
)

Definition at line 687 of file RtpsUdpReceiveStrategy.cpp.

References OpenDDS::RTPS::address_to_bytes(), OpenDDS::RTPS::address_to_kind(), OpenDDS::DCPS::assign(), dest_guid_prefix_, OpenDDS::RTPS::Header::guidPrefix, have_timestamp_, local_, OpenDDS::RTPS::LOCATOR_ADDRESS_INVALID, OpenDDS::RTPS::LOCATOR_PORT_INVALID, multicast_reply_locator_list_, source_guid_prefix_, source_vendor_, source_version_, OpenDDS::RTPS::TIME_INVALID, timestamp_, unicast_reply_locator_list_, OpenDDS::RTPS::Header::vendorId, and OpenDDS::RTPS::Header::version.

Referenced by OpenDDS::DCPS::RtpsUdpReceiveStrategy::check_header().

00689 {
00690   using namespace RTPS;
00691   // see RTPS spec v2.1 section 8.3.4 table 8.16 and section 8.3.6.4
00692   source_version_ = hdr.version;
00693   source_vendor_ = hdr.vendorId;
00694 
00695   assign(source_guid_prefix_, hdr.guidPrefix);
00696   assign(dest_guid_prefix_, local_);
00697 
00698   unicast_reply_locator_list_.length(1);
00699   unicast_reply_locator_list_[0].kind = address_to_kind(addr);
00700   unicast_reply_locator_list_[0].port = LOCATOR_PORT_INVALID;
00701   RTPS::address_to_bytes(unicast_reply_locator_list_[0].address, addr);
00702 
00703   multicast_reply_locator_list_.length(1);
00704   multicast_reply_locator_list_[0].kind = address_to_kind(addr);
00705   multicast_reply_locator_list_[0].port = LOCATOR_PORT_INVALID;
00706   assign(multicast_reply_locator_list_[0].address, LOCATOR_ADDRESS_INVALID);
00707 
00708   have_timestamp_ = false;
00709   timestamp_ = TIME_INVALID;
00710 }

Here is the call graph for this function:

Here is the caller graph for this function:

void OpenDDS::DCPS::RtpsUdpReceiveStrategy::MessageReceiver::submsg ( const RTPS::InfoSourceSubmessage is  ) 
void OpenDDS::DCPS::RtpsUdpReceiveStrategy::MessageReceiver::submsg ( const RTPS::InfoTimestampSubmessage it  ) 

Definition at line 798 of file RtpsUdpReceiveStrategy.cpp.

References have_timestamp_, OpenDDS::RTPS::InfoTimestampSubmessage::smHeader, OpenDDS::RTPS::InfoTimestampSubmessage::timestamp, and timestamp_.

00800 {
00801   // see RTPS spec v2.1 section 8.3.7.9.10
00802   if (!(it.smHeader.flags & 2 /* InvalidateFlag */)) {
00803     have_timestamp_ = true;
00804     timestamp_ = it.timestamp;
00805   } else {
00806     have_timestamp_ = false;
00807   }
00808 }

void OpenDDS::DCPS::RtpsUdpReceiveStrategy::MessageReceiver::submsg ( const RTPS::InfoReplyIp4Submessage iri4  ) 

Definition at line 778 of file RtpsUdpReceiveStrategy.cpp.

References OpenDDS::DCPS::assign(), OpenDDS::RTPS::LOCATOR_KIND_UDPv4, multicast_reply_locator_list_, OpenDDS::RTPS::InfoReplyIp4Submessage::multicastLocator, OpenDDS::RTPS::InfoReplyIp4Submessage::smHeader, unicast_reply_locator_list_, and OpenDDS::RTPS::InfoReplyIp4Submessage::unicastLocator.

00780 {
00781   // see RTPS spec v2.1 sections 8.3.7.8.4 and 9.4.5.14
00782   unicast_reply_locator_list_.length(1);
00783   unicast_reply_locator_list_[0].kind = RTPS::LOCATOR_KIND_UDPv4;
00784   unicast_reply_locator_list_[0].port = iri4.unicastLocator.port;
00785   RTPS::assign(unicast_reply_locator_list_[0].address, iri4.unicastLocator.address);
00786 
00787   if (iri4.smHeader.flags & 2 /* MulticastFlag */) {
00788     multicast_reply_locator_list_.length(1);
00789     multicast_reply_locator_list_[0].kind = RTPS::LOCATOR_KIND_UDPv4;
00790     multicast_reply_locator_list_[0].port = iri4.multicastLocator.port;
00791     RTPS::assign(multicast_reply_locator_list_[0].address, iri4.multicastLocator.address);
00792   } else {
00793     multicast_reply_locator_list_.length(0);
00794   }
00795 }

Here is the call graph for this function:

void OpenDDS::DCPS::RtpsUdpReceiveStrategy::MessageReceiver::submsg ( const RTPS::InfoReplySubmessage ir  ) 

Definition at line 758 of file RtpsUdpReceiveStrategy.cpp.

References multicast_reply_locator_list_, OpenDDS::RTPS::InfoReplySubmessage::multicastLocatorList, OpenDDS::RTPS::InfoReplySubmessage::smHeader, unicast_reply_locator_list_, and OpenDDS::RTPS::InfoReplySubmessage::unicastLocatorList.

00759 {
00760   // see RTPS spec v2.1 section 8.3.7.8.4
00761   unicast_reply_locator_list_.length(ir.unicastLocatorList.length());
00762   for (CORBA::ULong i = 0; i < ir.unicastLocatorList.length(); ++i) {
00763     unicast_reply_locator_list_[i] = ir.unicastLocatorList[i];
00764   }
00765 
00766   if (ir.smHeader.flags & 2 /* MulticastFlag */) {
00767     multicast_reply_locator_list_.length(ir.multicastLocatorList.length());
00768     for (CORBA::ULong i = 0; i < ir.multicastLocatorList.length(); ++i) {
00769       multicast_reply_locator_list_[i] = ir.multicastLocatorList[i];
00770     }
00771 
00772   } else {
00773     multicast_reply_locator_list_.length(0);
00774   }
00775 }

void OpenDDS::DCPS::RtpsUdpReceiveStrategy::MessageReceiver::submsg ( const RTPS::InfoDestinationSubmessage id  ) 

Definition at line 744 of file RtpsUdpReceiveStrategy.cpp.

References OpenDDS::DCPS::assign(), dest_guid_prefix_, and local_.

00746 {
00747   // see RTPS spec v2.1 section 8.3.7.7.4
00748   for (size_t i = 0; i < sizeof(GuidPrefix_t); ++i) {
00749     if (id.guidPrefix[i]) { // if some byte is > 0, it's not UNKNOWN
00750       RTPS::assign(dest_guid_prefix_, id.guidPrefix);
00751       return;
00752     }
00753   }
00754   RTPS::assign(dest_guid_prefix_, local_);
00755 }

Here is the call graph for this function:

void OpenDDS::DCPS::RtpsUdpReceiveStrategy::MessageReceiver::submsg ( const RTPS::Submessage s  ) 

Definition at line 713 of file RtpsUdpReceiveStrategy.cpp.

References OpenDDS::RTPS::INFO_DST, OpenDDS::RTPS::Submessage::info_dst_sm, OpenDDS::RTPS::INFO_REPLY, OpenDDS::RTPS::INFO_REPLY_IP4, OpenDDS::RTPS::Submessage::info_reply_ipv4_sm, OpenDDS::RTPS::Submessage::info_reply_sm, OpenDDS::RTPS::INFO_SRC, OpenDDS::RTPS::Submessage::info_src_sm, OpenDDS::RTPS::INFO_TS, and OpenDDS::RTPS::Submessage::info_ts_sm.

Referenced by OpenDDS::DCPS::RtpsUdpReceiveStrategy::check_header().

00714 {
00715   using namespace RTPS;
00716 
00717   switch (s._d()) {
00718   case INFO_TS:
00719     submsg(s.info_ts_sm());
00720     break;
00721 
00722   case INFO_SRC:
00723     submsg(s.info_src_sm());
00724     break;
00725 
00726   case INFO_REPLY_IP4:
00727     submsg(s.info_reply_ipv4_sm());
00728     break;
00729 
00730   case INFO_DST:
00731     submsg(s.info_dst_sm());
00732     break;
00733 
00734   case INFO_REPLY:
00735     submsg(s.info_reply_sm());
00736     break;
00737 
00738   default:
00739     break;
00740   }
00741 }

Here is the caller graph for this function:


Member Data Documentation

Definition at line 127 of file RtpsUdpReceiveStrategy.h.

Referenced by fill_header(), reset(), and submsg().

Definition at line 120 of file RtpsUdpReceiveStrategy.h.

Referenced by MessageReceiver(), reset(), and submsg().

Definition at line 126 of file RtpsUdpReceiveStrategy.h.

Referenced by reset(), and submsg().

Definition at line 122 of file RtpsUdpReceiveStrategy.h.

Referenced by MessageReceiver(), reset(), and submsg().

Definition at line 121 of file RtpsUdpReceiveStrategy.h.

Referenced by MessageReceiver(), reset(), and submsg().

Definition at line 128 of file RtpsUdpReceiveStrategy.h.

Referenced by fill_header(), MessageReceiver(), reset(), and submsg().

Definition at line 125 of file RtpsUdpReceiveStrategy.h.

Referenced by reset(), and submsg().


The documentation for this struct was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 10 Aug 2018 for OpenDDS by  doxygen 1.6.1