OpenDDS::DCPS::ReceivedDataElement Class Reference

#include <ReceivedDataElementList.h>

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

List of all members.

Public Member Functions

 ReceivedDataElement (const DataSampleHeader &header, void *received_data, ACE_Recursive_Thread_Mutex *mx)
virtual ~ReceivedDataElement ()
void dec_ref ()
void inc_ref ()
long ref_count ()
void * operator new (size_t size, ACE_New_Allocator &pool)
void operator delete (void *memory)
void operator delete (void *memory, ACE_New_Allocator &pool)

Public Attributes

PublicationId pub_
void *const registered_data_
 Data sample received.
DDS::SampleStateKind sample_state_
DDS::Time_t source_timestamp_
 Source time stamp for this data sample.
DDS::Time_t destination_timestamp_
 Reception time stamp for this data sample.
bool coherent_change_
 Sample belongs to an active coherent change set.
bool group_coherent_
 Sample belongs to a group coherent changes.
RepoId publisher_id_
 Publisher id represent group identifier.
size_t disposed_generation_count_
size_t no_writers_generation_count_
ACE_Atomic_Op
< ACE_Thread_Mutex, long > 
zero_copy_cnt_
SequenceNumber sequence_
 The data sample's sequence number.
ReceivedDataElementprevious_data_sample_
 the previous data sample in the ReceivedDataElementList
ReceivedDataElementnext_data_sample_
 the next data sample in the ReceivedDataElementList

Protected Attributes

ACE_Recursive_Thread_Mutexmx_

Private Attributes

ACE_Atomic_Op
< ACE_Thread_Mutex, long > 
ref_count_

Detailed Description

Definition at line 34 of file ReceivedDataElementList.h.


Constructor & Destructor Documentation

OpenDDS::DCPS::ReceivedDataElement::ReceivedDataElement ( const DataSampleHeader header,
void *  received_data,
ACE_Recursive_Thread_Mutex mx 
) [inline]

Definition at line 36 of file ReceivedDataElementList.h.

References ACE_OS::gettimeofday(), OpenDDS::DCPS::DataSampleHeader::source_timestamp_nanosec_, OpenDDS::DCPS::DataSampleHeader::source_timestamp_sec_, and OpenDDS::DCPS::time_value_to_time().

00037     : pub_(header.publication_id_),
00038       registered_data_(received_data),
00039       sample_state_(DDS::NOT_READ_SAMPLE_STATE),
00040 #ifndef OPENDDS_NO_OBJECT_MODEL_PROFILE
00041       coherent_change_(header.coherent_change_),
00042       group_coherent_(header.group_coherent_),
00043       publisher_id_ (header.publisher_id_),
00044 #endif
00045       disposed_generation_count_(0),
00046       no_writers_generation_count_(0),
00047       zero_copy_cnt_(0),
00048       sequence_(header.sequence_),
00049       previous_data_sample_(0),
00050       next_data_sample_(0),
00051       ref_count_(1),
00052       mx_(mx)
00053   {
00054 
00055     this->destination_timestamp_ = time_value_to_time(ACE_OS::gettimeofday());
00056 
00057     this->source_timestamp_.sec = header.source_timestamp_sec_;
00058     this->source_timestamp_.nanosec = header.source_timestamp_nanosec_;
00059   }

Here is the call graph for this function:

virtual OpenDDS::DCPS::ReceivedDataElement::~ReceivedDataElement (  )  [inline, virtual]

Definition at line 61 of file ReceivedDataElementList.h.

00061 {}


Member Function Documentation

void OpenDDS::DCPS::ReceivedDataElement::dec_ref (  )  [inline]
void OpenDDS::DCPS::ReceivedDataElement::inc_ref (  )  [inline]

Definition at line 68 of file ReceivedDataElementList.h.

Referenced by TAO::DCPS::ZeroCopyDataSeq< Sample_T, DEF_MAX >::assign_ptr().

00068                  {
00069     ++this->ref_count_;
00070   }

Here is the caller graph for this function:

void OpenDDS::DCPS::ReceivedDataElement::operator delete ( void *  memory,
ACE_New_Allocator pool 
)

Definition at line 50 of file ReceivedDataElementList.cpp.

References operator delete().

00051 {
00052   operator delete(memory);
00053 }

Here is the call graph for this function:

void OpenDDS::DCPS::ReceivedDataElement::operator delete ( void *  memory  ) 

Definition at line 42 of file ReceivedDataElementList.cpp.

References OpenDDS::DCPS::ReceivedDataElementMemoryBlock::allocator_, and ACE_New_Allocator::free().

Referenced by operator delete().

00043 {
00044   if (memory) {
00045     OpenDDS::DCPS::ReceivedDataElementMemoryBlock* block = static_cast<OpenDDS::DCPS::ReceivedDataElementMemoryBlock*>(memory);
00046     block->allocator_->free(block);
00047   }
00048 }

Here is the call graph for this function:

Here is the caller graph for this function:

void * OpenDDS::DCPS::ReceivedDataElement::operator new ( size_t  size,
ACE_New_Allocator pool 
)

Definition at line 35 of file ReceivedDataElementList.cpp.

References OpenDDS::DCPS::ReceivedDataElementMemoryBlock::allocator_, and ACE_New_Allocator::malloc().

00036 {
00037   OpenDDS::DCPS::ReceivedDataElementMemoryBlock* block =  static_cast<OpenDDS::DCPS::ReceivedDataElementMemoryBlock*>(pool.malloc(sizeof(OpenDDS::DCPS::ReceivedDataElementMemoryBlock)));
00038   block->allocator_ = &pool;
00039   return block;
00040 }

Here is the call graph for this function:

long OpenDDS::DCPS::ReceivedDataElement::ref_count (  )  [inline]

Definition at line 72 of file ReceivedDataElementList.h.

00072                    {
00073     return this->ref_count_.value();
00074   }


Member Data Documentation

Reception time stamp for this data sample.

Definition at line 89 of file ReceivedDataElementList.h.

Sample belongs to a group coherent changes.

Definition at line 96 of file ReceivedDataElementList.h.

Definition at line 76 of file ReceivedDataElementList.h.

Referenced by OpenDDS::DCPS::InstanceState::sample_info().

Publisher id represent group identifier.

Definition at line 99 of file ReceivedDataElementList.h.

Definition at line 128 of file ReceivedDataElementList.h.

The data sample's sequence number.

Definition at line 115 of file ReceivedDataElementList.h.

Referenced by OpenDDS::DCPS::InstanceState::sample_info(), and OpenDDS::DCPS::DataReaderImpl::sample_info().

This is needed to know if delete DataReader should fail with PRECONDITION_NOT_MET because there are outstanding loans.

Definition at line 112 of file ReceivedDataElementList.h.

Referenced by TAO::DCPS::ZeroCopyDataSeq< Sample_T, DEF_MAX >::assign_ptr().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 10 Aug 2018 for OpenDDS by  doxygen 1.6.1