OpenDDS
Snapshot(2023/04/07-19:43)
|
#include <MulticastTransport.h>
Private Types | |
typedef ACE_SYNCH_MUTEX | LockType |
typedef ACE_Guard< LockType > | GuardType |
typedef ACE_Thread_Mutex | ThreadLockType |
typedef ACE_Guard< ThreadLockType > | GuardThreadType |
typedef std::vector< DataLink::OnStartCallback > | Callbacks |
typedef std::pair< MulticastPeer, MulticastPeer > | Peers |
Private Member Functions | |
MulticastDataLink_rch | make_datalink (const GUID_t &local_id, Priority priority, bool active) |
MulticastSession_rch | start_session (const MulticastDataLink_rch &link, MulticastPeer remote_peer, bool active) |
typedef | OPENDDS_MAP (MulticastPeer, MulticastDataLink_rch) Links |
link for pubs. More... | |
typedef | OPENDDS_MAP (Peers, Callbacks) PendConnMap |
OPENDDS_SET (Peers) connections_ | |
Private Attributes | |
ThreadLockType | links_lock_ |
Links | client_links_ |
Links | server_links_ |
link for subs. More... | |
ThreadLockType | connections_lock_ |
PendConnMap | pending_connections_ |
Additional Inherited Members | |
![]() | |
LockType | lock_ |
Lock to protect the config_ and reactor_task_ data members. More... | |
WeakRcHandle< TransportInst > | config_ |
ReactorTask_rch | reactor_task_ |
EventDispatcher_rch | event_dispatcher_ |
smart ptr to the associated DL cleanup task More... | |
unique_ptr< Monitor > | monitor_ |
Monitor object for this entity. More... | |
![]() | |
typedef ACE_SYNCH_MUTEX | LockType |
typedef ACE_Guard< LockType > | GuardType |
![]() | |
LockType | pending_connections_lock_ |
Lock to protect the pending_connections_ data member. More... | |
PendConnMap | pending_connections_ |
AtomicBool | is_shut_down_ |
Id of the last link established. More... | |
Definition at line 28 of file MulticastTransport.h.
|
private |
Definition at line 92 of file MulticastTransport.h.
|
private |
Definition at line 69 of file MulticastTransport.h.
|
private |
Definition at line 66 of file MulticastTransport.h.
|
private |
Definition at line 65 of file MulticastTransport.h.
|
private |
Definition at line 93 of file MulticastTransport.h.
|
private |
Definition at line 68 of file MulticastTransport.h.
|
explicit |
Definition at line 31 of file MulticastTransport.cpp.
References configure_i(), and OpenDDS::DCPS::TransportImpl::open().
OpenDDS::DCPS::MulticastTransport::~MulticastTransport | ( | ) |
Definition at line 39 of file MulticastTransport.cpp.
|
protectedvirtual |
accept_datalink() is called from TransportClient to initiate an association as the passive peer. A DataLink may be returned if one is already connected and ready to use, otherwise passively wait for a physical connection from the active side (either in the form of a connection event or handshaking message). Upon completion of the physical connection, the transport calls back to TransportClient::use_datalink().
active
active
Implements OpenDDS::DCPS::TransportImpl.
Definition at line 210 of file MulticastTransport.cpp.
References OpenDDS::DCPS::TransportImpl::AcceptConnectResult::ACR_FAILED, OpenDDS::DCPS::TransportImpl::AcceptConnectResult::ACR_SUCCESS, config(), connections_lock_, OpenDDS::DCPS::RepoIdConverter::federationId(), OpenDDS::DCPS::get_remote_reliability(), OpenDDS::DCPS::RcHandle< T >::is_nil(), links_lock_, LM_DEBUG, OpenDDS::DCPS::TransportImpl::ConnectionAttribs::local_id_, make_datalink(), OpenDDS::DCPS::RepoIdConverter::participantId(), pending_connections_, OpenDDS::DCPS::TransportImpl::ConnectionAttribs::priority_, OpenDDS::DCPS::push_back(), ACE_Guard< ACE_LOCK >::release(), OpenDDS::DCPS::TransportImpl::RemoteTransport::repo_id_, OpenDDS::DCPS::RcHandle< T >::reset(), server_links_, start_session(), and VDBG.
|
protectedvirtual |
Reimplemented from OpenDDS::DCPS::TransportImpl.
Definition at line 435 of file MulticastTransport.cpp.
References client_links_, OpenDDS::DCPS::RepoIdConverter::federationId(), links_lock_, OPENDDS_END_VERSIONED_NAMESPACE_DECL, OpenDDS::DCPS::RepoIdConverter::participantId(), and ACE_Guard< ACE_LOCK >::release().
MulticastInst_rch OpenDDS::DCPS::MulticastTransport::config | ( | ) | const |
Definition at line 45 of file MulticastTransport.cpp.
References OpenDDS::DCPS::TransportImpl::config(), and OpenDDS::DCPS::dynamic_rchandle_cast().
Referenced by accept_datalink(), connect_datalink(), connection_info_i(), make_datalink(), passive_connection(), and start_session().
|
protected |
Definition at line 368 of file MulticastTransport.cpp.
References ACE_ERROR_RETURN, ACE_TEXT(), OpenDDS::DCPS::TransportImpl::create_reactor_task(), INET6_ADDRSTRLEN, OpenDDS::DCPS::LogAddr::ip(), LM_ERROR, and TheServiceParticipant.
Referenced by MulticastTransport().
|
protectedvirtual |
connect_datalink() is called from TransportClient to initiate an association as the active peer. A DataLink may be returned if one is already connected and ready to use, otherwise initiate a connection to the passive side and return from this method. Upon completion of the physical connection, the transport calls back to TransportClient::use_datalink().
Implements OpenDDS::DCPS::TransportImpl.
Definition at line 150 of file MulticastTransport.cpp.
References OpenDDS::DCPS::TransportImpl::AcceptConnectResult::ACR_FAILED, OpenDDS::DCPS::TransportImpl::AcceptConnectResult::ACR_SUCCESS, client_links_, config(), OpenDDS::DCPS::RepoIdConverter::federationId(), OpenDDS::DCPS::get_remote_reliability(), OpenDDS::DCPS::RcHandle< T >::is_nil(), links_lock_, OpenDDS::DCPS::TransportImpl::ConnectionAttribs::local_id_, make_datalink(), OpenDDS::DCPS::RepoIdConverter::participantId(), OpenDDS::DCPS::TransportImpl::ConnectionAttribs::priority_, OpenDDS::DCPS::TransportImpl::RemoteTransport::repo_id_, and start_session().
|
protectedvirtual |
Called by our connection_info() method to allow the concrete TransportImpl subclass to do the dirty work since it really is the one that knows how to populate the supplied TransportLocator object.
Implements OpenDDS::DCPS::TransportImpl.
Definition at line 418 of file MulticastTransport.cpp.
References config().
|
private |
Definition at line 51 of file MulticastTransport.cpp.
References ACE_ERROR, ACE_TEXT(), OpenDDS::DCPS::LogAddr::c_str(), config(), OpenDDS::DCPS::RepoIdConverter::federationId(), OpenDDS::DCPS::LogAddr::HostPort, LM_DEBUG, LM_ERROR, OpenDDS::DCPS::RepoIdConverter::participantId(), OpenDDS::DCPS::rchandle_from(), OpenDDS::DCPS::TransportImpl::reactor_task(), OpenDDS::DCPS::ref(), and VDBG_LVL.
Referenced by accept_datalink(), and connect_datalink().
|
private |
link for pubs.
|
private |
void OpenDDS::DCPS::MulticastTransport::passive_connection | ( | MulticastPeer | local_peer, |
MulticastPeer | remote_peer | ||
) |
Definition at line 314 of file MulticastTransport.cpp.
References ACE_Guard< ACE_LOCK >::acquire(), config(), connections_lock_, OpenDDS::DCPS::find(), LM_DEBUG, OpenDDS::DCPS::WeakRcHandle< T >::lock(), pending_connections_, ACE_Guard< ACE_LOCK >::release(), server_links_, OpenDDS::DCPS::static_rchandle_cast(), and VDBG_LVL.
|
protectedvirtual |
Called by the TransportRegistry when this TransportImpl object is released while the TransportRegistry is handling a release() "event". The DataLink itself calls this method when it thinks it is no longer used for any associations. This occurs during a "remove associations" operation being performed by some TransportClient that uses this TransportImpl. The TransportClient is known to have acquired our reservation_lock_, so there won't be any reserve_datalink() calls being made from any other threads while we perform this release.
Implements OpenDDS::DCPS::TransportImpl.
Definition at line 429 of file MulticastTransport.cpp.
|
protectedvirtual |
Called during the shutdown() method in order to give the concrete TransportImpl subclass a chance to do something when the shutdown "event" occurs.
Implements OpenDDS::DCPS::TransportImpl.
Definition at line 393 of file MulticastTransport.cpp.
References client_links_, links_lock_, and server_links_.
|
private |
Definition at line 90 of file MulticastTransport.cpp.
References ACE_ERROR_RETURN, ACE_TEXT(), config(), OpenDDS::DCPS::RcHandle< T >::is_nil(), and LM_ERROR.
Referenced by accept_datalink(), and connect_datalink().
|
protectedvirtual |
stop_accepting_or_connecting() is called from TransportClient to terminate the accepting process begun by accept_datalink() or connect_datalink(). This allows the TransportImpl to clean up any resources associated with this pending connection. The TransportClient* passed in to accept or connect is not valid after this method is called.
Implements OpenDDS::DCPS::TransportImpl.
Definition at line 286 of file MulticastTransport.cpp.
References connections_lock_, LM_DEBUG, pending_connections_, and VDBG.
|
inlineprotectedvirtual |
Implements OpenDDS::DCPS::TransportImpl.
Definition at line 59 of file MulticastTransport.h.
|
private |
Definition at line 81 of file MulticastTransport.h.
Referenced by client_stop(), connect_datalink(), and shutdown_i().
|
private |
Definition at line 91 of file MulticastTransport.h.
Referenced by accept_datalink(), passive_connection(), and stop_accepting_or_connecting().
|
private |
Definition at line 78 of file MulticastTransport.h.
Referenced by accept_datalink(), client_stop(), connect_datalink(), and shutdown_i().
|
private |
Definition at line 95 of file MulticastTransport.h.
Referenced by accept_datalink(), passive_connection(), and stop_accepting_or_connecting().
|
private |
link for subs.
Definition at line 83 of file MulticastTransport.h.
Referenced by accept_datalink(), passive_connection(), and shutdown_i().