00001
00002
00003
00004
00005
00006
00007
00008 #include "EntryExit.h"
00009 #include "dds/DCPS/DataSampleElement.h"
00010
00011 namespace OpenDDS {
00012 namespace DCPS {
00013
00014 ACE_INLINE
00015 TransportSendControlElement::TransportSendControlElement(int initial_count,
00016 const RepoId& publisher_id,
00017 TransportSendListener* listener,
00018 const DataSampleHeader& header,
00019 ACE_Message_Block* msg_block,
00020 TransportSendControlElementAllocator* allocator)
00021 : TransportQueueElement(initial_count),
00022 publisher_id_(publisher_id),
00023 listener_(listener),
00024 header_(header),
00025 msg_(msg_block),
00026 dcps_elem_(0),
00027 allocator_(allocator)
00028 {
00029 DBG_ENTRY_LVL("TransportSendControlElement","TransportSendControlElement",6);
00030 }
00031
00032 ACE_INLINE
00033 TransportSendControlElement::TransportSendControlElement(int initial_count,
00034 const DataSampleElement* dcps_elem,
00035 TransportSendControlElementAllocator* allocator)
00036 : TransportQueueElement(initial_count)
00037 , publisher_id_(dcps_elem->get_pub_id())
00038 , listener_(dcps_elem->get_send_listener())
00039 , header_(dcps_elem->get_header())
00040 , msg_(dcps_elem->get_sample())
00041 , dcps_elem_(dcps_elem)
00042 , allocator_(allocator)
00043 {
00044 DBG_ENTRY_LVL("TransportSendControlElement", "TransportSendControlElement", 6);
00045 }
00046
00047 ACE_INLINE
00048 TransportSendControlElement*
00049 TransportSendControlElement::alloc(int initial_count,
00050 const RepoId& publisher_id,
00051 TransportSendListener* listener,
00052 const DataSampleHeader& header,
00053 ACE_Message_Block* message,
00054 TransportSendControlElementAllocator* allocator)
00055 {
00056 TransportSendControlElement* ret;
00057 ACE_NEW_MALLOC_RETURN(ret,
00058 static_cast<TransportSendControlElement*>(allocator->malloc()),
00059 TransportSendControlElement(initial_count, publisher_id, listener, header,
00060 message, allocator),
00061 0);
00062 return ret;
00063 }
00064
00065 ACE_INLINE
00066 TransportSendControlElement*
00067 TransportSendControlElement::alloc(int initial_count,
00068 const DataSampleElement* dcps_elem,
00069 TransportSendControlElementAllocator* allocator)
00070 {
00071 TransportSendControlElement* ret;
00072 ACE_NEW_MALLOC_RETURN(ret,
00073 static_cast<TransportSendControlElement*>(allocator->malloc()),
00074 TransportSendControlElement(initial_count, dcps_elem, allocator),
00075 0);
00076 return ret;
00077 }
00078
00079 ACE_INLINE
00080 bool
00081 TransportSendControlElement::owned_by_transport()
00082 {
00083 return false;
00084 }
00085
00086 ACE_INLINE
00087 SequenceNumber
00088 TransportSendControlElement::sequence() const
00089 {
00090 return this->header_.sequence_;
00091 }
00092
00093 }
00094 }