RTI Connext C API  Version 5.3.1
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
DDS_WriteParams_t Struct Reference

<<extension>> Input parameters for writing with FooDataWriter_write_w_params, FooDataWriter_dispose_w_params, FooDataWriter_register_instance_w_params, FooDataWriter_unregister_instance_w_params More...

Data Fields

DDS_Boolean replace_auto
 Allows retrieving the actual value of those fields that were automatic.
 
struct DDS_SampleIdentity_t identity
 Identity of the sample.
 
struct DDS_SampleIdentity_t related_sample_identity
 The identity of another sample related to this one.
 
struct DDS_Time_t source_timestamp
 Source timestamp upon write.
 
DDS_InstanceHandle_t handle
 Instance handle.
 
DDS_Long priority
 Publication priority.
 
DDS_SampleFlag flag
 Flags associated with the sample.
 
struct DDS_GUID_t source_guid
 Identifies the application logical data source associated with the sample being written.
 
struct DDS_GUID_t related_source_guid
 Identifies the application logical data source that is related to the sample being written.
 
struct DDS_GUID_t related_reader_guid
 Identifies a DataReader that is logically related to the sample that is being written.
 

Detailed Description

Field Documentation

DDS_Boolean DDS_WriteParams_t::replace_auto

Allows retrieving the actual value of those fields that were automatic.

When this field is set, the fields that were configured with an automatic value (for example, DDS_AUTO_SAMPLE_IDENTITY) receive their actual value after FooDataWriter_write_w_params is called.

To reset those fields to their automatic value after calling FooDataWriter_write_w_params, use DDS_WriteParams_reset

struct DDS_SampleIdentity_t DDS_WriteParams_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 sequence number is increased by one with respect to the previous value.

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 DDS_SampleInfo::original_publication_virtual_guid and DDS_SampleInfo::original_publication_virtual_sequence_number in the DDS_SampleInfo.

[default] DDS_AUTO_SAMPLE_IDENTITY.

struct DDS_SampleIdentity_t DDS_WriteParams_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 DDS_SampleInfo (see DDS_SampleInfo_get_related_sample_identity).

The default value is DDS_UNKNOWN_SAMPLE_IDENTITY, and is not propagated.

A DataReader can access the related identity of a received sample by using the fields DDS_SampleInfo::related_original_publication_virtual_guid and DDS_SampleInfo::related_original_publication_virtual_sequence_number in the DDS_SampleInfo.

[default] DDS_UNKNOWN_SAMPLE_IDENTITY

struct DDS_Time_t DDS_WriteParams_t::source_timestamp

Source timestamp upon write.

Specifies the source timestamp that will be available to the DDS_DataReader objects by means of the source_timestamp attribute within the DDS_SampleInfo.

[default] DDS_TIME_INVALID.

DDS_InstanceHandle_t DDS_WriteParams_t::handle

Instance handle.

Either the handle returned by a previous call to FooDataWriter_register_instance, or else the special value DDS_HANDLE_NIL.

[default] DDS_HANDLE_NIL

DDS_Long DDS_WriteParams_t::priority

Publication priority.

A positive integer value designating the relative priority of the sample, used to determine the transmission order of pending writes.

Use of publication priorities requires an asynchronous publisher (DDS_ASYNCHRONOUS_PUBLISH_MODE_QOS) with DDS_FlowControllerProperty_t::scheduling_policy set to DDS_HPF_FLOW_CONTROLLER_SCHED_POLICY.

Larger numbers have higher priority.

For multi-channel DataWriters, the publication priority of a sample may be used as a filter criteria for determining channel membership.

If the publication priority of the parent DataWriter, or for multi-channel DataWriters, if the publication priority of the parent channel, is set to DDS_PUBLICATION_PRIORITY_AUTOMATIC, then the DataWriter or channel will be assigned the priority of the largest publication priority of all samples in the DataWriter or channel.

If the publication priority of the parent DataWriter, and for multi-channel DataWriters, if the publication priority of the parent channel, are set to DDS_PUBLICATION_PRIORITY_UNDEFINED, then the DataWriter or channel will be assigned the lowest priority, regardless of the value of the publication priorities of samples written to the DataWriter or channel.

The publication priority of each sample can be set in the DDS_WriteParams_t of FooDataWriter_write_w_params.

For dispose and unregister samples, use the DDS_WriteParams_t of FooDataWriter_dispose_w_params and FooDataWriter_unregister_instance_w_params.

[default] 0 (lowest priority)

See Also
DDS_ChannelSettings_t::priority
DDS_SampleFlag DDS_WriteParams_t::flag

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 (DDS_REDELIVERED_SAMPLE) is reserved for marking samples as redelivered when using RTI Queuing Service.

The second bit (DDS_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 FooBarReplier sending multiple responses for a request.

An application can inspect the flags associated with a received sample by checking the field DDS_SampleInfo::flag.

[default] 0 (no flags are set)

struct DDS_GUID_t DDS_WriteParams_t::source_guid

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 DDS_SampleInfo (see DDS_SampleInfo::source_guid).

The default value is DDS_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:

@related_source_guid.value = &hex(00000000000000000000000000000001)

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] DDS_GUID_AUTO (the source_guid is automatically set to the DDS_DataWriter virtual GUID).

See Also
DDS_WriteParams_t::related_source_guid
struct DDS_GUID_t DDS_WriteParams_t::related_source_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 DDS_SampleInfo (see DDS_SampleInfo::related_source_guid).

The default value is DDS_GUID_UNKNOWN, and is not propagated.

[default] DDS_GUID_UNKNOWN

See Also
DDS_WriteParams_t::source_guid
struct DDS_GUID_t DDS_WriteParams_t::related_reader_guid

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 DDS_SampleInfo (see DDS_SampleInfo::related_subscription_guid).

The default value is DDS_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:

@related_reader_guid.value = &hex(00000000000000000000000000000001)

Then, a DataWriter that wants to send the sample to DataReader 'n' will use the FooDataWriter_write_w_params function 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.

[default] DDS_GUID_UNKNOWN


RTI Connext C API Version 5.3.1 Copyright © Mon Feb 19 2018 Real-Time Innovations, Inc