RTI Connext Java API
Version 6.0.0
|
<<extension>> Input parameters for writing with com.rti.ndds.example.FooDataWriter.write_w_params, com.rti.ndds.example.FooDataWriter.dispose_w_params, com.rti.ndds.example.FooDataWriter.register_instance_w_params, com.rti.ndds.example.FooDataWriter.unregister_instance_w_params More...
Public Member Functions | |
WriteParams_t () | |
Construct a new WriteParams_t. | |
WriteParams_t (boolean replace_auto, SampleIdentity_t identity, SampleIdentity_t related_sample_identity, Time_t source_timestamp, Cookie_t cookie, InstanceHandle_t handle, int priority, int flag, GUID_t source_guid, GUID_t related_source_guid, GUID_t related_reader_guid) | |
Construct a new WriteParams_t with the given members. | |
![]() | |
abstract boolean | equals (Object obj) |
abstract int | hashCode () |
String | toString () |
![]() | |
Object | copy_from (Object src) |
Copy value of a data type from source. | |
Public Attributes | |
SampleIdentity_t | identity |
Identity of the sample. | |
final SampleIdentity_t | related_sample_identity |
The identity of another sample related to this one. | |
Time_t | source_timestamp = new Time_t(Time_t.TIME_INVALID) |
Source timestamp upon write. | |
InstanceHandle_t | handle = new InstanceHandle_t() |
Instance handle. | |
int | priority = UNDEFINED |
Publication priority. | |
int | flag = 0 |
Flags associated with the sample. | |
GUID_t | source_guid = new GUID_t(GUID_t.GUID_AUTO) |
Identifies the application logical data source associated with the sample being written. | |
GUID_t | related_source_guid = new GUID_t() |
Identifies the application logical data source that is related to the sample being written. | |
GUID_t | related_reader_guid = new GUID_t() |
Identifies a DataReader that is logically related to the sample that is being written. | |
Additional Inherited Members | |
![]() | |
static final int | UNDEFINED |
Initializer value for com.rti.dds.infrastructure.PublishModeQosPolicy.priority and/or com.rti.dds.infrastructure.ChannelSettings_t.priority. | |
static final int | AUTOMATIC |
Constant value for com.rti.dds.infrastructure.PublishModeQosPolicy.priority and/or com.rti.dds.infrastructure.ChannelSettings_t.priority. | |
![]() | |
Struct () | |
abstract void | pull_from_nativeI (long native_status) |
abstract void | push_to_nativeI (long native_status) |
<<extension>> Input parameters for writing with com.rti.ndds.example.FooDataWriter.write_w_params, com.rti.ndds.example.FooDataWriter.dispose_w_params, com.rti.ndds.example.FooDataWriter.register_instance_w_params, com.rti.ndds.example.FooDataWriter.unregister_instance_w_params
WriteParams_t | ( | ) |
Construct a new WriteParams_t.
WriteParams_t | ( | boolean | replace_auto, |
SampleIdentity_t | identity, | ||
SampleIdentity_t | related_sample_identity, | ||
Time_t | source_timestamp, | ||
Cookie_t | cookie, | ||
InstanceHandle_t | handle, | ||
int | priority, | ||
int | flag, | ||
GUID_t | source_guid, | ||
GUID_t | related_source_guid, | ||
GUID_t | related_reader_guid | ||
) |
Construct a new WriteParams_t with the given members.
SampleIdentity_t identity |
Identity of the sample.
Identifies the sample being written. The identity consists of a pair (Virtual Writer GUID, Virtual Sequence Number).
Use the default value to let RTI Connext determine the sample identity as follows:
The virtual sequence numbers for a virtual writer must be strictly monotonically increasing. If the user tries to write a sample with a sequence number smaller or equal to the last sequence number, the write operation will fail.
A DataReader can access the identity of a received sample by using the fields com.rti.dds.subscription.SampleInfo.original_publication_virtual_guid and com.rti.dds.subscription.SampleInfo.original_publication_virtual_sequence_number in the com.rti.dds.subscription.SampleInfo.
[default] com.rti.dds.infrastructure.SampleIdentity_t.SampleIdentity_t.AUTO_SAMPLE_IDENTITY.
final SampleIdentity_t related_sample_identity |
The identity of another sample related to this one.
Identifies another sample that is logically related to the one that is written.
When this field is set, the related sample identity is propagated and subscribing applications can retrieve it from the com.rti.dds.subscription.SampleInfo (see com.rti.dds.subscription.SampleInfo.get_related_sample_identity).
The default value is com.rti.dds.infrastructure.SampleIdentity_t.SampleIdentity_t.UNKNOWN_SAMPLE_IDENTITY, and is not propagated.
A DataReader can access the related identity of a received sample by using the fields com.rti.dds.subscription.SampleInfo.related_original_publication_virtual_guid and com.rti.dds.subscription.SampleInfo.related_original_publication_virtual_sequence_number in the com.rti.dds.subscription.SampleInfo.
[default] com.rti.dds.infrastructure.SampleIdentity_t.SampleIdentity_t.UNKNOWN_SAMPLE_IDENTITY
Time_t source_timestamp = new Time_t(Time_t.TIME_INVALID) |
Source timestamp upon write.
Specifies the source timestamp that will be available to the com.rti.dds.subscription.DataReader objects by means of the source_timestamp
attribute within the com.rti.dds.subscription.SampleInfo.
[default] com.rti.dds.infrastructure.Time_t.INVALID.
InstanceHandle_t handle = new InstanceHandle_t() |
Instance handle.
Either the handle returned by a previous call to com.rti.ndds.example.FooDataWriter.register_instance, or else the special value com.rti.dds.infrastructure.InstanceHandle_t.InstanceHandle_t.HANDLE_NIL.
[default] com.rti.dds.infrastructure.InstanceHandle_t.InstanceHandle_t.HANDLE_NIL
int priority = UNDEFINED |
Publication priority.
A positive integer value designating the relative priority of the com.rti.dds.publication.DataWriter, used to determine the transmission order of pending writes.
Use of publication priorities requires the asynchronous publisher (com.rti.dds.infrastructure.PublishModeQosPolicyKind.PublishModeQosPolicyKind.ASYNCHRONOUS_PUBLISH_MODE_QOS) with com.rti.dds.publication.FlowControllerProperty_t.scheduling_policy set to com.rti.dds.publication.FlowControllerSchedulingPolicy.FlowControllerSchedulingPolicy.HPF_FLOW_CONTROLLER_SCHED_POLICY.
Larger numbers have higher priority.
For multi-channel DataWriters, if the publication priority of any channel is set to any value other than com.rti.dds.infrastructure.PUBLICATION_PRIORITY_UNDEFINED, then the channel's priority will take precedence over that of the DataWriter.
For multi-channel DataWriters, if the publication priority of any channel is com.rti.dds.infrastructure.PUBLICATION_PRIORITY_UNDEFINED, then the channel will inherit the publication priority of the DataWriter.
If the publicaton priority of the DataWriter, and of any channel of a multi-channel DataWriter, are com.rti.dds.infrastructure.PUBLICATION_PRIORITY_UNDEFINED, then the priority of the DataWriter or DataWriter channel will be assigned the lowest priority value.
If the publication priority of the DataWriter is com.rti.dds.infrastructure.PUBLICATION_PRIORITY_AUTOMATIC, then the DataWriter will be assigned the priority of the largest publication priority of all samples in the DataWriter.
The publication priority of each sample can be set in the com.rti.dds.infrastructure.WriteParams_t of the com.rti.ndds.example.FooDataWriter.write_w_params function.
For dispose and unregister samples, use the com.rti.dds.infrastructure.WriteParams_t of com.rti.ndds.example.FooDataWriter.dispose_w_params and com.rti.ndds.example.FooDataWriter.unregister_instance_w_params.
[default] com.rti.dds.infrastructure.PUBLICATION_PRIORITY_UNDEFINED
int flag = 0 |
Flags associated with the sample.
The flags are represented as a 32-bit integer, of which only the 16 least-significant bits are used.
RTI reserves least-significant bits [0-7] for middleware-specific usage.
The application can use least-significant bits [8-15].
The first bit (com.rti.dds.infrastructure.SampleFlagBits.REDELIVERED_SAMPLE) is reserved for marking samples as redelivered when using RTI Queuing Service.
The second bit (com.rti.dds.infrastructure.SampleFlagBits.INTERMEDIATE_REPLY_SEQUENCE_SAMPLE) is used to indicate that a response sample is not the last response sample for a given request. This bit is usually set by a Replier sending multiple responses for a request.
An application can inspect the flags associated with a received sample by checking the field com.rti.dds.subscription.SampleInfo.flag.
[default] 0 (no flags are set)
GUID_t source_guid = new GUID_t(GUID_t.GUID_AUTO) |
Identifies the application logical data source associated with the sample being written.
When this field is set, the source_guid is propagated and subscribing applications can retrieve it from the com.rti.dds.subscription.SampleInfo (see com.rti.dds.subscription.SampleInfo.source_guid).
The default value is com.rti.dds.infrastructure.GUID_t.GUID_AUTO, and is not propagated.
The main use case for source_guid and related_source_guid is a request/reply scenario in which a reply has to be sent only to the Requester that issue the related request.
In this case, the Requester's DataWriter will send a request setting the source_guid to an unique value. This value must be the same value even after Requester restart.
The Replier's DataReader will get the request's source_guid from the SampleInfo and it will send it as the related_source_guid of the reply using the Replier's DataWriter.
The Requester's DataReader will install a CFT on the related_source_guid using a filter expression. For example:
This way the reply will be send only to the right Requester.
The source_guid and related_source_guid fields are used by RTI Queuing Service in a request/reply scenario.
[default] com.rti.dds.infrastructure.GUID_t.GUID_AUTO (the source_guid is automatically set to the com.rti.dds.publication.DataWriter virtual GUID).
Identifies the application logical data source that is related to the sample being written.
When this field is set, the related_source_guid is propagated and subscribing applications can retrieve it from the com.rti.dds.subscription.SampleInfo (see com.rti.dds.subscription.SampleInfo.related_source_guid).
The default value is com.rti.dds.infrastructure.GUID_t.GUID_UNKNOWN, and is not propagated.
Identifies a DataReader that is logically related to the sample that is being written.
When this field is set, the related_reader_guid is propagated and subscribing applications can retrieve it from the com.rti.dds.subscription.SampleInfo (see com.rti.dds.subscription.SampleInfo.related_subscription_guid).
The default value is com.rti.dds.infrastructure.GUID_t.GUID_UNKNOWN, and is not propagated.
The main use case for this field is point-to-point sample distribution using CFT. DataReaders install a CFT on the related_reader_guid using a unique GUID. For example, the filter for DataReader 'n' can be:
Then, a DataWriter that wants to send the sample to DataReader 'n' will use the com.rti.ndds.example.FooDataWriter.write_w_params method and set related_reader_guid to the value used by DataReader 'n' in its filter expression.
This field is currently used by RTI Queuing Service to distribute a sample to only one of the Consumer's DataReaders attached to a SharedReaderQueue.