CoreDX Data Distribution Service
The High Performance, Small Footprint DDS from Twin Oaks Computing, Inc
com.toc.coredx.DDS.SampleInfo Class Reference

The SampleInfo structure contains information associated with each Sample. The DataReader.read() and take() operations return two vectors. One vector contains Sample(s) and the other contains SampleInfo(s). There is a one-to-one correspondence between items in these two vectors. Each Sample is described by the corresponding SampleInfo instance. More...

Public Attributes

long sample_state
 
long view_state
 
long instance_state
 
Time_t source_timestamp
 
InstanceHandle_t instance_handle
 
InstanceHandle_t publication_handle
 
int disposed_generation_count
 
int no_writers_generation_count
 
int sample_rank
 
int generation_rank
 
int absolute_generation_rank
 
boolean valid_data
 

Detailed Description

The SampleInfo structure contains information associated with each Sample. The DataReader.read() and take() operations return two vectors. One vector contains Sample(s) and the other contains SampleInfo(s). There is a one-to-one correspondence between items in these two vectors. Each Sample is described by the corresponding SampleInfo instance.

Member Data Documentation

◆ absolute_generation_rank

int com.toc.coredx.DDS.SampleInfo.absolute_generation_rank

The generation difference between this sample and the most recent sample. The absolute_generation_rank indicates the generation difference (ie, the number of times the instance was disposed and became alive again) between this sample, and the most recent sample (possibly not in the returned collection) of this instance.

◆ disposed_generation_count

int com.toc.coredx.DDS.SampleInfo.disposed_generation_count

The number of times the instance has become 'ALIVE' after being explicitly disposed. (Computed at the time the sample arrives at the DataReader.)

◆ generation_rank

int com.toc.coredx.DDS.SampleInfo.generation_rank

The generation difference of this sample and the most recent sample in the collection. generation_rank indicates the generation difference (ie, the number of times the instance was disposed and became alive again) between this sample, and the most recent sample in the collection related to this instance.

◆ instance_handle

InstanceHandle_t com.toc.coredx.DDS.SampleInfo.instance_handle

The handle that locally identifies the associated instance.

◆ instance_state

long com.toc.coredx.DDS.SampleInfo.instance_state

Indicates whether the associated instance currently exists. instance_state can be one of:
DDS.ALIVE_INSTANCE_STATE
DDS.NOT_ALIVE_DISPOSED_INSTANCE_STATE
DDS.NOT_ALIVE_NO_WRITERS_INSTANCE_STATE

Can use DDS.NOT_ALIVE_INSTANCE_STATE as a test for either 'NOT_ALIVE' state. For example if (sample_info.view_state { &} DDS.NOT_ALIVE_INSTANCE_STATE) ...

◆ no_writers_generation_count

int com.toc.coredx.DDS.SampleInfo.no_writers_generation_count

The number of times the instance has become 'ALIVE' after being automatically disposed due to no active writers. (Computed at the time the sample arrives at the DataReader.)

◆ publication_handle

InstanceHandle_t com.toc.coredx.DDS.SampleInfo.publication_handle

The local handle of the source DataWriter.

◆ sample_rank

int com.toc.coredx.DDS.SampleInfo.sample_rank

Number of samples related to this instances that follow in the collection returned by the DataReader read or take operations.

◆ sample_state

long com.toc.coredx.DDS.SampleInfo.sample_state

The associated data sample has/has not been read previously.

sample_state indicates whether or not the DataReader has previously read the associated sample.
One of:
DDS.READ_SAMPLE_STATE
DDS.NOT_READ_SAMPLE_STATE.

Use DDS.ANY_SAMPLE_STATE to test for either state.

◆ source_timestamp

Time_t com.toc.coredx.DDS.SampleInfo.source_timestamp

The time provided by the DataWriter when the sample was written.

◆ valid_data

boolean com.toc.coredx.DDS.SampleInfo.valid_data

Is set to true if the associated DataSample contains data. The associated DataSample may not contain data if it this sample indicates a change in sample state (for example ALIVE -{ >} DISPOSED).

◆ view_state

long com.toc.coredx.DDS.SampleInfo.view_state

Associated instance has/has not been seen before. view_state indicates whether the DataReader has already seen samples for the most current generation of the related instance.
view_state can be one of:
DDS.NEW_VIEW_STATE
DDS.NOT_NEW_VIEW_STATE


© 2009-2020 Twin Oaks Computing, Inc
Castle Rock, CO 80104
All rights reserved.