OpenDDS
Snapshot(2023/04/07-19:43)
|
#include <ShmemTransport.h>
Classes | |
class | ReadTask |
Private Types | |
typedef ACE_Thread_Mutex | LockType |
typedef ACE_Guard< LockType > | GuardType |
Private Member Functions | |
ShmemDataLink_rch | make_datalink (const std::string &remote_address) |
Create the DataLink object and start it. More... | |
ShmemDataLink_rch | get_or_make_datalink (const char *caller, const RemoteTransport &remote) |
std::pair< std::string, std::string > | blob_to_key (const TransportBLOB &blob) |
void | read_from_links () |
typedef | OPENDDS_MAP (std::string, ShmemDataLink_rch) ShmemDataLinkMap |
Private Attributes | |
LockType | links_lock_ |
ShmemDataLinkMap | links_ |
unique_ptr< ShmemAllocator > | alloc_ |
unique_ptr< ReadTask > | read_task_ |
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 27 of file ShmemTransport.h.
|
private |
Definition at line 73 of file ShmemTransport.h.
|
private |
Definition at line 72 of file ShmemTransport.h.
|
explicit |
Definition at line 28 of file ShmemTransport.cpp.
References configure_i(), and OpenDDS::DCPS::TransportImpl::open().
|
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().
Implements OpenDDS::DCPS::TransportImpl.
Definition at line 107 of file ShmemTransport.cpp.
References get_or_make_datalink().
std::string OpenDDS::DCPS::ShmemTransport::address | ( | void | ) |
Definition at line 356 of file ShmemTransport.cpp.
References config(), and OPENDDS_END_VERSIONED_NAMESPACE_DECL.
|
inline |
Definition at line 32 of file ShmemTransport.h.
|
private |
Definition at line 258 of file ShmemTransport.cpp.
Referenced by get_or_make_datalink().
ShmemInst_rch OpenDDS::DCPS::ShmemTransport::config | ( | ) | const |
Definition at line 37 of file ShmemTransport.cpp.
References OpenDDS::DCPS::TransportImpl::config(), and OpenDDS::DCPS::dynamic_rchandle_cast().
Referenced by address(), connection_info_i(), and get_or_make_datalink().
|
protected |
Definition at line 133 of file ShmemTransport.cpp.
References ACE_ERROR, ACE_ERROR_RETURN, ACE_TEXT(), ACE_TEXT_CHAR_TO_TCHAR, alloc_, OpenDDS::DCPS::TransportImpl::create_reactor_task(), OpenDDS::DCPS::LogLevel::Error, LM_DEBUG, LM_ERROR, OpenDDS::DCPS::log_level, read_task_, and VDBG_LVL.
Referenced by ShmemTransport().
|
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 90 of file ShmemTransport.cpp.
References OpenDDS::DCPS::TransportImpl::AcceptConnectResult::ACR_SUCCESS, OpenDDS::DCPS::TransportImpl::add_pending_connection(), get_or_make_datalink(), and OpenDDS::DCPS::TransportImpl::RemoteTransport::repo_id_.
|
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 247 of file ShmemTransport.cpp.
References config().
|
private |
Definition at line 66 of file ShmemTransport.cpp.
References ACE_ERROR, OpenDDS::DCPS::TransportImpl::RemoteTransport::blob_, blob_to_key(), config(), OpenDDS::DCPS::LogLevel::Error, links_, links_lock_, LM_DEBUG, LM_ERROR, OpenDDS::DCPS::log_level, make_datalink(), and VDBG_LVL.
Referenced by accept_datalink(), and connect_datalink().
|
private |
Create the DataLink object and start it.
Definition at line 43 of file ShmemTransport.cpp.
References ACE_ERROR, OpenDDS::DCPS::LogLevel::Error, links_, LM_ERROR, OpenDDS::DCPS::log_level, and OpenDDS::DCPS::rchandle_from().
Referenced by get_or_make_datalink().
|
private |
Map of fully associated DataLinks for this transport. Protected by links_lock_.
|
private |
Definition at line 329 of file ShmemTransport.cpp.
References OpenDDS::DCPS::TransportImpl::is_shut_down(), links_, and links_lock_.
Referenced by OpenDDS::DCPS::ShmemTransport::ReadTask::svc().
|
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 269 of file ShmemTransport.cpp.
References links_, links_lock_, and OpenDDS::DCPS::DataLink::stop().
|
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 211 of file ShmemTransport.cpp.
References alloc_, links_, links_lock_, read_task_, and TheServiceParticipant.
void OpenDDS::DCPS::ShmemTransport::signal_semaphore | ( | ) |
Definition at line 347 of file ShmemTransport.cpp.
References OpenDDS::DCPS::TransportImpl::is_shut_down(), and read_task_.
|
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 114 of file ShmemTransport.cpp.
References ACE_GUARD, OpenDDS::DCPS::dynamic_rchandle_cast(), links_lock_, OpenDDS::DCPS::WeakRcHandle< T >::lock(), OpenDDS::DCPS::TransportImpl::pending_connections_, and OpenDDS::DCPS::TransportImpl::pending_connections_lock_.
|
inlineprotectedvirtual |
Implements OpenDDS::DCPS::TransportImpl.
Definition at line 60 of file ShmemTransport.h.
|
private |
Definition at line 82 of file ShmemTransport.h.
Referenced by configure_i(), and shutdown_i().
|
private |
Definition at line 80 of file ShmemTransport.h.
Referenced by get_or_make_datalink(), make_datalink(), read_from_links(), release_datalink(), and shutdown_i().
|
private |
Definition at line 75 of file ShmemTransport.h.
Referenced by get_or_make_datalink(), read_from_links(), release_datalink(), shutdown_i(), and stop_accepting_or_connecting().
|
private |
Definition at line 96 of file ShmemTransport.h.
Referenced by configure_i(), shutdown_i(), and signal_semaphore().