RTI Connext Java API  Version 5.3.1
 All Classes Namespaces Functions Variables Groups Pages
DataWriter Interface Reference

<<interface>> Allows an application to set the value of the data to be published under a given com.rti.dds.topic.Topic. More...

Inheritance diagram for DataWriter:
DomainEntity Entity DynamicDataWriter BytesDataWriter KeyedBytesDataWriter KeyedStringDataWriter StringDataWriter FooDataWriter

Public Member Functions

void set_qos (DataWriterQos qos)
 Sets the writer QoS.
 
void set_qos_with_profile (String library_name, String profile_name)
 <<extension>> Change the QoS of this writer using the input XML QoS profile.
 
void get_qos (DataWriterQos qos)
 Gets the writer QoS.
 
void set_listener (DataWriterListener l, int mask)
 Sets the writer listener.
 
DataWriterListener get_listener ()
 Get the writer listener.
 
void get_liveliness_lost_status (LivelinessLostStatus status)
 Accesses the com.rti.dds.infrastructure.StatusKind.StatusKind.LIVELINESS_LOST_STATUS communication status.
 
void get_offered_deadline_missed_status (OfferedDeadlineMissedStatus status)
 Accesses the com.rti.dds.infrastructure.StatusKind.StatusKind.OFFERED_DEADLINE_MISSED_STATUS communication status.
 
void get_offered_incompatible_qos_status (OfferedIncompatibleQosStatus status)
 Accesses the com.rti.dds.infrastructure.StatusKind.StatusKind.OFFERED_INCOMPATIBLE_QOS_STATUS communication status.
 
void get_publication_matched_status (PublicationMatchedStatus status)
 Accesses the com.rti.dds.infrastructure.StatusKind.StatusKind.PUBLICATION_MATCHED_STATUS communication status.
 
void get_reliable_writer_cache_changed_status (ReliableWriterCacheChangedStatus status)
 <<extension>> Get the reliable cache status for this writer.
 
void get_reliable_reader_activity_changed_status (ReliableReaderActivityChangedStatus status)
 <<extension>> Get the reliable reader activity changed status for this writer.
 
void get_datawriter_cache_status (DataWriterCacheStatus status)
 <<extension>> Get the datawriter cache status for this writer.
 
void get_datawriter_protocol_status (DataWriterProtocolStatus status)
 <<extension>> Get the datawriter protocol status for this writer.
 
void get_matched_subscription_datawriter_protocol_status (DataWriterProtocolStatus status, InstanceHandle_t subscription_handle)
 <<extension>> Get the datawriter protocol status for this writer, per matched subscription identified by the subscription_handle.
 
void get_matched_subscription_datawriter_protocol_status_by_locator (DataWriterProtocolStatus status, Locator_t locator)
 <<extension>> Get the datawriter protocol status for this writer, per matched subscription identified by the locator.
 
void get_service_request_accepted_status (ServiceRequestAcceptedStatus status)
 Accesses the com.rti.dds.infrastructure.StatusKind.SERVICE_REQUEST_ACCEPTED_STATUS communication status.
 
void get_matched_subscription_locators (LocatorSeq locators)
 <<extension>> Retrieve the list of locators for subscriptions currently "associated" with this com.rti.dds.publication.DataWriter.
 
void get_matched_subscriptions (InstanceHandleSeq subscription_handles)
 Retrieve the list of subscriptions currently "associated" with this com.rti.dds.publication.DataWriter.
 
void get_matched_subscription_data (SubscriptionBuiltinTopicData subscription_data, InstanceHandle_t subscription_handle)
 This operation retrieves the information on a subscription that is currently "associated" with the com.rti.dds.publication.DataWriter.
 
void get_matched_subscription_participant_data (ParticipantBuiltinTopicData participant_data, InstanceHandle_t subscription_handle)
 This operation retrieves the information on the discovered com.rti.dds.domain.DomainParticipant associated with the subscription that is currently matching with the com.rti.dds.publication.DataWriter.
 
Topic get_topic ()
 This operation returns the com.rti.dds.topic.Topic associated with the com.rti.dds.publication.DataWriter.
 
Publisher get_publisher ()
 This operation returns the com.rti.dds.publication.Publisher to which the com.rti.dds.publication.DataWriter belongs.
 
void wait_for_acknowledgments (Duration_t max_wait)
 Blocks the calling thread until all data written by reliable com.rti.dds.publication.DataWriter entity is acknowledged, or until timeout expires.
 
boolean is_sample_app_acknowledged (SampleIdentity_t identity)
 This method can be used to see if a sample has been application acknowledged.
 
void wait_for_asynchronous_publishing (Duration_t max_wait)
 <<extension>> Blocks the calling thread until asynchronous sending is complete.
 
void assert_liveliness ()
 This operation manually asserts the liveliness of this com.rti.dds.publication.DataWriter.
 
void flush ()
 <<extension>> Flushes the batch in progress in the context of the calling thread.
 
InstanceHandle_t register_instance_untyped (Object instance_data)
 Register a new instance with this writer.
 
InstanceHandle_t register_instance_w_timestamp_untyped (Object instance_data, Time_t source_timestamp)
 Register a new instance with this writer using the given time instead of the current time.
 
void unregister_instance_untyped (Object instance_data, InstanceHandle_t handle)
 Unregister a new instance from this writer.
 
void unregister_instance_w_timestamp_untyped (Object instance_data, InstanceHandle_t handle, Time_t source_timestamp)
 Unregister a new instance from this writer using the given time instead of the current time.
 
void write_untyped (Object instance_data, InstanceHandle_t handle)
 Publish a data sample.
 
void write_w_timestamp_untyped (Object instance_data, InstanceHandle_t handle, Time_t source_timestamp)
 Publish a data sample using the given time instead of the current time.
 
void dispose_untyped (Object instance_data, InstanceHandle_t handle)
 Dispose a data sample.
 
void dispose_w_timestamp_untyped (Object instance_data, InstanceHandle_t handle, Time_t source_timestamp)
 Dispose a data sample using the given time instead of the current time.
 
void get_key_value_untyped (Object key_holder, InstanceHandle_t handle)
 Fill in the key fields of the given data sample.
 
InstanceHandle_t lookup_instance_untyped (Object key_value)
 Given a sample with the given key field values, return the handle corresponding to its instance.
 

Detailed Description

<<interface>> Allows an application to set the value of the data to be published under a given com.rti.dds.topic.Topic.

QoS:
com.rti.dds.publication.DataWriterQos
Status:
com.rti.dds.infrastructure.StatusKind.StatusKind.LIVELINESS_LOST_STATUS, com.rti.dds.publication.LivelinessLostStatus;
com.rti.dds.infrastructure.StatusKind.StatusKind.OFFERED_DEADLINE_MISSED_STATUS, com.rti.dds.publication.OfferedDeadlineMissedStatus;
com.rti.dds.infrastructure.StatusKind.StatusKind.OFFERED_INCOMPATIBLE_QOS_STATUS, com.rti.dds.publication.OfferedIncompatibleQosStatus;
com.rti.dds.infrastructure.StatusKind.StatusKind.PUBLICATION_MATCHED_STATUS, com.rti.dds.publication.PublicationMatchedStatus;
com.rti.dds.infrastructure.StatusKind.StatusKind.RELIABLE_READER_ACTIVITY_CHANGED_STATUS, com.rti.dds.publication.ReliableReaderActivityChangedStatus;
com.rti.dds.infrastructure.StatusKind.StatusKind.RELIABLE_WRITER_CACHE_CHANGED_STATUS, com.rti.dds.publication.ReliableWriterCacheChangedStatus.
Listener:
com.rti.dds.publication.DataWriterListener

A com.rti.dds.publication.DataWriter is attached to exactly one com.rti.dds.publication.Publisher, that acts as a factory for it.

A com.rti.dds.publication.DataWriter is bound to exactly one com.rti.dds.topic.Topic and therefore to exactly one data type. The com.rti.dds.topic.Topic must exist prior to the com.rti.dds.publication.DataWriter's creation.

com.rti.dds.publication.DataWriter is an abstract class. It must be specialized for each particular application data-type (see USER_DATA). The additional methods or functions that must be defined in the auto-generated class for a hypothetical application type com.rti.ndds.example.Foo are specified in the example type com.rti.dds.publication.DataWriter.

The following operations may be called even if the com.rti.dds.publication.DataWriter is not enabled. Other operations will fail with com.rti.dds.infrastructure.RETCODE_NOT_ENABLED if called on a disabled com.rti.dds.publication.DataWriter:

Several com.rti.dds.publication.DataWriter may operate in different threads. If they share the same com.rti.dds.publication.Publisher, the middleware guarantees that its operations are thread-safe.

See Also
com.rti.ndds.example.FooDataWriter
Operations Allowed in Listener Callbacks

Member Function Documentation

void set_qos_with_profile ( String  library_name,
String  profile_name 
)

<<extension>> Change the QoS of this writer using the input XML QoS profile.

This operation modifies the QoS of the com.rti.dds.publication.DataWriter.

The com.rti.dds.publication.DataWriterQos.user_data, com.rti.dds.publication.DataWriterQos.deadline, com.rti.dds.publication.DataWriterQos.latency_budget, com.rti.dds.publication.DataWriterQos.ownership_strength, com.rti.dds.publication.DataWriterQos.transport_priority, com.rti.dds.publication.DataWriterQos.lifespan and com.rti.dds.publication.DataWriterQos.writer_data_lifecycle can be changed. The other policies are immutable.

Parameters
library_name<<in>> Library name containing the XML QoS profile. If library_name is null RTI Connext will use the default library (see com.rti.dds.publication.Publisher.set_default_library).
profile_name<<in>> XML QoS Profile name. If profile_name is null RTI Connext will use the default profile (see com.rti.dds.publication.Publisher.set_default_profile).
Exceptions
Oneof the Standard Return Codes, com.rti.dds.infrastructure.RETCODE_IMMUTABLE_POLICY or com.rti.dds.infrastructure.RETCODE_INCONSISTENT_POLICY
See Also
com.rti.dds.publication.DataWriterQos for rules on consistency among QoS
Operations Allowed in Listener Callbacks
void get_qos ( DataWriterQos  qos)

Gets the writer QoS.

This method may potentially allocate memory depending on the sequences contained in some QoS policies.

Parameters
qos<<inout>> The com.rti.dds.publication.DataWriterQos to be filled up. Cannot be NULL.
Exceptions
Oneof the Standard Return Codes
See Also
get_qos (abstract)
void set_listener ( DataWriterListener  l,
int  mask 
)

Sets the writer listener.

Parameters
l<<in>> com.rti.dds.publication.DataWriterListener to set to
mask<<in>> com.rti.dds.infrastructure.StatusMask associated with the com.rti.dds.publication.DataWriterListener.
Exceptions
Oneof the Standard Return Codes
See Also
set_listener (abstract)
void get_liveliness_lost_status ( LivelinessLostStatus  status)

Accesses the com.rti.dds.infrastructure.StatusKind.StatusKind.LIVELINESS_LOST_STATUS communication status.

This also resets the status so that it is no longer considered changed.

Parameters
status<<inout>> com.rti.dds.publication.LivelinessLostStatus to be filled in. Cannot be NULL.
Exceptions
Oneof the Standard Return Codes
void get_offered_deadline_missed_status ( OfferedDeadlineMissedStatus  status)

Accesses the com.rti.dds.infrastructure.StatusKind.StatusKind.OFFERED_DEADLINE_MISSED_STATUS communication status.

This also resets the status so that it is no longer considered changed.

Parameters
status<<inout>> com.rti.dds.publication.OfferedDeadlineMissedStatus to be filled in. Cannot be NULL.
Exceptions
Oneof the Standard Return Codes
void get_offered_incompatible_qos_status ( OfferedIncompatibleQosStatus  status)

Accesses the com.rti.dds.infrastructure.StatusKind.StatusKind.OFFERED_INCOMPATIBLE_QOS_STATUS communication status.

This also resets the status so that it is no longer considered changed.

Parameters
status<<inout>> com.rti.dds.publication.OfferedIncompatibleQosStatus to be filled in. Cannot be NULL.
Exceptions
Oneof the Standard Return Codes
void get_publication_matched_status ( PublicationMatchedStatus  status)

Accesses the com.rti.dds.infrastructure.StatusKind.StatusKind.PUBLICATION_MATCHED_STATUS communication status.

This also resets the status so that it is no longer considered changed.

Parameters
status<<inout>> com.rti.dds.publication.PublicationMatchedStatus to be filled in. Cannot be NULL.
Exceptions
Oneof the Standard Return Codes
void get_reliable_writer_cache_changed_status ( ReliableWriterCacheChangedStatus  status)

<<extension>> Get the reliable cache status for this writer.

This also resets the status so that it is no longer considered changed.

Parameters
status<<inout>> com.rti.dds.publication.ReliableWriterCacheChangedStatus to be filled in. Cannot be NULL.
Exceptions
Oneof the Standard Return Codes
void get_reliable_reader_activity_changed_status ( ReliableReaderActivityChangedStatus  status)

<<extension>> Get the reliable reader activity changed status for this writer.

This also resets the status so that it is no longer considered changed.

Parameters
status<<inout>> com.rti.dds.publication.ReliableReaderActivityChangedStatus to be filled in. Cannot be NULL.
Exceptions
Oneof the Standard Return Codes
void get_datawriter_cache_status ( DataWriterCacheStatus  status)

<<extension>> Get the datawriter cache status for this writer.

This also resets the status so that it is no longer considered changed.

Parameters
status<<inout>> com.rti.dds.publication.DataWriterCacheStatus to be filled in. Cannot be NULL.
Exceptions
Oneof the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_NOT_ENABLED.
void get_datawriter_protocol_status ( DataWriterProtocolStatus  status)

<<extension>> Get the datawriter protocol status for this writer.

This also resets the status so that it is no longer considered changed.

Parameters
status<<inout>> com.rti.dds.publication.DataWriterProtocolStatus to be filled in. Cannot be NULL.
Exceptions
Oneof the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_NOT_ENABLED.
void get_matched_subscription_datawriter_protocol_status ( DataWriterProtocolStatus  status,
InstanceHandle_t  subscription_handle 
)

<<extension>> Get the datawriter protocol status for this writer, per matched subscription identified by the subscription_handle.

This also resets the status so that it is no longer considered changed.

Note: Status for a remote entity is only kept while the entity is alive. Once a remote entity is no longer alive, its status is deleted.

Parameters
status<<inout>> com.rti.dds.publication.DataWriterProtocolStatus to be filled in. Cannot be NULL.
subscription_handle<<in>> Handle to a specific subscription associated with the com.rti.dds.subscription.DataReader. Cannot be NULL.Must correspond to a subscription currently associated with the com.rti.dds.publication.DataWriter.
Exceptions
Oneof the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_NOT_ENABLED.
void get_matched_subscription_datawriter_protocol_status_by_locator ( DataWriterProtocolStatus  status,
Locator_t  locator 
)

<<extension>> Get the datawriter protocol status for this writer, per matched subscription identified by the locator.

This also resets the status so that it is no longer considered changed.

Note: Status for a remote entity is only kept while the entity is alive. Once a remote entity is no longer alive, its status is deleted.

Parameters
status<<inout>> com.rti.dds.publication.DataWriterProtocolStatus to be filled in Cannot be NULL.
locator<<in>> Locator to a specific locator associated with the com.rti.dds.subscription.DataReader. Cannot be NULL.Must correspond to a locator of one or more subscriptions currently associated with the com.rti.dds.publication.DataWriter.
Exceptions
Oneof the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_NOT_ENABLED.
void get_service_request_accepted_status ( ServiceRequestAcceptedStatus  status)

Accesses the com.rti.dds.infrastructure.StatusKind.SERVICE_REQUEST_ACCEPTED_STATUS communication status.

This also resets the status so that it is no longer considered changed.

Parameters
status<<inout>> com.rti.dds.publication.ServiceRequestAcceptedStatus to be filled in. Cannot be NULL.
Exceptions
Oneof the Standard Return Codes
void get_matched_subscription_locators ( LocatorSeq  locators)

<<extension>> Retrieve the list of locators for subscriptions currently "associated" with this com.rti.dds.publication.DataWriter.

Matched subscription locators include locators for all those subscriptions in the same domain that have a matching com.rti.dds.topic.Topic, compatible QoS and common partition that the com.rti.dds.domain.DomainParticipant has not indicated should be "ignored" by means of the com.rti.dds.domain.DomainParticipant.ignore_subscription operation.

The locators returned in the locators list are the ones that are used by the DDS implementation to communicate with the corresponding matched com.rti.dds.subscription.DataReader entities.

Parameters
locators<<inout>>. Handles of all the matched subscription locators.

The sequence will be grown if the sequence has ownership and the system has the corresponding resources. Use a sequence without ownership to avoid dynamic memory allocation. If the sequence is too small to store all the matches and the system can not resize the sequence, this method will fail with com.rti.dds.infrastructure.RETCODE_OUT_OF_RESOURCES. Cannot be NULL..

Exceptions
Oneof the Standard Return Codes, or com.rti.dds.infrastructure.RETCODE_OUT_OF_RESOURCES if the sequence is too small and the system can not resize it, or com.rti.dds.infrastructure.RETCODE_NOT_ENABLED
void get_matched_subscriptions ( InstanceHandleSeq  subscription_handles)

Retrieve the list of subscriptions currently "associated" with this com.rti.dds.publication.DataWriter.

Matched subscriptions include all those in the same domain that have a matching com.rti.dds.topic.Topic, compatible QoS and common partition that the com.rti.dds.domain.DomainParticipant has not indicated should be "ignored" by means of the com.rti.dds.domain.DomainParticipant.ignore_subscription operation.

The handles returned in the subscription_handles list are the ones that RTI Connext uses to locally identify the corresponding matched com.rti.dds.subscription.DataReader entities. These handles match the ones that appear in the com.rti.dds.subscription.SampleInfo.instance_handle field of the com.rti.dds.subscription.SampleInfo when reading the com.rti.dds.subscription.builtin.SubscriptionBuiltinTopicDataTypeSupport.SUBSCRIPTION_TOPIC_NAME builtin topic.

Parameters
subscription_handles<<inout>>. Handles of all the matched subscriptions.

The sequence will be grown if the sequence has ownership and the system has the corresponding resources. Use a sequence without ownership to avoid dynamic memory allocation. If the sequence is too small to store all the matches and the system can not resize the sequence, this method will fail with com.rti.dds.infrastructure.RETCODE_OUT_OF_RESOURCES.

The maximum number of matches possible is configured with com.rti.dds.infrastructure.DomainParticipantResourceLimitsQosPolicy. You can use a zero-maximum sequence without ownership to quickly check whether there are any matches without allocating any memory. Cannot be NULL..

Exceptions
Oneof the Standard Return Codes, or com.rti.dds.infrastructure.RETCODE_OUT_OF_RESOURCES if the sequence is too small and the system can not resize it, or com.rti.dds.infrastructure.RETCODE_NOT_ENABLED
void get_matched_subscription_data ( SubscriptionBuiltinTopicData  subscription_data,
InstanceHandle_t  subscription_handle 
)

This operation retrieves the information on a subscription that is currently "associated" with the com.rti.dds.publication.DataWriter.

The subscription_handle must correspond to a subscription currently associated with the com.rti.dds.publication.DataWriter. Otherwise, the operation will fail and fail with com.rti.dds.infrastructure.RETCODE_BAD_PARAMETER. Use com.rti.dds.publication.DataWriter.get_matched_subscriptions to find the subscriptions that are currently matched with the com.rti.dds.publication.DataWriter.

Note: This operation does not retrieve the following information in com.rti.dds.subscription.builtin.SubscriptionBuiltinTopicData:

  • builtin.SubscriptionBuiltinTopicData.type_code
  • builtin.SubscriptionBuiltinTopicData.property
  • builtin.SubscriptionBuiltinTopicData.content_filter_property

The above information is available through com.rti.dds.subscription.DataReaderListener::on_data_available() (if a reader listener is installed on the builtin.SubscriptionBuiltinTopicDataDataReader).

Parameters
subscription_data<<inout>>. The information to be filled in on the associated subscription. Cannot be NULL.
subscription_handle<<in>>. Handle to a specific subscription associated with the com.rti.dds.subscription.DataReader. Cannot be NULL.. Must correspond to a subscription currently associated with the com.rti.dds.publication.DataWriter.
Exceptions
Oneof the Standard Return Codes, or com.rti.dds.infrastructure.RETCODE_NOT_ENABLED
void get_matched_subscription_participant_data ( ParticipantBuiltinTopicData  participant_data,
InstanceHandle_t  subscription_handle 
)

This operation retrieves the information on the discovered com.rti.dds.domain.DomainParticipant associated with the subscription that is currently matching with the com.rti.dds.publication.DataWriter.

The subscription_handle must correspond to a subscription currently associated with the com.rti.dds.publication.DataWriter. Otherwise, the operation will fail with com.rti.dds.infrastructure.RETCODE_BAD_PARAMETER. The operation may also fail with com.rti.dds.infrastructure.RETCODE_PRECONDITION_NOT_MET if the subscription corresponds to the same com.rti.dds.domain.DomainParticipant that the DataWriter belongs to. Use com.rti.dds.publication.DataWriter.get_matched_subscriptions to find the subscriptions that are currently matched with the com.rti.dds.publication.DataWriter.

Note: This operation does not retrieve the builtin.ParticipantBuiltinTopicData.property.

The above information is available through com.rti.dds.subscription.DataReaderListener::on_data_available() (if a reader listener is installed on the builtin.SubscriptionBuiltinTopicDataDataReader).

Parameters
participant_data<<inout>>. The information to be filled in on the associated participant Cannot be NULL.
subscription_handle<<in>>. Handle to a specific subscription associated with the com.rti.dds.subscription.DataReader. Cannot be NULL.. Must correspond to a subscription currently associated with the com.rti.dds.publication.DataWriter.
Exceptions
Oneof the Standard Return Codes, or com.rti.dds.infrastructure.RETCODE_NOT_ENABLED
Topic get_topic ( )

This operation returns the com.rti.dds.topic.Topic associated with the com.rti.dds.publication.DataWriter.

This is the same com.rti.dds.topic.Topic that was used to create the com.rti.dds.publication.DataWriter.

Returns
com.rti.dds.topic.Topic that was used to create the com.rti.dds.publication.DataWriter.
Publisher get_publisher ( )
void wait_for_acknowledgments ( Duration_t  max_wait)

Blocks the calling thread until all data written by reliable com.rti.dds.publication.DataWriter entity is acknowledged, or until timeout expires.

This operation blocks the calling thread until either all data written by the reliable com.rti.dds.publication.DataWriter entity is acknowledged by (a) all reliable com.rti.dds.subscription.DataReader entities that are matched and alive and (b) by all required subscriptions, or until the duration specified by the max_wait parameter elapses, whichever happens first. A successful completion indicates that all the samples written have been acknowledged by all reliable matched data readers and by all required subscriptions; a return value of TIMEOUT indicates that max_wait elapsed before all the data was acknowledged.

Note that if a thread is blocked in the call to wait_for_acknowledgments on a DataWriter and a different thread writes new samples on the same DataWriter, the new samples must be acknowledged before unblocking the thread waiting on wait_for_acknowledgments.

If the com.rti.dds.publication.DataWriter does not have com.rti.dds.infrastructure.ReliabilityQosPolicy kind set to RELIABLE, this operation will complete immediately with com.rti.dds.infrastructure.RETCODE_OK

Parameters
max_wait<<in>> Specifies maximum time to wait for acknowledgements com.rti.dds.infrastructure.Duration_t .
Exceptions
Oneof the Standard Return Codes, com.rti.dds.infrastructure.RETCODE_NOT_ENABLED, com.rti.dds.infrastructure.RETCODE_TIMEOUT
boolean is_sample_app_acknowledged ( SampleIdentity_t  identity)

This method can be used to see if a sample has been application acknowledged.

This method can be used to see if a sample has been application acknowledged by all the matching DataReaders that were alive when the sample was written.

If a DataReader does not enable application acknowledgment (by setting com.rti.dds.infrastructure.ReliabilityQosPolicy.acknowledgment_kind to a value other than com.rti.dds.infrastructure.ReliabilityQosPolicyAcknowledgmentModeKind.ReliabilityQosPolicyAcknowledgmentModeKind.PROTOCOL_ACKNOWLEDGMENT_MODE), the sample is considered application acknowledged for that DataReader.

Parameters
identity<<in>> Sample identity.
Returns
true when the sample has been application acknowledged. Otherwise, false.
Exceptions
Oneof the Standard Return Codes
void wait_for_asynchronous_publishing ( Duration_t  max_wait)

<<extension>> Blocks the calling thread until asynchronous sending is complete.

This operation blocks the calling thread (up to max_wait) until all data written by the asynchronous com.rti.dds.publication.DataWriter is sent and acknowledged (if reliable) by all matched com.rti.dds.subscription.DataReader entities. A successful completion indicates that all the samples written have been sent and acknowledged where applicable; a time out indicates that max_wait elapsed before all the data was sent and/or acknowledged.

In other words, this guarantees that sending to best effort com.rti.dds.subscription.DataReader is complete in addition to what com.rti.dds.publication.DataWriter.wait_for_acknowledgments provides.

If the com.rti.dds.publication.DataWriter does not have com.rti.dds.infrastructure.PublishModeQosPolicy kind set to com.rti.dds.infrastructure.PublishModeQosPolicyKind.PublishModeQosPolicyKind.ASYNCHRONOUS_PUBLISH_MODE_QOS the operation will complete immediately with com.rti.dds.infrastructure.RETCODE_OK.

Parameters
max_wait<<in>> Specifies maximum time to wait for acknowledgements com.rti.dds.infrastructure.Duration_t .
Exceptions
Oneof the Standard Return Codes, com.rti.dds.infrastructure.RETCODE_NOT_ENABLED, com.rti.dds.infrastructure.RETCODE_TIMEOUT
void assert_liveliness ( )

This operation manually asserts the liveliness of this com.rti.dds.publication.DataWriter.

This is used in combination with the LIVELINESS policy to indicate to RTI Connext that the com.rti.dds.publication.DataWriter remains active.

You only need to use this operation if the LIVELINESS setting is either com.rti.dds.infrastructure.LivelinessQosPolicyKind.LivelinessQosPolicyKind.MANUAL_BY_PARTICIPANT_LIVELINESS_QOS or com.rti.dds.infrastructure.LivelinessQosPolicyKind.LivelinessQosPolicyKind.MANUAL_BY_TOPIC_LIVELINESS_QOS. Otherwise, it has no effect.

Note: writing data via the com.rti.ndds.example.FooDataWriter.write or com.rti.ndds.example.FooDataWriter.write_w_timestamp operation asserts liveliness on the com.rti.dds.publication.DataWriter itself, and its com.rti.dds.domain.DomainParticipant. Consequently the use of assert_liveliness() is only needed if the application is not writing data regularly.

Exceptions
Oneof the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_NOT_ENABLED
See Also
com.rti.dds.infrastructure.LivelinessQosPolicy
void flush ( )

<<extension>> Flushes the batch in progress in the context of the calling thread.

After being flushed, the batch is available to be sent on the network.

If the com.rti.dds.publication.DataWriter does not have com.rti.dds.infrastructure.PublishModeQosPolicy kind set to com.rti.dds.infrastructure.PublishModeQosPolicyKind.PublishModeQosPolicyKind.ASYNCHRONOUS_PUBLISH_MODE_QOS, the batch will be sent on the network immediately (in the context of the calling thread).

If the com.rti.dds.publication.DataWriter does have com.rti.dds.infrastructure.PublishModeQosPolicy kind set to com.rti.dds.infrastructure.PublishModeQosPolicyKind.PublishModeQosPolicyKind.ASYNCHRONOUS_PUBLISH_MODE_QOS, the batch will be sent in the context of the asynchronous publishing thread.

This operation may block in the same conditions as com.rti.ndds.example.FooDataWriter.write.

If this operation does block, the RELIABILITY max_blocking_time configures the maximum time the write operation may block (waiting for space to become available). If max_blocking_time elapses before the DDS_DataWriter is able to store the modification without exceeding the limits, the operation will fail with DDS_RETCODE_TIMEOUT.

MT Safety:
flush() is only thread-safe with batching if com.rti.dds.infrastructure.BatchQosPolicy.thread_safe_write is TRUE.
Exceptions
Oneof the Standard Return Codes, com.rti.dds.infrastructure.RETCODE_TIMEOUT, com.rti.dds.infrastructure.RETCODE_OUT_OF_RESOURCES or com.rti.dds.infrastructure.RETCODE_NOT_ENABLED.
InstanceHandle_t register_instance_untyped ( Object  instance_data)

Register a new instance with this writer.

This method allows type-independent code to work with a variety of concrete com.rti.ndds.example.FooDataWriter classes in a consistent way.

Statically type-safe code should use the appropriate com.rti.ndds.example.FooDataWriter.register_instance method instead of this one. See that method for detailed documentation.

See Also
com.rti.dds.publication.DataWriter.unregister_instance_untyped
com.rti.ndds.example.FooDataWriter.register_instance
InstanceHandle_t register_instance_w_timestamp_untyped ( Object  instance_data,
Time_t  source_timestamp 
)

Register a new instance with this writer using the given time instead of the current time.

This method allows type-independent code to work with a variety of concrete com.rti.ndds.example.FooDataWriter classes in a consistent way.

Statically type-safe code should use the appropriate com.rti.ndds.example.FooDataWriter.register_instance_w_timestamp method instead of this one. See that method for detailed documentation.

See Also
com.rti.dds.publication.DataWriter.unregister_instance_w_timestamp_untyped
com.rti.ndds.example.FooDataWriter.register_instance
void unregister_instance_untyped ( Object  instance_data,
InstanceHandle_t  handle 
)

Unregister a new instance from this writer.

This method allows type-independent code to work with a variety of concrete com.rti.ndds.example.FooDataWriter classes in a consistent way.

Statically type-safe code should use the appropriate com.rti.ndds.example.FooDataWriter.unregister_instance method instead of this one. See that method for detailed documentation.

See Also
com.rti.dds.publication.DataWriter.register_instance_untyped
com.rti.ndds.example.FooDataWriter.unregister_instance
void unregister_instance_w_timestamp_untyped ( Object  instance_data,
InstanceHandle_t  handle,
Time_t  source_timestamp 
)

Unregister a new instance from this writer using the given time instead of the current time.

This method allows type-independent code to work with a variety of concrete com.rti.ndds.example.FooDataWriter classes in a consistent way.

Statically type-safe code should use the appropriate com.rti.ndds.example.FooDataWriter.FooDataWriter.unregister_instance_w_timestamp method instead of this one. See that method for detailed documentation.

See Also
com.rti.dds.publication.DataWriter.register_instance_w_timestamp_untyped
com.rti.ndds.example.FooDataWriter.FooDataWriter.unregister_instance_w_timestamp
void write_untyped ( Object  instance_data,
InstanceHandle_t  handle 
)

Publish a data sample.

This method allows type-independent code to work with a variety of concrete com.rti.ndds.example.FooDataWriter classes in a consistent way.

Statically type-safe code should use the appropriate com.rti.ndds.example.FooDataWriter.write method instead of this one. See that method for detailed documentation.

See Also
com.rti.dds.publication.DataWriter.write_w_timestamp_untyped
com.rti.ndds.example.FooDataWriter.write
void write_w_timestamp_untyped ( Object  instance_data,
InstanceHandle_t  handle,
Time_t  source_timestamp 
)

Publish a data sample using the given time instead of the current time.

This method allows type-independent code to work with a variety of concrete com.rti.ndds.example.FooDataWriter classes in a consistent way.

Statically type-safe code should use the appropriate com.rti.ndds.example.FooDataWriter.write_w_timestamp method instead of this one. See that method for detailed documentation.

See Also
com.rti.dds.publication.DataWriter.write_untyped
com.rti.ndds.example.FooDataWriter.write_w_timestamp
void dispose_untyped ( Object  instance_data,
InstanceHandle_t  handle 
)

Dispose a data sample.

This method allows type-independent code to work with a variety of concrete com.rti.ndds.example.FooDataWriter classes in a consistent way.

Statically type-safe code should use the appropriate com.rti.ndds.example.FooDataWriter.dispose method instead of this one. See that method for detailed documentation.

See Also
com.rti.dds.publication.DataWriter.dispose_w_timestamp_untyped
com.rti.ndds.example.FooDataWriter.dispose
void dispose_w_timestamp_untyped ( Object  instance_data,
InstanceHandle_t  handle,
Time_t  source_timestamp 
)

Dispose a data sample using the given time instead of the current time.

This method allows type-independent code to work with a variety of concrete com.rti.ndds.example.FooDataWriter classes in a consistent way.

Statically type-safe code should use the appropriate com.rti.ndds.example.FooDataWriter.dispose_w_timestamp method instead of this one. See that method for detailed documentation.

See Also
com.rti.dds.publication.DataWriter.dispose_untyped
com.rti.ndds.example.FooDataWriter.dispose_w_timestamp
void get_key_value_untyped ( Object  key_holder,
InstanceHandle_t  handle 
)

Fill in the key fields of the given data sample.

This method allows type-independent code to work with a variety of concrete com.rti.ndds.example.FooDataWriter classes in a consistent way.

Statically type-safe code should use the appropriate com.rti.ndds.example.FooDataWriter.get_key_value method instead of this one. See that method for detailed documentation.

See Also
com.rti.ndds.example.FooDataWriter.get_key_value
InstanceHandle_t lookup_instance_untyped ( Object  key_value)

Given a sample with the given key field values, return the handle corresponding to its instance.

This method allows type-independent code to work with a variety of concrete com.rti.ndds.example.FooDataWriter classes in a consistent way.

Statically type-safe code should use the appropriate com.rti.ndds.example.FooDataWriter.lookup_instance method instead of this one. See that method for detailed documentation.

See Also
com.rti.ndds.example.FooDataWriter.lookup_instance

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