OpenDDS
Snapshot(2023/04/07-19:43)
|
#include <UdpDataLink.h>
Public Member Functions | |
UdpDataLink (const UdpTransport_rch &transport, Priority priority, const ReactorTask_rch &reactor_task, bool active) | |
bool | active () const |
ReactorTask_rch | reactor_task () |
ACE_Reactor * | get_reactor () |
ACE_INET_Addr & | remote_address () |
ACE_SOCK_Dgram & | socket () |
bool | open (const ACE_INET_Addr &remote_address) |
void | control_received (ReceivedDataSample &sample, const ACE_INET_Addr &remote_address) |
![]() | |
DataLink (const TransportImpl_rch &impl, Priority priority, bool is_loopback, bool is_active) | |
Only called by our TransportImpl object. More... | |
virtual | ~DataLink () |
int | handle_exception (ACE_HANDLE) |
Reactor invokes this after being notified in schedule_stop or cancel_release. More... | |
void | schedule_stop (const MonotonicTimePoint &schedule_to_stop_at) |
void | stop () |
The stop method is used to stop the DataLink prior to shutdown. More... | |
void | resume_send () |
virtual int | make_reservation (const GUID_t &remote_subscription_id, const GUID_t &local_publication_id, const TransportSendListener_wrch &send_listener, bool reliable) |
virtual int | make_reservation (const GUID_t &remote_publication_id, const GUID_t &local_subscription_id, const TransportReceiveListener_wrch &receive_listener, bool reliable) |
void | release_reservations (GUID_t remote_id, GUID_t local_id, DataLinkSetMap &released_locals) |
void | schedule_delayed_release () |
const TimeDuration & | datalink_release_delay () const |
void | remove_listener (const GUID_t &local_id) |
void | send_start () |
void | send (TransportQueueElement *element) |
void | send_stop (GUID_t repoId) |
virtual RemoveResult | remove_sample (const DataSampleElement *sample) |
virtual void | remove_all_msgs (const GUID_t &pub_id) |
int | data_received (ReceivedDataSample &sample, const GUID_t &readerId=GUID_UNKNOWN) |
void | data_received_include (ReceivedDataSample &sample, const RepoIdSet &incl) |
DataLinkIdType | id () const |
Obtain a unique identifier for this DataLink object. More... | |
void | transport_shutdown () |
void | notify (ConnectionNotice notice) |
virtual void | pre_stop_i () |
void | release_resources () |
void | terminate_send () |
void | terminate_send_if_suspended () |
bool | is_target (const GUID_t &remote_id) |
void | clear_associations () |
int | handle_timeout (const ACE_Time_Value &tv, const void *arg) |
int | handle_close (ACE_HANDLE h, ACE_Reactor_Mask m) |
void | set_dscp_codepoint (int cp, ACE_SOCK &socket) |
Priority & | transport_priority () |
Priority | transport_priority () const |
bool & | is_loopback () |
bool | is_loopback () const |
bool & | is_active () |
bool | is_active () const |
bool | cancel_release () |
ACE_Message_Block * | create_control (char submessage_id, DataSampleHeader &header, Message_Block_Ptr data) |
SendControlStatus | send_control (const DataSampleHeader &header, Message_Block_Ptr data) |
GUIDSeq * | target_intersection (const GUID_t &pub_id, const GUIDSeq &in, size_t &n_subs) |
TransportImpl_rch | impl () const |
void | default_listener (const TransportReceiveListener_wrch &trl) |
TransportReceiveListener_wrch | default_listener () const |
bool | add_on_start_callback (const TransportClient_wrch &client, const GUID_t &remote) |
void | remove_on_start_callback (const TransportClient_wrch &client, const GUID_t &remote) |
void | invoke_on_start_callbacks (bool success) |
bool | invoke_on_start_callbacks (const GUID_t &local, const GUID_t &remote, bool success) |
void | remove_startup_callbacks (const GUID_t &local, const GUID_t &remote) |
void | set_scheduling_release (bool scheduling_release) |
virtual void | send_final_acks (const GUID_t &readerid) |
virtual WeakRcHandle< ICE::Endpoint > | get_ice_endpoint () const |
virtual bool | is_leading (const GUID_t &, const GUID_t &) const |
![]() | |
RcEventHandler () | |
ACE_Event_Handler::Reference_Count | add_reference () |
ACE_Event_Handler::Reference_Count | remove_reference () |
![]() | |
virtual | ~ACE_Event_Handler (void) |
virtual ACE_HANDLE | get_handle (void) const |
virtual void | set_handle (ACE_HANDLE) |
virtual int | priority (void) const |
virtual void | priority (int priority) |
virtual int | handle_input (ACE_HANDLE fd=ACE_INVALID_HANDLE) |
virtual int | handle_output (ACE_HANDLE fd=ACE_INVALID_HANDLE) |
virtual int | handle_exit (ACE_Process *) |
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) |
![]() | |
virtual | ~RcObject () |
virtual void | _add_ref () |
virtual void | _remove_ref () |
long | ref_count () const |
WeakObject * | _get_weak_object () const |
Protected Member Functions | |
virtual void | stop_i () |
![]() | |
int | start (const TransportSendStrategy_rch &send_strategy, const TransportStrategy_rch &receive_strategy, bool invoke_all=true) |
void | send_start_i () |
virtual void | send_i (TransportQueueElement *element, bool relink=true) |
void | send_stop_i (GUID_t repoId) |
GUIDSeq * | peer_ids (const GUID_t &local_id) const |
void | network_change () const |
void | replay_durable_data (const GUID_t &local_pub_id, const GUID_t &remote_sub_id) const |
TransportSendStrategy_rch | get_send_strategy () |
typedef | OPENDDS_MAP_CMP (GUID_t, TransportClient_wrch, GUID_tKeyLessThan) RepoToClientMap |
typedef | OPENDDS_MAP_CMP (GUID_t, RepoToClientMap, GUID_tKeyLessThan) OnStartCallbackMap |
typedef | OPENDDS_MAP_CMP (GUID_t, RepoIdSet, GUID_tKeyLessThan) PendingOnStartsMap |
![]() | |
ACE_Event_Handler (ACE_Reactor *=0, int priority=ACE_Event_Handler::LO_PRIORITY) | |
![]() | |
RcObject () | |
Protected Attributes | |
bool | active_ |
ReactorTask_rch | reactor_task_ |
UdpSendStrategy_rch | send_strategy_ |
UdpReceiveStrategy_rch | recv_strategy_ |
![]() | |
TransportStrategy_rch | receive_strategy_ |
The transport receive strategy object for this DataLink. More... | |
TransportSendStrategy_rch | send_strategy_ |
The transport send strategy object for this DataLink. More... | |
LockType | strategy_lock_ |
OnStartCallbackMap | on_start_callbacks_ |
PendingOnStartsMap | pending_on_starts_ |
TimeDuration | datalink_release_delay_ |
unique_ptr< MessageBlockAllocator > | mb_allocator_ |
unique_ptr< DataBlockAllocator > | db_allocator_ |
bool | is_loopback_ |
Is remote attached to same transport ? More... | |
bool | is_active_ |
Is pub or sub ? More... | |
bool | started_ |
SendResponseListener | send_response_listener_ |
Listener for TransportSendControlElements created in send_control. More... | |
Interceptor | interceptor_ |
![]() | |
Atomic_Reference_Count | reference_count_ |
Private Attributes | |
ACE_INET_Addr | remote_address_ |
ACE_SOCK_Dgram | socket_ |
Definition at line 35 of file UdpDataLink.h.
OpenDDS::DCPS::UdpDataLink::UdpDataLink | ( | const UdpTransport_rch & | transport, |
Priority | priority, | ||
const ReactorTask_rch & | reactor_task, | ||
bool | active | ||
) |
Definition at line 30 of file UdpDataLink.cpp.
ACE_INLINE bool OpenDDS::DCPS::UdpDataLink::active | ( | void | ) | const |
void OpenDDS::DCPS::UdpDataLink::control_received | ( | ReceivedDataSample & | sample, |
const ACE_INET_Addr & | remote_address | ||
) |
Definition at line 276 of file UdpDataLink.cpp.
References OpenDDS::DCPS::DataLink::impl(), and OPENDDS_TEST_AND_CALL.
Referenced by OpenDDS::DCPS::UdpReceiveStrategy::deliver_sample().
ACE_INLINE ACE_Reactor * OpenDDS::DCPS::UdpDataLink::get_reactor | ( | void | ) |
Definition at line 27 of file UdpDataLink.inl.
References ACE_INLINE, OpenDDS::DCPS::ReactorTask::get_reactor(), and reactor_task_.
Referenced by OpenDDS::DCPS::UdpReceiveStrategy::start_i(), and OpenDDS::DCPS::UdpReceiveStrategy::stop_i().
bool OpenDDS::DCPS::UdpDataLink::open | ( | const ACE_INET_Addr & | remote_address | ) |
Definition at line 46 of file UdpDataLink.cpp.
References ACE_DEFAULT_MESSAGE_BLOCK_PRIORITY, ACE_ERROR_RETURN, ACE_NEW_RETURN, ACE_TEXT(), active_, OpenDDS::DCPS::DirectPriorityMapper::codepoint(), OpenDDS::DCPS::CONNINFO_ALL, ACE_Message_Block::cont(), ACE_IPC_SAP::control(), OpenDDS::DCPS::TransportLocator::data, OpenDDS::DCPS::dynamic_rchandle_cast(), ENOTSUP, OpenDDS::DCPS::get_fully_qualified_hostname(), ACE_SOCK::get_local_addr(), OpenDDS::DCPS::TransportHeader::get_max_serialized_size(), OpenDDS::DCPS::DataSampleHeader::get_max_serialized_size(), ACE_INET_Addr::get_port_number(), ACE_Addr::get_type(), hostname(), OpenDDS::DCPS::DataLink::impl(), OpenDDS::DCPS::DataLink::is_loopback_, OpenDDS::DCPS::Encoding::KIND_UNALIGNED_CDR, ACE_Message_Block::length(), OpenDDS::DCPS::TransportHeader::length_, LM_DEBUG, LM_ERROR, OpenDDS::DCPS::MAX_SEND_BLOCKS, ACE_Time_Value::max_time, ACE_Message_Block::MB_DATA, OpenDDS::DCPS::TransportSendStrategy::mb_to_iov(), OpenDDS::DCPS::DataSampleHeader::message_id_, OpenDDS::DCPS::DataSampleHeader::message_length_, OpenDDS::DCPS::open_appropriate_socket_type(), OPENDDS_TEST_AND_CALL, ACE_SOCK_Dgram::recv(), recv_strategy_, ACE_Message_Block::release(), remote_address(), remote_address_, ACE_SOCK_Dgram::send(), send_strategy_, ACE_INET_Addr::set(), OpenDDS::DCPS::DataLink::set_dscp_codepoint(), ACE_SOCK::set_option(), SO_RCVBUF, SO_SNDBUF, socket(), socket_, SOL_SOCKET, OpenDDS::DCPS::DataLink::start(), stop_i(), OpenDDS::DCPS::TRANSPORT_CONTROL, OpenDDS::DCPS::DataLink::transport_priority(), OpenDDS::DCPS::TimeDuration::value(), VDBG, VDBG_LVL, and ACE_Time_Value::zero.
Referenced by OpenDDS::DCPS::UdpTransport::make_datalink().
ACE_INLINE ReactorTask_rch OpenDDS::DCPS::UdpDataLink::reactor_task | ( | ) |
ACE_INLINE ACE_INET_Addr & OpenDDS::DCPS::UdpDataLink::remote_address | ( | ) |
Definition at line 34 of file UdpDataLink.inl.
References ACE_INLINE, and remote_address_.
Referenced by open(), and OpenDDS::DCPS::UdpSendStrategy::send_bytes_i().
ACE_INLINE ACE_SOCK_Dgram & OpenDDS::DCPS::UdpDataLink::socket | ( | void | ) |
Definition at line 40 of file UdpDataLink.inl.
References OPENDDS_END_VERSIONED_NAMESPACE_DECL, and socket_.
Referenced by OpenDDS::DCPS::UdpReceiveStrategy::get_handle(), open(), OpenDDS::DCPS::UdpTransport::passive_connection(), OpenDDS::DCPS::UdpReceiveStrategy::receive_bytes(), OpenDDS::DCPS::UdpSendStrategy::send_bytes_i(), and OpenDDS::DCPS::UdpReceiveStrategy::start_i().
|
protectedvirtual |
This announces the "stop" event to our subclass. The "stop" event will occur when this DataLink is handling a release_reservations() call and determines that it has just released all of the remaining reservations on this DataLink. The "stop" event will also occur when the TransportImpl is being shutdown() - we call stop_i() from our transport_shutdown() method to handle this case.
Reimplemented from OpenDDS::DCPS::DataLink.
Definition at line 287 of file UdpDataLink.cpp.
References ACE_SOCK::close(), OPENDDS_END_VERSIONED_NAMESPACE_DECL, and socket_.
Referenced by open().
|
protected |
Definition at line 59 of file UdpDataLink.h.
|
protected |
Definition at line 61 of file UdpDataLink.h.
Referenced by get_reactor(), and reactor_task().
|
protected |
Definition at line 64 of file UdpDataLink.h.
Referenced by open().
|
private |
Definition at line 69 of file UdpDataLink.h.
Referenced by open(), and remote_address().
|
protected |
Definition at line 63 of file UdpDataLink.h.
Referenced by open().
|
private |
Definition at line 71 of file UdpDataLink.h.