OpenDDS
Snapshot(2023/04/07-19:43)
|
#include <UdpReceiveStrategy.h>
Public Member Functions | |
UdpReceiveStrategy (UdpDataLink *link) | |
virtual ACE_HANDLE | get_handle () const |
virtual int | handle_input (ACE_HANDLE fd) |
![]() | |
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 |
![]() | |
RcEventHandler () | |
ACE_Event_Handler::Reference_Count | add_reference () |
ACE_Event_Handler::Reference_Count | remove_reference () |
![]() | |
virtual | ~ACE_Event_Handler (void) |
virtual void | set_handle (ACE_HANDLE) |
virtual int | priority (void) const |
virtual void | priority (int priority) |
virtual int | handle_output (ACE_HANDLE fd=ACE_INVALID_HANDLE) |
virtual int | handle_exception (ACE_HANDLE fd=ACE_INVALID_HANDLE) |
virtual int | handle_timeout (const ACE_Time_Value ¤t_time, const void *act=0) |
virtual int | handle_exit (ACE_Process *) |
virtual int | handle_close (ACE_HANDLE handle, ACE_Reactor_Mask close_mask) |
virtual int | handle_signal (int signum, siginfo_t *=0, ucontext_t *=0) |
virtual int | resume_handler (void) |
virtual int | handle_qos (ACE_HANDLE=ACE_INVALID_HANDLE) |
virtual int | handle_group_qos (ACE_HANDLE=ACE_INVALID_HANDLE) |
virtual void | reactor (ACE_Reactor *reactor) |
virtual ACE_Reactor * | reactor (void) const |
virtual ACE_Reactor_Timer_Interface * | reactor_timer_interface (void) const |
Reference_Counting_Policy & | reference_counting_policy (void) |
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... | |
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... | |
![]() | |
TransportReceiveStrategy (const TransportInst_rch &config, size_t receive_buffers_count=RECEIVE_BUFFERS) | |
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) |
OPENDDS_VECTOR (ACE_Message_Block *) receive_buffers_ | |
Set of receive buffers in use. More... | |
![]() | |
RcObject () | |
![]() | |
ACE_Event_Handler (ACE_Reactor *=0, int priority=ACE_Event_Handler::LO_PRIORITY) | |
Private Types | |
typedef std::pair< TransportReassembly_rch, SequenceNumber > | ReassemblyInfo |
Private Member Functions | |
virtual bool | reassemble (ReceivedDataSample &data) |
typedef | OPENDDS_MAP (ACE_INET_Addr, ReassemblyInfo) ReassemblyMap |
Private Attributes | |
UdpDataLink * | link_ |
SequenceNumber | expected_ |
ACE_INET_Addr | remote_address_ |
ReassemblyMap | reassembly_ |
Definition at line 25 of file UdpReceiveStrategy.h.
|
private |
Definition at line 63 of file UdpReceiveStrategy.h.
|
explicit |
Definition at line 21 of file UdpReceiveStrategy.cpp.
|
protectedvirtual |
Check the transport header for suitability.
Reimplemented from OpenDDS::DCPS::TransportReceiveStrategy<>.
Definition at line 116 of file UdpReceiveStrategy.cpp.
References ACE_TEXT(), expected_, OpenDDS::DCPS::SequenceNumber::getValue(), LM_WARNING, OpenDDS::DCPS::SequenceNumber::previous(), reassembly_, remote_address_, OpenDDS::DCPS::TransportHeader::sequence_, OpenDDS::DCPS::SequenceNumber::SEQUENCENUMBER_UNKNOWN(), and VDBG_LVL.
|
inlineprotectedvirtual |
Check the data sample header for suitability.
Reimplemented from OpenDDS::DCPS::TransportReceiveStrategy<>.
Definition at line 50 of file UdpReceiveStrategy.h.
References OpenDDS::DCPS::TransportReceiveStrategy< TH, DSH >::check_header().
|
protectedvirtual |
Called when there is a ReceivedDataSample to be delivered.
Implements OpenDDS::DCPS::TransportReceiveStrategy<>.
Definition at line 56 of file UdpReceiveStrategy.cpp.
References OpenDDS::DCPS::UdpDataLink::control_received(), OpenDDS::DCPS::DataLink::data_received(), OpenDDS::DCPS::ReceivedDataSample::header_, link_, OpenDDS::DCPS::DataSampleHeader::message_id_, and OpenDDS::DCPS::TRANSPORT_CONTROL.
|
virtual |
Reimplemented from ACE_Event_Handler.
Definition at line 29 of file UdpReceiveStrategy.cpp.
References ACE_IPC_SAP::get_handle(), link_, socket(), and OpenDDS::DCPS::UdpDataLink::socket().
|
virtual |
Reimplemented from ACE_Event_Handler.
Definition at line 36 of file UdpReceiveStrategy.cpp.
References OpenDDS::DCPS::TransportReceiveStrategy<>::handle_dds_input(), and TheServiceParticipant.
|
private |
|
privatevirtual |
Reimplemented from OpenDDS::DCPS::TransportReceiveStrategy<>.
Definition at line 139 of file UdpReceiveStrategy.cpp.
References header, OPENDDS_END_VERSIONED_NAMESPACE_DECL, reassembly_, OpenDDS::DCPS::TransportReceiveStrategy<>::received_header(), and remote_address_.
|
protectedvirtual |
Only our subclass knows how to do this.
Implements OpenDDS::DCPS::TransportReceiveStrategy<>.
Definition at line 44 of file UdpReceiveStrategy.cpp.
References link_, ACE_SOCK_Dgram::recv(), remote_address_, and OpenDDS::DCPS::UdpDataLink::socket().
|
protectedvirtual |
Let the subclass start.
Implements OpenDDS::DCPS::TransportReceiveStrategy<>.
Definition at line 72 of file UdpReceiveStrategy.cpp.
References ACE_DEBUG, ACE_ERROR_RETURN, ACE_TEXT(), ACE_SOCK::get_local_addr(), OpenDDS::DCPS::UdpDataLink::get_reactor(), link_, LM_DEBUG, LM_ERROR, ACE_Event_Handler::reactor(), ACE_Event_Handler::READ_MASK, ACE_Reactor::register_handler(), OpenDDS::DCPS::UdpDataLink::socket(), and OpenDDS::DCPS::Transport_debug_level.
|
protectedvirtual |
Let the subclass stop.
Implements OpenDDS::DCPS::TransportReceiveStrategy<>.
Definition at line 101 of file UdpReceiveStrategy.cpp.
References ACE_ERROR, ACE_TEXT(), OpenDDS::DCPS::UdpDataLink::get_reactor(), link_, LM_ERROR, ACE_Event_Handler::reactor(), ACE_Event_Handler::READ_MASK, and ACE_Reactor::remove_handler().
|
private |
Definition at line 60 of file UdpReceiveStrategy.h.
Referenced by check_header().
|
private |
Definition at line 59 of file UdpReceiveStrategy.h.
Referenced by deliver_sample(), get_handle(), receive_bytes(), start_i(), and stop_i().
|
private |
Definition at line 65 of file UdpReceiveStrategy.h.
Referenced by check_header(), and reassemble().
|
private |
Definition at line 61 of file UdpReceiveStrategy.h.
Referenced by check_header(), reassemble(), and receive_bytes().