OpenDDS::DCPS::DataLinkSet Class Reference

#include <DataLinkSet.h>

Inheritance diagram for OpenDDS::DCPS::DataLinkSet:

Inheritance graph
[legend]
Collaboration diagram for OpenDDS::DCPS::DataLinkSet:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 DataLinkSet ()
virtual ~DataLinkSet ()
int insert_link (DataLink *link)
ssize_t remove_links (DataLinkSet *released_set)
void send (DataSampleListElement *sample)
 Send to each DataLink in the set.
SendControlStatus send_control (RepoId pub_id, TransportSendListener *listener, ACE_Message_Block *msg)
 Send control message to each DataLink in the set.
int remove_sample (const DataSampleListElement *sample, bool dropped_by_transport)
int remove_all_control_msgs (RepoId pub_id)
void send_start (DataLinkSet *link_set)
void send_stop ()
DataLinkSetselect_links (const RepoId *remoteIds, const CORBA::ULong num_targets)
DataLinkfind_link (const RepoId remoteId, const RepoId localId, const bool pub_side)
bool empty ()

Private Types

typedef ACE_SYNCH_MUTEX LockType
typedef ACE_Guard< LockTypeGuardType
typedef std::map< DataLinkIdType,
DataLink_rch
MapType

Private Attributes

MapType map_
 Hash map for DataLinks.
TransportSendControlElementAllocator send_control_element_allocator_
 Allocator for TransportSendControlElement.
LockType lock_

Member Typedef Documentation

typedef ACE_Guard<LockType> OpenDDS::DCPS::DataLinkSet::GuardType [private]

typedef ACE_SYNCH_MUTEX OpenDDS::DCPS::DataLinkSet::LockType [private]

typedef std::map<DataLinkIdType, DataLink_rch> OpenDDS::DCPS::DataLinkSet::MapType [private]


Constructor & Destructor Documentation

OpenDDS::DCPS::DataLinkSet::DataLinkSet (  ) 

OpenDDS::DCPS::DataLinkSet::~DataLinkSet (  )  [virtual]


Member Function Documentation

bool OpenDDS::DCPS::DataLinkSet::empty (  ) 

OpenDDS::DCPS::DataLink * OpenDDS::DCPS::DataLinkSet::find_link ( const RepoId  remoteId,
const RepoId  localId,
const bool  pub_side 
)

Find the datalink with association of remote/local ids. If the remote/local pair is the only association in the link then the link will be removed from the map.

int OpenDDS::DCPS::DataLinkSet::insert_link ( DataLink link  ) 

ACE_INLINE int OpenDDS::DCPS::DataLinkSet::remove_all_control_msgs ( RepoId  pub_id  ) 

ssize_t OpenDDS::DCPS::DataLinkSet::remove_links ( DataLinkSet released_set  ) 

This method is called to remove a set of DataLinks from this set (ie, set subtraction: this set minus released_set). Returns the num elems in the set after attempting the operation.

ACE_INLINE int OpenDDS::DCPS::DataLinkSet::remove_sample ( const DataSampleListElement sample,
bool  dropped_by_transport 
)

OpenDDS::DCPS::DataLinkSet * OpenDDS::DCPS::DataLinkSet::select_links ( const RepoId remoteIds,
const CORBA::ULong  num_targets 
)

ACE_INLINE void OpenDDS::DCPS::DataLinkSet::send ( DataSampleListElement sample  ) 

Send to each DataLink in the set.

Remove all reservations involving the remote_id from each DataLink in this set. The supplied 'released' map will be updated with all of the local_id to DataLink reservations that were made invalid as a result of the release operation.

ACE_INLINE OpenDDS::DCPS::SendControlStatus OpenDDS::DCPS::DataLinkSet::send_control ( RepoId  pub_id,
TransportSendListener listener,
ACE_Message_Block *  msg 
)

Send control message to each DataLink in the set.

ACE_INLINE void OpenDDS::DCPS::DataLinkSet::send_start ( DataLinkSet link_set  ) 

This will do several things, including adding to the membership of the send_links_ set. Any DataLinks added to the send_links_ set will be also told about the send_start() event. Those DataLinks (in the pub_links set) that are already in the send_links_ set will not be told about the send_start() event since they heard about it when they were inserted into the send_links_ set.

ACE_INLINE void OpenDDS::DCPS::DataLinkSet::send_stop (  ) 

This will inform each DataLink in the set about the send_stop() event. It will then clear the send_links_ set.


Member Data Documentation

LockType OpenDDS::DCPS::DataLinkSet::lock_ [private]

This lock will protect critical sections of code that play a role in the sending of data.

MapType OpenDDS::DCPS::DataLinkSet::map_ [private]

Hash map for DataLinks.

TransportSendControlElementAllocator OpenDDS::DCPS::DataLinkSet::send_control_element_allocator_ [private]

Allocator for TransportSendControlElement.


The documentation for this class was generated from the following files:
Generated on Fri Jun 20 10:21:47 2008 for OpenDDS by  doxygen 1.4.7