OpenDDS  Snapshot(2023/04/07-19:43)
Public Member Functions | Public Attributes | Protected Attributes | Private Attributes | List of all members
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]

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

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

Protected Attributes

ACE_Recursive_Thread_Mutexmx_
 

Private Attributes

Atomic< long > ref_count_
 

Detailed Description

Definition at line 33 of file ReceivedDataElementList.h.

Constructor & Destructor Documentation

◆ ReceivedDataElement()

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

Definition at line 35 of file ReceivedDataElementList.h.

References OpenDDS::DCPS::TimePoint_T< SystemClock >::now(), DDS::Time_t::sec, OpenDDS::DCPS::DataSampleHeader::source_timestamp_nanosec_, OpenDDS::DCPS::DataSampleHeader::source_timestamp_sec_, OpenDDS::DCPS::TimePoint_T< AceClock >::to_dds_time(), and OpenDDS::DCPS::DataSampleHeader::valid_data().

36  : pub_(header.publication_id_),
37  registered_data_(received_data),
39 #ifndef OPENDDS_NO_OBJECT_MODEL_PROFILE
40  coherent_change_(header.coherent_change_),
41  group_coherent_(header.group_coherent_),
42  publisher_id_(header.publisher_id_),
43 #endif
44  valid_data_(received_data != 0),
47  zero_copy_cnt_(0),
48  sequence_(header.sequence_),
51  ref_count_(1),
52  mx_(mx)
53  {
55 
56  source_timestamp_.sec = header.source_timestamp_sec_;
57  source_timestamp_.nanosec = header.source_timestamp_nanosec_;
58 
59  /*
60  * In some situations, we will not have data to give to the user and
61  * valid_data is how we communcate that to the user through a SampleInfo.
62  */
63  if (!header.valid_data()) {
64  valid_data_ = false;
65  }
66  }
unsigned long nanosec
DDS::Time_t destination_timestamp_
Reception time stamp for this data sample.
static TimePoint_T< SystemClock > now()
Definition: TimePoint_T.inl:41
bool coherent_change_
Sample belongs to an active coherent change set.
Christopher Diggins *renamed files *fixing compilation errors *adding Visual C project file *removed make Max Lybbert *removed references to missing and unused header
Definition: CHANGELOG.txt:8
ReceivedDataElement * next_data_sample_
the next data sample in the ReceivedDataElementList
GUID_t publisher_id_
Publisher id represent group identifier.
ReceivedDataElement * previous_data_sample_
the previous data sample in the ReceivedDataElementList
const SampleStateKind NOT_READ_SAMPLE_STATE
SequenceNumber sequence_
The data sample&#39;s sequence number.
DDS::Time_t source_timestamp_
Source time stamp for this data sample.
DDS::Time_t to_dds_time() const
Definition: TimePoint_T.inl:89
bool group_coherent_
Sample belongs to a group coherent changes.
bool valid_data_
Do we contain valid data.

◆ ~ReceivedDataElement()

virtual OpenDDS::DCPS::ReceivedDataElement::~ReceivedDataElement ( )
inlinevirtual

Definition at line 68 of file ReceivedDataElementList.h.

68 {}

Member Function Documentation

◆ dec_ref()

void OpenDDS::DCPS::ReceivedDataElement::dec_ref ( )
inline

◆ inc_ref()

void OpenDDS::DCPS::ReceivedDataElement::inc_ref ( )
inline

◆ operator delete() [1/2]

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

◆ operator delete() [2/2]

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

Definition at line 52 of file ReceivedDataElementList.cpp.

53 {
54  operator delete(memory);
55 }

◆ operator new()

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

◆ ref_count()

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

Definition at line 82 of file ReceivedDataElementList.h.

83  {
84  return ref_count_;
85  }

Member Data Documentation

◆ coherent_change_

bool OpenDDS::DCPS::ReceivedDataElement::coherent_change_

◆ destination_timestamp_

DDS::Time_t OpenDDS::DCPS::ReceivedDataElement::destination_timestamp_

Reception time stamp for this data sample.

Definition at line 103 of file ReceivedDataElementList.h.

◆ disposed_generation_count_

size_t OpenDDS::DCPS::ReceivedDataElement::disposed_generation_count_

◆ group_coherent_

bool OpenDDS::DCPS::ReceivedDataElement::group_coherent_

Sample belongs to a group coherent changes.

Definition at line 110 of file ReceivedDataElementList.h.

◆ mx_

ACE_Recursive_Thread_Mutex* OpenDDS::DCPS::ReceivedDataElement::mx_
protected

Definition at line 147 of file ReceivedDataElementList.h.

◆ next_data_sample_

ReceivedDataElement* OpenDDS::DCPS::ReceivedDataElement::next_data_sample_

◆ no_writers_generation_count_

size_t OpenDDS::DCPS::ReceivedDataElement::no_writers_generation_count_

◆ previous_data_sample_

ReceivedDataElement* OpenDDS::DCPS::ReceivedDataElement::previous_data_sample_

◆ pub_

GUID_t OpenDDS::DCPS::ReceivedDataElement::pub_

Definition at line 87 of file ReceivedDataElementList.h.

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

◆ publisher_id_

GUID_t OpenDDS::DCPS::ReceivedDataElement::publisher_id_

Publisher id represent group identifier.

Definition at line 113 of file ReceivedDataElementList.h.

◆ ref_count_

Atomic<long> OpenDDS::DCPS::ReceivedDataElement::ref_count_
private

Definition at line 145 of file ReceivedDataElementList.h.

◆ registered_data_

void* const OpenDDS::DCPS::ReceivedDataElement::registered_data_

◆ sample_state_

DDS::SampleStateKind OpenDDS::DCPS::ReceivedDataElement::sample_state_

◆ sequence_

SequenceNumber OpenDDS::DCPS::ReceivedDataElement::sequence_

The data sample's sequence number.

Definition at line 132 of file ReceivedDataElementList.h.

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

◆ source_timestamp_

DDS::Time_t OpenDDS::DCPS::ReceivedDataElement::source_timestamp_

◆ valid_data_

bool OpenDDS::DCPS::ReceivedDataElement::valid_data_

◆ zero_copy_cnt_

Atomic<long> OpenDDS::DCPS::ReceivedDataElement::zero_copy_cnt_

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

Definition at line 129 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: