OpenDDS
Snapshot(2023/04/07-19:43)
|
#include <ShmemReceiveStrategy.h>
Public Member Functions | |
ShmemReceiveStrategy (ShmemDataLink *link) | |
void | read () |
![]() | |
virtual | ~TransportReceiveStrategy () |
int | start () |
void | stop () |
int | handle_dds_input (ACE_HANDLE fd) |
virtual void | relink (bool do_suspend=true) |
const TransportHeader & | received_header () const |
TransportHeader & | received_header () |
const DataSampleHeader & | received_sample_header () const |
DataSampleHeader & | received_sample_header () |
ACE_Message_Block * | to_msgblock (const ReceivedDataSample &sample) |
![]() | |
virtual | ~TransportStrategy () |
![]() | |
virtual | ~RcObject () |
virtual void | _add_ref () |
virtual void | _remove_ref () |
long | ref_count () const |
WeakObject * | _get_weak_object () const |
Protected Member Functions | |
virtual ssize_t | receive_bytes (iovec iov[], int n, ACE_INET_Addr &remote_address, ACE_HANDLE fd, bool &stop) |
Only our subclass knows how to do this. More... | |
virtual void | deliver_sample (ReceivedDataSample &sample, const ACE_INET_Addr &remote_address) |
Called when there is a ReceivedDataSample to be delivered. More... | |
virtual int | start_i () |
Let the subclass start. More... | |
virtual void | stop_i () |
Let the subclass stop. More... | |
![]() | |
TransportReceiveStrategy (const TransportInst_rch &config, size_t receive_buffers_count=RECEIVE_BUFFERS) | |
virtual bool | check_header (const TransportHeader &header) |
Check the transport header for suitability. More... | |
virtual bool | check_header (const DataSampleHeader &header) |
Check the data sample header for suitability. More... | |
virtual void | begin_transport_header_processing () |
Begin Current Transport Header Processing. More... | |
virtual void | end_transport_header_processing () |
End Current Transport Header Processing. More... | |
virtual void | finish_message () |
int | skip_bad_pdus () |
Ignore bad PDUs by skipping over them. More... | |
void | reset () |
size_t | pdu_remaining () const |
size_t | successor_index (size_t index) const |
Manage an index into the receive buffer array. More... | |
void | update_buffer_index (bool &done) |
virtual bool | reassemble (ReceivedDataSample &data) |
OPENDDS_VECTOR (ACE_Message_Block *) receive_buffers_ | |
Set of receive buffers in use. More... | |
![]() | |
RcObject () | |
Private Attributes | |
ShmemDataLink * | link_ |
std::string | bound_name_ |
ShmemData * | current_data_ |
size_t | partial_recv_remaining_ |
const char * | partial_recv_ptr_ |
ACE_Thread_Mutex | mutex_ |
Additional Inherited Members | |
![]() | |
static const size_t | RECEIVE_BUFFERS = DEFAULT_TRANSPORT_RECEIVE_BUFFERS |
static const size_t | BUFFER_LOW_WATER = 4096 |
static const size_t | MESSAGE_BLOCKS = 1000 |
static const size_t | DATA_BLOCKS = 100 |
![]() | |
bool | gracefully_disconnected_ |
Flag indicates if the GRACEFUL_DISCONNECT message is received. More... | |
size_t | receive_sample_remaining_ |
Bytes remaining in the current DataSample. More... | |
TransportHeader | receive_transport_header_ |
Current receive TransportHeader. More... | |
TransportMessageBlockAllocator | mb_allocator_ |
TransportDataBlockAllocator | db_allocator_ |
TransportDataAllocator | data_allocator_ |
ACE_Lock_Adapter< ACE_SYNCH_MUTEX > | receive_lock_ |
Locking strategy for the allocators. More... | |
size_t | buffer_index_ |
Current receive buffer index in use. More... | |
DataSampleHeader | data_sample_header_ |
Current data sample header. More... | |
ACE_Message_Block * | payload_ |
bool | good_pdu_ |
size_t | pdu_remaining_ |
Amount of the current PDU that has not been processed yet. More... | |
Definition at line 25 of file ShmemReceiveStrategy.h.
|
explicit |
Definition at line 23 of file ShmemReceiveStrategy.cpp.
|
protectedvirtual |
Called when there is a ReceivedDataSample to be delivered.
Implements OpenDDS::DCPS::TransportReceiveStrategy<>.
Definition at line 181 of file ShmemReceiveStrategy.cpp.
References OpenDDS::DCPS::ShmemDataLink::control_received(), OpenDDS::DCPS::DataLink::data_received(), OpenDDS::DCPS::ReceivedDataSample::header_, link_, OpenDDS::DCPS::DataSampleHeader::message_id_, OpenDDS::DCPS::REQUEST_ACK, OpenDDS::DCPS::ShmemDataLink::request_ack_received(), and OpenDDS::DCPS::TRANSPORT_CONTROL.
void OpenDDS::DCPS::ShmemReceiveStrategy::read | ( | void | ) |
Definition at line 33 of file ShmemReceiveStrategy.cpp.
References bound_name_, current_data_, OpenDDS::DCPS::ShmemData::EndOfAlloc, ACE_Malloc_T< class, ACE_LOCK, ACE_CB >::find(), OpenDDS::DCPS::ShmemData::Free, OpenDDS::DCPS::TransportReceiveStrategy<>::handle_dds_input(), link_, LM_DEBUG, OpenDDS::DCPS::ShmemDataLink::local_address(), partial_recv_remaining_, OpenDDS::DCPS::ShmemDataLink::peer_allocator(), OpenDDS::DCPS::ShmemData::RecvDone, OpenDDS::DCPS::TransportReceiveStrategy<>::start(), OpenDDS::DCPS::ShmemData::status_, VDBG, and VDBG_LVL.
|
protectedvirtual |
Only our subclass knows how to do this.
Implements OpenDDS::DCPS::TransportReceiveStrategy<>.
Definition at line 81 of file ShmemReceiveStrategy.cpp.
References bound_name_, current_data_, ENOBUFS, ACE_Malloc_T< class, ACE_LOCK, ACE_CB >::find(), OpenDDS::DCPS::TransportHeader::get_length(), OpenDDS::DCPS::TransportReceiveStrategy<>::gracefully_disconnected_, OpenDDS::DCPS::ShmemData::InUse, link_, LM_DEBUG, LM_ERROR, ACE_Malloc_T< class, ACE_LOCK, ACE_CB >::memory_pool(), partial_recv_ptr_, partial_recv_remaining_, OpenDDS::DCPS::ShmemData::payload_, OpenDDS::DCPS::ShmemDataLink::peer_allocator(), OpenDDS::DCPS::ShmemData::RecvDone, OpenDDS::DCPS::ShmemDataLink::signal_semaphore(), OpenDDS::DCPS::ShmemData::status_, OpenDDS::DCPS::ShmemData::transport_header_, VDBG, and VDBG_LVL.
|
protectedvirtual |
Let the subclass start.
Implements OpenDDS::DCPS::TransportReceiveStrategy<>.
Definition at line 200 of file ShmemReceiveStrategy.cpp.
|
protectedvirtual |
Let the subclass stop.
Implements OpenDDS::DCPS::TransportReceiveStrategy<>.
Definition at line 206 of file ShmemReceiveStrategy.cpp.
References OPENDDS_END_VERSIONED_NAMESPACE_DECL.
|
private |
Definition at line 47 of file ShmemReceiveStrategy.h.
Referenced by read(), and receive_bytes().
|
private |
Definition at line 48 of file ShmemReceiveStrategy.h.
Referenced by read(), and receive_bytes().
|
private |
Definition at line 46 of file ShmemReceiveStrategy.h.
Referenced by deliver_sample(), read(), and receive_bytes().
|
private |
Definition at line 51 of file ShmemReceiveStrategy.h.
|
private |
Definition at line 50 of file ShmemReceiveStrategy.h.
Referenced by receive_bytes().
|
private |
Definition at line 49 of file ShmemReceiveStrategy.h.
Referenced by read(), and receive_bytes().