CoreDX DDS for Java
from Twin Oaks Computing, Inc.

com.toc.coredx.DDS
Class SampleInfo

java.lang.Object
  extended by com.toc.coredx.DDS.SampleInfo

public class SampleInfo
extends java.lang.Object

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.


Field Summary
 int absolute_generation_rank
          The generation difference between this sample and the most recent sample.
 int disposed_generation_count
          The number of times the instance has become 'ALIVE' after being explicitly disposed.
 int generation_rank
          The generation difference of this sample and the most recent sample in the collection.
 InstanceHandle_t instance_handle
          The handle that locally identifies the associated instance.
 long instance_state
          Indicates whether the associated instance currently exists.
 int no_writers_generation_count
          The number of times the instance has become 'ALIVE' after being automatically disposed due to no active writers.
 InstanceHandle_t publication_handle
          The local handle of the source DataWriter.
 int sample_rank
          Number of samples related to this instances that follow in the collection returned by the DataReader read or take operations.
 long sample_state
          The associated data sample has/has not been read previously.
 Time_t source_timestamp
          The time provided by the DataWriter when the sample was written.
 boolean valid_data
          Is set to true if the associated DataSample contains data.
 long view_state
          Associated instance has/has not been seen before.
 
Constructor Summary
SampleInfo()
           
 
Method Summary
 void copy(SampleInfo si)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sample_state

public long 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.


view_state

public long 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


instance_state

public long 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) ...


source_timestamp

public Time_t source_timestamp
The time provided by the DataWriter when the sample was written.


instance_handle

public InstanceHandle_t instance_handle
The handle that locally identifies the associated instance.


publication_handle

public InstanceHandle_t publication_handle
The local handle of the source DataWriter.


disposed_generation_count

public int 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.)


no_writers_generation_count

public int 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.)


sample_rank

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


generation_rank

public int 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.


absolute_generation_rank

public int 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.


valid_data

public boolean 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).

Constructor Detail

SampleInfo

public SampleInfo()
Method Detail

copy

public void copy(SampleInfo si)

Copyright © 2010 Twin Oaks Computing, Inc,
All Rights Reserved