RTI Connext C API  Version 5.1.0
Data Writers

DDS_DataWriter entity and associated elements More...

Data Structures

struct  FooDataWriter
 <<interface>> <<generic>> User data type specific data writer. More...
 
struct  DDS_OfferedDeadlineMissedStatus
 DDS_OFFERED_DEADLINE_MISSED_STATUS More...
 
struct  DDS_LivelinessLostStatus
 DDS_LIVELINESS_LOST_STATUS More...
 
struct  DDS_OfferedIncompatibleQosStatus
 DDS_OFFERED_INCOMPATIBLE_QOS_STATUS More...
 
struct  DDS_PublicationMatchedStatus
 DDS_PUBLICATION_MATCHED_STATUS More...
 
struct  DDS_ReliableWriterCacheEventCount
 <<eXtension>> The number of times the number of unacknowledged samples in the cache of a reliable writer hit a certain well-defined threshold. More...
 
struct  DDS_ReliableWriterCacheChangedStatus
 <<eXtension>> A summary of the state of a data writer's cache of unacknowledged samples written. More...
 
struct  DDS_ReliableReaderActivityChangedStatus
 <<eXtension>> Describes the activity (i.e. are acknowledgements forthcoming) of reliable readers matched to a reliable writer. More...
 
struct  DDS_DataWriterCacheStatus
 <<eXtension>> The status of the writer's cache. More...
 
struct  DDS_DataWriterProtocolStatus
 <<eXtension>> The status of a writer's internal protocol related metrics, like the number of samples pushed, pulled, filtered; and status of wire protocol traffic. More...
 
struct  DDS_DataWriterQos
 QoS policies supported by a DDS_DataWriter entity. More...
 
struct  DDS_DataWriterListener
 <<interface>> DDS_Listener for writer status. More...
 

Macros

#define DDS_OfferedDeadlineMissedStatus_INITIALIZER
 Initializer for new status instances.
 
#define DDS_LivelinessLostStatus_INITIALIZER
 Initializer for new status instances.
 
#define DDS_OfferedIncompatibleQosStatus_INITIALIZER
 Initializer for new status instances.
 
#define DDS_PublicationMatchedStatus_INITIALIZER
 Initializer for new status instances.
 
#define DDS_ReliableWriterCacheChangedStatus_INITIALIZER
 Initializer for new status instances.
 
#define DDS_ReliableReaderActivityChangedStatus_INITIALIZER
 Initializer for new status instances.
 
#define DDS_DataWriterCacheStatus_INITIALIZER
 Initializer for new status instances.
 
#define DDS_DataWriterProtocolStatus_INITIALIZER
 Initializer for new status instances.
 
#define DDS_DataWriterQos_INITIALIZER
 Initializer for new QoS instances.
 
#define DDS_DataWriterListener_INITIALIZER
 Initializer for new DDS_DataWriterListener.
 

Typedefs

typedef struct DDS_DataWriterImpl DDS_DataWriter
 <<interface>> Allows an application to set the value of the data to be published under a given DDS_Topic.
 
typedef void(* DDS_DataWriterListener_OfferedDeadlineMissedCallback )(void *listener_data, DDS_DataWriter *writer, const struct DDS_OfferedDeadlineMissedStatus *status)
 Prototype of a DDS_DataWriterListener on_offered_deadline_missed function.
 
typedef void(* DDS_DataWriterListener_LivelinessLostCallback )(void *listener_data, DDS_DataWriter *writer, const struct DDS_LivelinessLostStatus *status)
 Prototype of a DDS_DataWriterListener on_liveliness_lost function.
 
typedef void(* DDS_DataWriterListener_OfferedIncompatibleQosCallback )(void *listener_data, DDS_DataWriter *writer, const struct DDS_OfferedIncompatibleQosStatus *status)
 Prototype of a DDS_DataWriterListener on_offered_incompatible_qos function.
 
typedef void(* DDS_DataWriterListener_PublicationMatchedCallback )(void *listener_data, DDS_DataWriter *writer, const struct DDS_PublicationMatchedStatus *status)
 Prototype of a DDS_DataWriterListener on_publication_matched function.
 
typedef void(* DDS_DataWriterListener_ReliableWriterCacheChangedCallback )(void *listener_data, DDS_DataWriter *writer, const struct DDS_ReliableWriterCacheChangedStatus *status)
 <<eXtension>> A change has occurred in the writer's cache.
 
typedef void(* DDS_DataWriterListener_ReliableReaderActivityChangedCallback )(void *listener_data, DDS_DataWriter *writer, const struct DDS_ReliableReaderActivityChangedStatus *status)
 <<eXtension>> A matched reliable reader has become active or become inactive.
 
typedef void(* DDS_DataWriterListener_InstanceReplacedCallback )(void *listener_data, DDS_DataWriter *writer, const DDS_InstanceHandle_t *handle)
 <<eXtension>> An instance previously registered with the writer has been replaced
 

Functions

FooDataWriterFooDataWriter_narrow (DDS_DataWriter *writer)
 Narrow the given DDS_DataWriter pointer to a FooDataWriter pointer.
 
DDS_DataWriterFooDataWriter_as_datawriter (FooDataWriter *writer)
 Widen the given FooDataWriter pointer to a DDS_DataWriter pointer.
 
DDS_InstanceHandle_t FooDataWriter_register_instance (FooDataWriter *self, const Foo *instance_data)
 Informs RTI Connext that the application will be modifying a particular instance.
 
DDS_InstanceHandle_t FooDataWriter_register_instance_w_timestamp (FooDataWriter *self, const Foo *instance_data, const struct DDS_Time_t *source_timestamp)
 Performs the same functions as register_instance except that the application provides the value for the source_timestamp.
 
DDS_InstanceHandle_t FooDataWriter_register_instance_w_params (FooDataWriter *self, const Foo *instance_data, struct DDS_WriteParams_t *params)
 Performs the same function as FooDataWriter_register_instance and FooDataWriter_register_instance_w_timestamp except that it also provides the values contained in params.
 
DDS_ReturnCode_t FooDataWriter_unregister_instance (FooDataWriter *self, const Foo *instance_data, const DDS_InstanceHandle_t *handle)
 Reverses the action of FooDataWriter_register_instance.
 
DDS_ReturnCode_t FooDataWriter_unregister_instance_w_timestamp (FooDataWriter *self, const Foo *instance_data, const DDS_InstanceHandle_t *handle, const struct DDS_Time_t *source_timestamp)
 Performs the same function as FooDataWriter_unregister_instance except that it also provides the value for the source_timestamp.
 
DDS_ReturnCode_t FooDataWriter_unregister_instance_w_params (FooDataWriter *self, const Foo *instance_data, struct DDS_WriteParams_t *params)
 Performs the same function as FooDataWriter_unregister_instance and FooDataWriter_unregister_instance_w_timestamp except that it also provides the values contained in params.
 
DDS_ReturnCode_t FooDataWriter_write (FooDataWriter *self, const Foo *instance_data, const DDS_InstanceHandle_t *handle)
 Modifies the value of a data instance.
 
DDS_ReturnCode_t FooDataWriter_write_w_timestamp (FooDataWriter *self, const Foo *instance_data, const DDS_InstanceHandle_t *handle, const struct DDS_Time_t *source_timestamp)
 Performs the same function as FooDataWriter_write except that it also provides the value for the source_timestamp.
 
DDS_ReturnCode_t FooDataWriter_write_w_params (FooDataWriter *self, const Foo *instance_data, struct DDS_WriteParams_t *params)
 Performs the same function as FooDataWriter_write and FooDataWriter_write_w_timestamp except that it also provides the values contained in params.
 
DDS_ReturnCode_t FooDataWriter_dispose (FooDataWriter *self, const Foo *instance_data, const DDS_InstanceHandle_t *instance_handle)
 Requests the middleware to delete the data.
 
DDS_ReturnCode_t FooDataWriter_dispose_w_timestamp (FooDataWriter *self, const Foo *instance_data, const DDS_InstanceHandle_t *instance_handle, const struct DDS_Time_t *source_timestamp)
 Performs the same functions as dispose except that the application provides the value for the source_timestamp that is made available to DDS_DataReader objects by means of the source_timestamp attribute inside the DDS_SampleInfo.
 
DDS_ReturnCode_t FooDataWriter_dispose_w_params (FooDataWriter *self, const Foo *instance_data, struct DDS_WriteParams_t *params)
 Performs the same function as FooDataWriter_dispose and FooDataWriter_dispose_w_timestamp except that it also provides the values contained in params.
 
DDS_ReturnCode_t FooDataWriter_get_key_value (FooDataWriter *self, Foo *key_holder, const DDS_InstanceHandle_t *handle)
 Retrieve the instance key that corresponds to an instance handle.
 
DDS_InstanceHandle_t FooDataWriter_lookup_instance (FooDataWriter *self, const Foo *key_holder)
 Retrieve the instance handle that corresponds to an instance key_holder.
 
DDS_ReturnCode_t DDS_OfferedDeadlineMissedStatus_initialize (struct DDS_OfferedDeadlineMissedStatus *self)
 Initializer for new status instances.
 
DDS_ReturnCode_t DDS_OfferedDeadlineMissedStatus_copy (struct DDS_OfferedDeadlineMissedStatus *self, const struct DDS_OfferedDeadlineMissedStatus *source)
 Copy the contents of the given status into this status.
 
DDS_ReturnCode_t DDS_OfferedDeadlineMissedStatus_finalize (struct DDS_OfferedDeadlineMissedStatus *self)
 Free any dynamic memory allocated by status instances.
 
DDS_ReturnCode_t DDS_LivelinessLostStatus_initialize (struct DDS_LivelinessLostStatus *self)
 Initializer for new status instances.
 
DDS_ReturnCode_t DDS_LivelinessLostStatus_copy (struct DDS_LivelinessLostStatus *self, const struct DDS_LivelinessLostStatus *source)
 Copy the contents of the given status into this status.
 
DDS_ReturnCode_t DDS_LivelinessLostStatus_finalize (struct DDS_LivelinessLostStatus *self)
 Free any dynamic memory allocated by status instances.
 
DDS_ReturnCode_t DDS_OfferedIncompatibleQosStatus_initialize (struct DDS_OfferedIncompatibleQosStatus *self)
 Initializer for new status instances.
 
DDS_ReturnCode_t DDS_OfferedIncompatibleQosStatus_copy (struct DDS_OfferedIncompatibleQosStatus *self, const struct DDS_OfferedIncompatibleQosStatus *source)
 Copy the contents of the given status into this status.
 
DDS_ReturnCode_t DDS_OfferedIncompatibleQosStatus_finalize (struct DDS_OfferedIncompatibleQosStatus *self)
 Free any dynamic memory allocated by status instances.
 
DDS_ReturnCode_t DDS_PublicationMatchedStatus_initialize (struct DDS_PublicationMatchedStatus *self)
 Initializer for new status instances.
 
DDS_ReturnCode_t DDS_PublicationMatchedStatus_copy (struct DDS_PublicationMatchedStatus *self, const struct DDS_PublicationMatchedStatus *source)
 Copy the contents of the given status into this status.
 
DDS_ReturnCode_t DDS_PublicationMatchedStatus_finalize (struct DDS_PublicationMatchedStatus *self)
 Free any dynamic memory allocated by status instances.
 
DDS_ReturnCode_t DDS_ReliableWriterCacheChangedStatus_initialize (struct DDS_ReliableWriterCacheChangedStatus *self)
 Initializer for new status instances.
 
DDS_ReturnCode_t DDS_ReliableWriterCacheChangedStatus_copy (struct DDS_ReliableWriterCacheChangedStatus *self, const struct DDS_ReliableWriterCacheChangedStatus *source)
 Copy the contents of the given status into this status.
 
DDS_ReturnCode_t DDS_ReliableWriterCacheChangedStatus_finalize (struct DDS_ReliableWriterCacheChangedStatus *self)
 Free any dynamic memory allocated by status instances.
 
DDS_ReturnCode_t DDS_ReliableReaderActivityChangedStatus_initialize (struct DDS_ReliableReaderActivityChangedStatus *self)
 Initializer for new status instances.
 
DDS_ReturnCode_t DDS_ReliableReaderActivityChangedStatus_copy (struct DDS_ReliableReaderActivityChangedStatus *self, const struct DDS_ReliableReaderActivityChangedStatus *source)
 Copy the contents of the given status into this status.
 
DDS_ReturnCode_t DDS_ReliableReaderActivityChangedStatus_finalize (struct DDS_ReliableReaderActivityChangedStatus *self)
 Free any dynamic memory allocated by status instances.
 
DDS_ReturnCode_t DDS_DataWriterCacheStatus_initialize (struct DDS_DataWriterCacheStatus *self)
 Initializer for new status instances.
 
DDS_ReturnCode_t DDS_DataWriterCacheStatus_copy (struct DDS_DataWriterCacheStatus *self, const struct DDS_DataWriterCacheStatus *source)
 Copy the contents of the given status into this status.
 
DDS_ReturnCode_t DDS_DataWriterCacheStatus_finalize (struct DDS_DataWriterCacheStatus *self)
 Free any dynamic memory allocated by status instances.
 
DDS_ReturnCode_t DDS_DataWriterProtocolStatus_initialize (struct DDS_DataWriterProtocolStatus *self)
 Initializer for new status instances.
 
DDS_ReturnCode_t DDS_DataWriterProtocolStatus_copy (struct DDS_DataWriterProtocolStatus *self, const struct DDS_DataWriterProtocolStatus *source)
 Copy the contents of the given status into this status.
 
DDS_ReturnCode_t DDS_DataWriterProtocolStatus_finalize (struct DDS_DataWriterProtocolStatus *self)
 Free any dynamic memory allocated by status instances.
 
DDS_ReturnCode_t DDS_DataWriterQos_initialize (struct DDS_DataWriterQos *self)
 Initializer for new QoS instances.
 
DDS_ReturnCode_t DDS_DataWriterQos_copy (struct DDS_DataWriterQos *self, const struct DDS_DataWriterQos *source)
 Copy the contents of the given QoS into this QoS.
 
DDS_ReturnCode_t DDS_DataWriterQos_finalize (struct DDS_DataWriterQos *self)
 Free any dynamic memory allocated by the policies in this DDS_DataWriterQos.
 
DDS_EntityDDS_DataWriter_as_entity (DDS_DataWriter *dataWriter)
 Access a DDS_DataWriter's supertype instance.
 
DDS_ReturnCode_t DDS_DataWriter_assert_liveliness (DDS_DataWriter *self)
 This operation manually asserts the liveliness of this DDS_DataWriter.
 
DDS_ReturnCode_t DDS_DataWriter_get_matched_subscription_locators (DDS_DataWriter *self, struct DDS_LocatorSeq *locators)
 <<eXtension>> Retrieve the list of locators for subscriptions currently "associated" with this DDS_DataWriter.
 
DDS_ReturnCode_t DDS_DataWriter_get_matched_subscriptions (DDS_DataWriter *self, struct DDS_InstanceHandleSeq *subscription_handles)
 Retrieve the list of subscriptions currently "associated" with this DDS_DataWriter.
 
DDS_ReturnCode_t DDS_DataWriter_get_matched_subscription_data (DDS_DataWriter *self, struct DDS_SubscriptionBuiltinTopicData *subscription_data, const DDS_InstanceHandle_t *subscription_handle)
 This operation retrieves the information on a subscription that is currently "associated" with the DDS_DataWriter.
 
DDS_ReturnCode_t DDS_DataWriter_get_matched_subscription_participant_data (DDS_DataWriter *self, struct DDS_ParticipantBuiltinTopicData *participant_data, const DDS_InstanceHandle_t *subscription_handle)
 This operation retrieves the information on the discovered DDS_DomainParticipant associated with the subscription that is currently matching with the DDS_DataWriter.
 
DDS_TopicDDS_DataWriter_get_topic (DDS_DataWriter *self)
 This operation returns the DDS_Topic associated with the DDS_DataWriter.
 
DDS_PublisherDDS_DataWriter_get_publisher (DDS_DataWriter *self)
 This operation returns the DDS_Publisher to which the DDS_DataWriter belongs.
 
DDS_ReturnCode_t DDS_DataWriter_wait_for_acknowledgments (DDS_DataWriter *self, const struct DDS_Duration_t *max_wait)
 Blocks the calling thread until all data written by reliable DDS_DataWriter entity is acknowledged, or until timeout expires.
 
DDS_ReturnCode_t DDS_DataWriter_wait_for_asynchronous_publishing (DDS_DataWriter *self, const struct DDS_Duration_t *max_wait)
 <<eXtension>> Blocks the calling thread until asynchronous sending is complete.
 
DDS_ReturnCode_t DDS_DataWriter_get_liveliness_lost_status (DDS_DataWriter *self, struct DDS_LivelinessLostStatus *status)
 Accesses the DDS_LIVELINESS_LOST_STATUS communication status.
 
DDS_ReturnCode_t DDS_DataWriter_get_offered_deadline_missed_status (DDS_DataWriter *self, struct DDS_OfferedDeadlineMissedStatus *status)
 Accesses the DDS_OFFERED_DEADLINE_MISSED_STATUS communication status.
 
DDS_ReturnCode_t DDS_DataWriter_get_offered_incompatible_qos_status (DDS_DataWriter *self, struct DDS_OfferedIncompatibleQosStatus *status)
 Accesses the DDS_OFFERED_INCOMPATIBLE_QOS_STATUS communication status.
 
DDS_ReturnCode_t DDS_DataWriter_get_publication_matched_status (DDS_DataWriter *self, struct DDS_PublicationMatchedStatus *status)
 Accesses the DDS_PUBLICATION_MATCHED_STATUS communication status.
 
DDS_ReturnCode_t DDS_DataWriter_get_reliable_writer_cache_changed_status (DDS_DataWriter *self, struct DDS_ReliableWriterCacheChangedStatus *status)
 <<eXtension>> Get the reliable cache status for this writer.
 
DDS_ReturnCode_t DDS_DataWriter_get_reliable_reader_activity_changed_status (DDS_DataWriter *self, struct DDS_ReliableReaderActivityChangedStatus *status)
 <<eXtension>> Get the reliable reader activity changed status for this writer.
 
DDS_ReturnCode_t DDS_DataWriter_get_datawriter_cache_status (DDS_DataWriter *self, struct DDS_DataWriterCacheStatus *status)
 <<eXtension>> Get the datawriter cache status for this writer.
 
DDS_ReturnCode_t DDS_DataWriter_get_datawriter_protocol_status (DDS_DataWriter *self, struct DDS_DataWriterProtocolStatus *status)
 <<eXtension>> Get the datawriter protocol status for this writer.
 
DDS_ReturnCode_t DDS_DataWriter_get_matched_subscription_datawriter_protocol_status (DDS_DataWriter *self, struct DDS_DataWriterProtocolStatus *status, const DDS_InstanceHandle_t *subscription_handle)
 <<eXtension>> Get the datawriter protocol status for this writer, per matched subscription identified by the subscription_handle.
 
DDS_ReturnCode_t DDS_DataWriter_get_matched_subscription_datawriter_protocol_status_by_locator (DDS_DataWriter *self, struct DDS_DataWriterProtocolStatus *status, const struct DDS_Locator_t *locator)
 <<eXtension>> Get the datawriter protocol status for this writer, per matched subscription identified by the locator.
 
DDS_ReturnCode_t DDS_DataWriter_set_qos (DDS_DataWriter *self, const struct DDS_DataWriterQos *qos)
 Sets the writer QoS.
 
DDS_ReturnCode_t DDS_DataWriter_set_qos_with_profile (DDS_DataWriter *self, const char *library_name, const char *profile_name)
 <<eXtension>> Change the QoS of this writer using the input XML QoS profile.
 
DDS_ReturnCode_t DDS_DataWriter_get_qos (DDS_DataWriter *self, struct DDS_DataWriterQos *qos)
 Gets the writer QoS.
 
DDS_ReturnCode_t DDS_DataWriter_set_listener (DDS_DataWriter *self, const struct DDS_DataWriterListener *l, DDS_StatusMask mask)
 Sets the writer listener.
 
struct DDS_DataWriterListener DDS_DataWriter_get_listener (DDS_DataWriter *self)
 Get the writer listener.
 
DDS_ReturnCode_t DDS_DataWriter_get_listenerX (DDS_DataWriter *self, struct DDS_DataWriterListener *listener)
 <<eXtension>> Get the writer listener.
 
DDS_ReturnCode_t DDS_DataWriter_flush (DDS_DataWriter *self)
 <<eXtension>> Flushes the batch in progress in the context of the calling thread.
 

Detailed Description

DDS_DataWriter entity and associated elements

Macro Definition Documentation

#define DDS_OfferedDeadlineMissedStatus_INITIALIZER

Initializer for new status instances.

New DDS_OfferedDeadlineMissedStatus instances stored on the stack should be initialized with this value before they are passed to any function. This step ensures that those fields that use dynamic memory are properly initialized. This does not allocate memory.

The simplest way to create a status structure is to initialize it on the stack at the time of its creation. DDS_OfferedDeadlineMissedStatus_finalize should be called to free the contained fields that use dynamic memory:

See Also
DDS_OfferedDeadlineMissedStatus_initialize
DDS_DataWriter_get_offered_deadline_missed_status
DDS_OfferedDeadlineMissedStatus_finalize
#define DDS_LivelinessLostStatus_INITIALIZER

Initializer for new status instances.

New DDS_LivelinessLostStatus instances stored on the stack should be initialized with this value before they are passed to any function. This step ensures that those fields that use dynamic memory are properly initialized. This does not allocate memory.

The simplest way to create a status structure is to initialize it on the stack at the time of its creation. DDS_LivelinessLostStatus_finalize should be called to free the contained fields that use dynamic memory:

See Also
DDS_LivelinessLostStatus_initialize
DDS_DataWriter_get_liveliness_lost_status
DDS_LivelinessLostStatus_finalize
#define DDS_OfferedIncompatibleQosStatus_INITIALIZER

Initializer for new status instances.

New DDS_OfferedIncompatibleQosStatus instances stored on the stack should be initialized with this value before they are passed to any function. This step ensures that those fields that use dynamic memory are properly initialized. This does not allocate memory.

The simplest way to create a status structure is to initialize it on the stack at the time of its creation. DDS_OfferedIncompatibleQosStatus_finalize should be called to free the contained fields that use dynamic memory:

See Also
DDS_DataWriter_get_offered_incompatible_qos_status
DDS_OfferedIncompatibleQosStatus_finalize
#define DDS_PublicationMatchedStatus_INITIALIZER

Initializer for new status instances.

New DDS_PublicationMatchedStatus instances stored on the stack should be initialized with this value before they are passed to any function. This step ensures that those fields that use dynamic memory are properly initialized. This does not allocate memory.

The simplest way to create a status structure is to initialize it on the stack at the time of its creation. DDS_PublicationMatchedStatus_finalize should be called to free the contained fields that use dynamic memory:

See Also
DDS_DataWriter_get_publication_matched_status
DDS_PublicationMatchedStatus_finalize
#define DDS_ReliableWriterCacheChangedStatus_INITIALIZER

Initializer for new status instances.

New DDS_ReliableWriterCacheChangedStatus instances stored on the stack should be initialized with this value before they are passed to any function. This step ensures that those fields that use dynamic memory are properly initialized. This does not allocate memory.

The simplest way to create a status structure is to initialize it on the stack at the time of its creation. DDS_ReliableWriterCacheChangedStatus_finalize should be called to free the contained fields that use dynamic memory:

See Also
DDS_DataWriter_get_reliable_writer_cache_changed_status
DDS_ReliableWriterCacheChangedStatus_finalize
#define DDS_ReliableReaderActivityChangedStatus_INITIALIZER

Initializer for new status instances.

New DDS_ReliableReaderActivityChangedStatus instances stored on the stack should be initialized with this value before they are passed to any function. This step ensures that those fields that use dynamic memory are properly initialized. This does not allocate memory.

The simplest way to create a status structure is to initialize it on the stack at the time of its creation. DDS_ReliableReaderActivityChangedStatus_finalize should be called to free the contained fields that use dynamic memory:

See Also
DDS_DataWriter_get_reliable_reader_activity_changed_status
DDS_ReliableReaderActivityChangedStatus_finalize
#define DDS_DataWriterCacheStatus_INITIALIZER

Initializer for new status instances.

New DDS_DataWriterCacheStatus instances stored on the stack should be initialized with this value before they are passed to any function. This step ensures that those fields that use dynamic memory are properly initialized. This does not allocate memory.

The simplest way to create a status structure is to initialize it on the stack at the time of its creation. DDS_DataWriterCacheStatus_finalize should be called to free the contained fields that use dynamic memory:

See Also
DDS_DataWriter_get_datawriter_cache_status
DDS_DataWriterCacheStatus_finalize
#define DDS_DataWriterProtocolStatus_INITIALIZER

Initializer for new status instances.

New DDS_DataWriterProtocolStatus instances stored on the stack should be initialized with this value before they are passed to any function. This step ensures that those fields that use dynamic memory are properly initialized. This does not allocate memory.

The simplest way to create a status structure is to initialize it on the stack at the time of its creation. DDS_DataWriterProtocolStatus_finalize should be called to free the contained fields that use dynamic memory:

See Also
DDS_DataWriter_get_datawriter_protocol_status
DDS_DataWriterProtocolStatus_finalize
#define DDS_DataWriterQos_INITIALIZER

Initializer for new QoS instances.

New DDS_DataWriterQos instances stored on the stack should be initialized with this value before they are passed to any function. This step ensures that those contained QoS policies that use dynamic memory are properly initialized. This does not allocate memory.

The simplest way to create a new QoS structure is to initialize it on the stack at the time of its creation:

Note that the above assignment is not a substitute for calling DDS_Publisher_get_default_datawriter_qos or DDS_DataWriter_get_qos; one of those should be called subsequently to setting the QoS of a new or existing entity. DDS_DataWriterQos_finalize should be called to free the contained QoS policies that use dynamic memory:

See Also
DDS_Publisher_get_default_datawriter_qos
DDS_DataWriterQos_finalize
#define DDS_DataWriterListener_INITIALIZER

Initializer for new DDS_DataWriterListener.

All the new DDS_DataWriterListener instances allocated in the stack should be initialized to this value.No memory is allocated.

/* initialize listener functions */
listener.on_offered_deadline_missed = ....;
DDS_DataWriter_set_listener(myDataWriter, &listener, mask);
See Also
DDS_DataWriter_set_listener
DDS_DataWriterListener

Typedef Documentation

typedef struct DDS_DataWriterImpl DDS_DataWriter

<<interface>> Allows an application to set the value of the data to be published under a given DDS_Topic.

QoS:
DDS_DataWriterQos
Status:
DDS_LIVELINESS_LOST_STATUS, DDS_LivelinessLostStatus;
DDS_OFFERED_DEADLINE_MISSED_STATUS, DDS_OfferedDeadlineMissedStatus;
DDS_OFFERED_INCOMPATIBLE_QOS_STATUS, DDS_OfferedIncompatibleQosStatus;
DDS_PUBLICATION_MATCHED_STATUS, DDS_PublicationMatchedStatus;
DDS_RELIABLE_READER_ACTIVITY_CHANGED_STATUS, DDS_ReliableReaderActivityChangedStatus;
DDS_RELIABLE_WRITER_CACHE_CHANGED_STATUS, ::DDS_ReliableWriterCacheChangedStatus<BR>
Listener:
DDS_DataWriterListener

A DDS_DataWriter is attached to exactly one DDS_Publisher, that acts as a factory for it.

A DDS_DataWriter is bound to exactly one DDS_Topic and therefore to exactly one data type. The DDS_Topic must exist prior to the DDS_DataWriter's creation.

DDS_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 Foo are specified in the example type DDS_DataWriter.

The following operations may be called even if the DDS_DataWriter is not enabled. Other operations will fail with DDS_RETCODE_NOT_ENABLED if called on a disabled DDS_DataWriter:

Several DDS_DataWriter may operate in different threads. If they share the same DDS_Publisher, the middleware guarantees that its operations are thread-safe.

See Also
FooDataWriter
Operations Allowed in Listener Callbacks
typedef void(* DDS_DataWriterListener_OfferedDeadlineMissedCallback)(void *listener_data, DDS_DataWriter *writer, const struct DDS_OfferedDeadlineMissedStatus *status)

Prototype of a DDS_DataWriterListener on_offered_deadline_missed function.

typedef void(* DDS_DataWriterListener_LivelinessLostCallback)(void *listener_data, DDS_DataWriter *writer, const struct DDS_LivelinessLostStatus *status)

Prototype of a DDS_DataWriterListener on_liveliness_lost function.

Parameters
listener_data<<out>> Data associated with the listener when the listener is set
writer<<out>> Locally created DDS_DataWriter that triggers the listener callback
status<<out>> Current liveliness lost status of the locally created DDS_DataWriter
typedef void(* DDS_DataWriterListener_OfferedIncompatibleQosCallback)(void *listener_data, DDS_DataWriter *writer, const struct DDS_OfferedIncompatibleQosStatus *status)

Prototype of a DDS_DataWriterListener on_offered_incompatible_qos function.

Parameters
listener_data<<out>> Data associated with the listener when the listener is set
writer<<out>> Locally created DDS_DataWriter that triggers the listener callback
status<<out>> Current offered incompatible qos status of the locally created DDS_DataWriter
typedef void(* DDS_DataWriterListener_PublicationMatchedCallback)(void *listener_data, DDS_DataWriter *writer, const struct DDS_PublicationMatchedStatus *status)

Prototype of a DDS_DataWriterListener on_publication_matched function.

typedef void(* DDS_DataWriterListener_ReliableWriterCacheChangedCallback)(void *listener_data, DDS_DataWriter *writer, const struct DDS_ReliableWriterCacheChangedStatus *status)

<<eXtension>> A change has occurred in the writer's cache.

This callback is triggered when the cache becomes empty or full, or when the number of unacknowledged samples reaches a high or low watermark.

Parameters
listener_data<<out>> Data associated with the listener when the listener is set
writer<<out>> Locally created DDS_DataWriter that triggers the listener callback
status<<out>> Current reliable writer cache changed status of the locally created DDS_DataWriter
typedef void(* DDS_DataWriterListener_ReliableReaderActivityChangedCallback)(void *listener_data, DDS_DataWriter *writer, const struct DDS_ReliableReaderActivityChangedStatus *status)

<<eXtension>> A matched reliable reader has become active or become inactive.

Parameters
listener_data<<out>> Data associated with the listener when the listener is set
writer<<out>> Locally created DDS_DataWriter that triggers the listener callback
status<<out>> Current reliable reader activity changed status of the locally created DDS_DataWriter
typedef void(* DDS_DataWriterListener_InstanceReplacedCallback)(void *listener_data, DDS_DataWriter *writer, const DDS_InstanceHandle_t *handle)

<<eXtension>> An instance previously registered with the writer has been replaced

Parameters
listener_data<<out>> Data associated with the listener when the listener is set
writer<<out>> Locally created DDS_DataWriter that triggers the listener callback
handle<<out>> Handle of the replaced instance

Function Documentation

FooDataWriter* FooDataWriter_narrow ( DDS_DataWriter writer)

Narrow the given DDS_DataWriter pointer to a FooDataWriter pointer.

Check if the given writer is of type FooDataWriter.

Parameters
writer<<in>> Cannot be NULL.
writer<<in>> Base-class DDS_DataWriter to be converted to the auto-generated class FooDataWriter that extends DDS_DataWriter.
Returns
FooDataWriter if writer is of type Foo. Return NULL otherwise.
DDS_DataWriter* FooDataWriter_as_datawriter ( FooDataWriter writer)

Widen the given FooDataWriter pointer to a DDS_DataWriter pointer.

Parameters
writer<<in>> Cannot be NULL.
writer<<in>> auto-generated FooDataWriter to be converted to the Base-class DDS_DataWriter.
Returns
DDS_DataWriter.
DDS_InstanceHandle_t FooDataWriter_register_instance ( FooDataWriter self,
const Foo instance_data 
)

Informs RTI Connext that the application will be modifying a particular instance.

This operation is only useful for keyed data types. Using it for non-keyed types causes no effect and returns DDS_HANDLE_NIL. The operation takes as a parameter an instance (of which only the key value is examined) and returns a handle that can be used in successive write() or dispose() operations.

The operation gives RTI Connext an opportunity to pre-configure itself to improve performance.

The use of this operation by an application is optional even for keyed types. If an instance has not been pre-registered, the application can use the special value DDS_HANDLE_NIL as the DDS_InstanceHandle_t paramater to the write or dispose operation and RTI Connext will auto-register the instance.

For best performance, the operation should be invoked prior to calling any operation that modifies the instance, such as FooDataWriter_write, FooDataWriter_write_w_timestamp, FooDataWriter_dispose and FooDataWriter_dispose_w_timestamp and the handle used in conjunction with the data for those calls.

When this operation is used, RTI Connext will automatically supply the value of the source_timestamp that is used.

This operation may fail and return DDS_HANDLE_NIL if DDS_ResourceLimitsQosPolicy::max_instances limit has been exceeded.

The operation is idempotent. If it is called for an already registered instance, it just returns the already allocated handle. This may be used to lookup and retrieve the handle allocated to a given instance.

This operation can only be called after DDS_DataWriter has been enabled. Otherwise, DDS_HANDLE_NIL will be returned.

Parameters
self<<in>> Cannot be NULL.
instance_data<<in>> The instance that should be registered. Of this instance, only the fields that represent the key are examined by the function. Cannot be NULL..
Returns
For keyed data type, a handle that can be used in the calls that take a DDS_InstanceHandle_t, such as write, dispose, unregister_instance, or return DDS_HANDLE_NIL on failure. If the instance_data is of a data type that has no keys, this function always return DDS_HANDLE_NIL.
See Also
FooDataWriter_unregister_instance, FooDataWriter_get_key_value, RELATIONSHIP BETWEEN REGISTRATION, LIVELINESS and OWNERSHIP
DDS_InstanceHandle_t FooDataWriter_register_instance_w_timestamp ( FooDataWriter self,
const Foo instance_data,
const struct DDS_Time_t source_timestamp 
)

Performs the same functions as register_instance except that the application provides the value for the source_timestamp.

The provided source_timestamp potentially affects the relative order in which readers observe events from multiple writers. Refer to DESTINATION_ORDER QoS policy for details.

This operation may fail and return DDS_HANDLE_NIL if DDS_ResourceLimitsQosPolicy::max_instances limit has been exceeded.

This operation can only be called after DDS_DataWriter has been enabled. Otherwise, DDS_HANDLE_NIL will be returned.

Parameters
self<<in>> Cannot be NULL.
instance_data<<in>> The instance that should be registered. Of this instance, only the fields that represent the key are examined by the function. Cannot be NULL.
source_timestamp<<in>> The timestamp value must be greater than or equal to the timestamp value used in the last writer operation (used in a register, unregister, dispose, or write, with either the automatically supplied timestamp or the application provided timestamp). This timestamp may potentially affect the order in which readers observe events from multiple writers. Cannot be NULL.
Returns
For keyed data type, return a handle that can be used in the calls that take a DDS_InstanceHandle_t, such as write, dispose, unregister_instance, or return DDS_HANDLE_NIL on failure. If the instance_data is of a data type that has no keys, this function always return DDS_HANDLE_NIL.
See Also
FooDataWriter_unregister_instance, FooDataWriter_get_key_value
DDS_InstanceHandle_t FooDataWriter_register_instance_w_params ( FooDataWriter self,
const Foo instance_data,
struct DDS_WriteParams_t params 
)

Performs the same function as FooDataWriter_register_instance and FooDataWriter_register_instance_w_timestamp except that it also provides the values contained in params.

See Also
FooDataWriter_write_w_params
DDS_ReturnCode_t FooDataWriter_unregister_instance ( FooDataWriter self,
const Foo instance_data,
const DDS_InstanceHandle_t handle 
)

Reverses the action of FooDataWriter_register_instance.

This operation is useful only for keyed data types. Using it for non-keyed types causes no effect and reports no error. The operation takes as a parameter an instance (of which only the key value is examined) and a handle.

This operation should only be called on an instance that is currently registered. This includes instances that have been auto-registered by calling operations such as write or dispose as described in FooDataWriter_register_instance. Otherwise, this operation may fail with DDS_RETCODE_BAD_PARAMETER.

This only need be called just once per instance, regardless of how many times register_instance was called for that instance.

When this operation is used, RTI Connext will automatically supply the value of the source_timestamp that is used.

This operation informs RTI Connext that the DDS_DataWriter is no longer going to provide any information about the instance. This operation also indicates that RTI Connext can locally remove all information regarding that instance. The application should not attempt to use the handle previously allocated to that instance after calling FooDataWriter_unregister_instance().

The special value DDS_HANDLE_NIL can be used for the parameter handle. This indicates that the identity of the instance should be automatically deduced from the instance_data (by means of the key).

If handle is any value other than DDS_HANDLE_NIL, then it must correspond to an instance that has been registered. If there is no correspondence, the operation will fail with DDS_RETCODE_BAD_PARAMETER.

RTI Connext will not detect the error when the handle is any value other than DDS_HANDLE_NIL, corresponds to an instance that has been registered, but does not correspond to the instance deduced from the instance_data (by means of the key). RTI Connext will treat as if the unregister_instance() operation is for the instance as indicated by the handle.

If, after a FooDataWriter_unregister_instance, the application wants to modify (FooDataWriter_write or FooDataWriter_dispose) an instance, it has to register it again, or else use the special handle value DDS_HANDLE_NIL.

This operation does not indicate that the instance is deleted (that is the purpose of FooDataWriter_dispose). The operation FooDataWriter_unregister_instance just indicates that the DDS_DataWriter no longer has anything to say about the instance. DDS_DataReader entities that are reading the instance may receive a sample with DDS_NOT_ALIVE_NO_WRITERS_INSTANCE_STATE for the instance, unless there are other DDS_DataWriter objects writing that same instance.

DDS_WriterDataLifecycleQosPolicy::autodispose_unregistered_instances controls whether instances are automatically disposed when they are unregistered.

This operation can affect the ownership of the data instance (see OWNERSHIP). If the DDS_DataWriter was the exclusive owner of the instance, then calling unregister_instance() will relinquish that ownership.

If DDS_ReliabilityQosPolicy::kind is set to DDS_RELIABLE_RELIABILITY_QOS and the unregistration would overflow the resource limits of this writer or of a reader, this operation may block for up to DDS_ReliabilityQosPolicy::max_blocking_time; if this writer is still unable to unregister after that period, this function will fail with DDS_RETCODE_TIMEOUT.

Parameters
instance_data<<in>> The instance that should be unregistered. If Foo has a key and instance_handle is DDS_HANDLE_NIL, only the fields that represent the key are examined by the function. Otherwise, instance_data is not used. If instance_data is used, it must represent an instance that has been registerd. Otherwise, this function may fail with DDS_RETCODE_BAD_PARAMETER . If Foo has a key, instance_data can be NULL only if handle is not DDS_HANDLE_NIL. Otherwise, this function will fail with DDS_RETCODE_BAD_PARAMETER.
handle<<in>> represents the instance to be unregistered. If Foo has a key and handle is DDS_HANDLE_NIL, handle is not used and instance is deduced from instance_data. If Foo has no key, handle is not used. If handle is used, it must represent an instance that has been registered. Otherwise, this function may fail with DDS_RETCODE_BAD_PARAMETER. This function will fail with DDS_RETCODE_BAD_PARAMETER if handle is NULL. If Foo has a key, handle cannot be DDS_HANDLE_NIL if instance_data is NULL. Otherwise, this function will report the error DDS_RETCODE_BAD_PARAMETER.
self<<in>> Cannot be NULL.
Returns
One of the Standard Return Codes, DDS_RETCODE_TIMEOUT or DDS_RETCODE_NOT_ENABLED
See Also
FooDataWriter_register_instance
FooDataWriter_unregister_instance_w_timestamp
FooDataWriter_get_key_value
RELATIONSHIP BETWEEN REGISTRATION, LIVELINESS and OWNERSHIP
DDS_ReturnCode_t FooDataWriter_unregister_instance_w_timestamp ( FooDataWriter self,
const Foo instance_data,
const DDS_InstanceHandle_t handle,
const struct DDS_Time_t source_timestamp 
)

Performs the same function as FooDataWriter_unregister_instance except that it also provides the value for the source_timestamp.

The provided source_timestamp potentially affects the relative order in which readers observe events from multiple writers. Refer to DESTINATION_ORDER QoS policy for details.

The constraints on the values of the handle parameter and the corresponding error behavior are the same specified for the FooDataWriter_unregister_instance operation.

This operation may block and may time out (DDS_RETCODE_TIMEOUT) under the same circumtances described for the unregister_instance operation.

Parameters
self<<in>> Cannot be NULL.
instance_data<<in>> The instance that should be unregistered. If Foo has a key and instance_handle is DDS_HANDLE_NIL, only the fields that represent the key are examined by the function. Otherwise, instance_data is not used. If instance_data is used, it must represent an instance that has been registerd. Otherwise, this function may fail with DDS_RETCODE_BAD_PARAMETER. If Foo has a key, instance_data can be NULL only if handle is not DDS_HANDLE_NIL. Otherwise, this function will fail with DDS_RETCODE_BAD_PARAMETER.
handle<<in>> represents the instance to be unregistered. If Foo has a key and handle is DDS_HANDLE_NIL, handle is not used and instance is deduced from instance_data. If Foo has no key, handle is not used. If handle is used, it must represent an instance that has been registered. Otherwise, this function may fail with DDS_RETCODE_BAD_PARAMETER. This function will fail with DDS_RETCODE_BAD_PARAMETER if handle is NULL. If Foo has a key, handle cannot be DDS_HANDLE_NIL if instance_data is NULL. Otherwise, this function will fail with DDS_RETCODE_BAD_PARAMETER.
source_timestamp<<in>> The timestamp value must be greater than or equal to the timestamp value used in the last writer operation (used in a register, unregister, dispose, or write, with either the automatically supplied timestamp or the application provided timestamp). This timestamp may potentially affect the order in which readers observe events from multiple writers. Cannot be NULL.
Returns
One of the Standard Return Codes, DDS_RETCODE_TIMEOUT or DDS_RETCODE_NOT_ENABLED.
See Also
FooDataWriter_register_instance
FooDataWriter_unregister_instance
FooDataWriter_get_key_value
DDS_ReturnCode_t FooDataWriter_unregister_instance_w_params ( FooDataWriter self,
const Foo instance_data,
struct DDS_WriteParams_t params 
)

Performs the same function as FooDataWriter_unregister_instance and FooDataWriter_unregister_instance_w_timestamp except that it also provides the values contained in params.

See Also
FooDataWriter_write_w_params
FooDataWriter_dispose_w_params
DDS_ReturnCode_t FooDataWriter_write ( FooDataWriter self,
const Foo instance_data,
const DDS_InstanceHandle_t handle 
)

Modifies the value of a data instance.

When this operation is used, RTI Connext will automatically supply the value of the source_timestamp that is made available to DDS_DataReader objects by means of the source_timestamp attribute inside the DDS_SampleInfo. (Refer to DDS_SampleInfo and DESTINATION_ORDER QoS policy for details).

As a side effect, this operation asserts liveliness on the DDS_DataWriter itself, the DDS_Publisher and the DDS_DomainParticipant.

Note that the special value DDS_HANDLE_NIL can be used for the parameter handle. This indicates the identity of the instance should be automatically deduced from the instance_data (by means of the key).

If handle is any value other than DDS_HANDLE_NIL, then it must correspond to an instance that has been registered. If there is no correspondence, the operation will fail with DDS_RETCODE_BAD_PARAMETER.

RTI Connext will not detect the error when the handle is any value other than DDS_HANDLE_NIL, corresponds to an instance that has been registered, but does not correspond to the instance deduced from the instance_data (by means of the key). RTI Connext will treat as if the write() operation is for the instance as indicated by the handle.

This operation may block if the RELIABILITY kind is set to DDS_RELIABLE_RELIABILITY_QOS and the modification would cause data to be lost or else cause one of the limits specified in the RESOURCE_LIMITS to be exceeded.

Specifically, this operation may block in the following situations (note that the list may not be exhaustive), even if its DDS_HistoryQosPolicyKind is DDS_KEEP_LAST_HISTORY_QOS:

This operation may also block when using DDS_BEST_EFFORT_RELIABILITY_QOS and DDS_ASYNCHRONOUS_PUBLISH_MODE_QOS. In this case, the DDS_DataWriter will queue samples until they are sent by the asynchronous publishing thread. The number of samples that can be stored is determined by the DDS_HistoryQosPolicy. If the asynchronous thread does not send samples fast enough (e.g., when using a slow DDS_FlowController), the queue may fill up. In that case, subsequent write calls will block.

If this operation does block for any of the above reasons, 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 time out (DDS_RETCODE_TIMEOUT).

If there are no instance resources left, this operation may fail with DDS_RETCODE_OUT_OF_RESOURCES. Calling FooDataWriter_unregister_instance may help freeing up some resources.

This operation will fail with DDS_RETCODE_PRECONDITION_NOT_MET if the timestamp is less than the timestamp used in the last writer operation (register, unregister, dispose, or write, with either the automatically supplied timestamp or the application-provided timestamp).

Parameters
self<<in>> Cannot be NULL.
instance_data<<in>> The data to write.

This function will fail with DDS_RETCODE_BAD_PARAMETER if instance_data is NULL.

Parameters
handle<<in>> Either the handle returned by a previous call to FooDataWriter_register_instance, or else the special value DDS_HANDLE_NIL. If Foo has a key and handle is not DDS_HANDLE_NIL, handle must represent a registered instance of type Foo. Otherwise, this function may fail with DDS_RETCODE_BAD_PARAMETER. This function will fail with DDS_RETCODE_BAD_PARAMETER if handle is NULL.
Returns
One of the Standard Return Codes, DDS_RETCODE_TIMEOUT, DDS_RETCODE_PRECONDITION_NOT_MET, DDS_RETCODE_OUT_OF_RESOURCES, or DDS_RETCODE_NOT_ENABLED.
See Also
DDS_DataReader
FooDataWriter_write_w_timestamp
DESTINATION_ORDER
DDS_ReturnCode_t FooDataWriter_write_w_timestamp ( FooDataWriter self,
const Foo instance_data,
const DDS_InstanceHandle_t handle,
const struct DDS_Time_t source_timestamp 
)

Performs the same function as FooDataWriter_write except that it also provides the value for the source_timestamp.

Explicitly provides the timestamp that will be available to the DDS_DataReader objects by means of the source_timestamp attribute inside the DDS_SampleInfo. (Refer to DDS_SampleInfo and DESTINATION_ORDER QoS policy for details)

The constraints on the values of the handle parameter and the corresponding error behavior are the same specified for the FooDataWriter_write operation.

This operation may block and time out (DDS_RETCODE_TIMEOUT) under the same circumtances described for FooDataWriter_write.

If there are no instance resources left, this operation may fail with DDS_RETCODE_OUT_OF_RESOURCES. Calling FooDataWriter_unregister_instance may help free up some resources.

This operation may fail with DDS_RETCODE_BAD_PARAMETER under the same circumstances described for the write operation.

Parameters
self<<in>> Cannot be NULL.
instance_data<<in>> The data to write. This function will fail with DDS_RETCODE_BAD_PARAMETER if instance_data is NULL.
handle<<in>> Either the handle returned by a previous call to FooDataWriter_register_instance, or else the special value DDS_HANDLE_NIL. If Foo has a key and handle is not DDS_HANDLE_NIL, handle must represent a registered instance of type Foo. Otherwise, this function may fail with DDS_RETCODE_BAD_PARAMETER. This function will fail with DDS_RETCODE_BAD_PARAMETER if handle is NULL.
source_timestamp<<in>> When using DDS_BY_SOURCE_TIMESTAMP_DESTINATIONORDER_QOS the timestamp value must be greater than or equal to the timestamp value used in the last writer operation (register, unregister, dispose, or write, with either the automatically supplied timestamp or the application-provided timestamp) However, if it is less than the timestamp of the previous operation but the difference is less than the DDS_DestinationOrderQosPolicy::source_timestamp_tolerance, the timestamp of the previous operation will be used as the source timestamp of this sample. Otherwise, if the difference is greater than DDS_DestinationOrderQosPolicy::source_timestamp_tolerance, the function will return DDS_RETCODE_BAD_PARAMETER.

Cannot be NULL.

Returns
One of the Standard Return Codes, DDS_RETCODE_TIMEOUT, DDS_RETCODE_OUT_OF_RESOURCES, or DDS_RETCODE_NOT_ENABLED.
See Also
FooDataWriter_write
DDS_DataReader
DESTINATION_ORDER
DDS_ReturnCode_t FooDataWriter_write_w_params ( FooDataWriter self,
const Foo instance_data,
struct DDS_WriteParams_t params 
)

Performs the same function as FooDataWriter_write and FooDataWriter_write_w_timestamp except that it also provides the values contained in params.

Allows provision of the sample identity, related sample identity, source timestamp, instance handle, and publication priority contained in params.

This operation may block and time out (DDS_RETCODE_TIMEOUT) under the same circumstances described for FooDataWriter_write.

If there are no instance resources left, this operation may fail with DDS_RETCODE_OUT_OF_RESOURCES. Calling FooDataWriter_unregister_instance_w_params may help free up some resources.

This operation may fail with DDS_RETCODE_BAD_PARAMETER under the same circumstances described for the write operation.

Parameters
self<<in>> Cannot be NULL.
instance_data<<in>> The data to write. This function will fail with DDS_RETCODE_BAD_PARAMETER if instance_data is NULL.
params<<in>> The write parameters. This function will fail with DDS_RETCODE_BAD_PARAMETER if params is NULL.

DDS_RETCODE_TIMEOUT, DDS_RETCODE_OUT_OF_RESOURCES or DDS_RETCODE_NOT_ENABLED.

See Also
FooDataWriter_write
DDS_DataReader
DDS_ReturnCode_t FooDataWriter_dispose ( FooDataWriter self,
const Foo instance_data,
const DDS_InstanceHandle_t instance_handle 
)

Requests the middleware to delete the data.

This operation is useful only for keyed data types. Using it for non-keyed types has no effect and reports no error.

The actual deletion is postponed until there is no more use for that data in the whole system.

Applications are made aware of the deletion by means of operations on the DDS_DataReader objects that already knew that instance. DDS_DataReader objects that didn't know the instance will never see it.

This operation does not modify the value of the instance. The instance_data parameter is passed just for the purposes of identifying the instance.

When this operation is used, RTI Connext will automatically supply the value of the source_timestamp that is made available to DDS_DataReader objects by means of the source_timestamp attribute inside the DDS_SampleInfo.

The constraints on the values of the handle parameter and the corresponding error behavior are the same specified for the FooDataWriter_unregister_instance operation.

The special value DDS_HANDLE_NIL can be used for the parameter instance_handle. This indicates the identity of the instance should be automatically deduced from the instance_data (by means of the key).

If handle is any value other than DDS_HANDLE_NIL, then it must correspond to an instance that has been registered. If there is no correspondence, the operation will fail with DDS_RETCODE_BAD_PARAMETER.

RTI Connext will not detect the error when the handle is any value other than DDS_HANDLE_NIL, corresponds to an instance that has been registered, but does not correspond to the instance deduced from the instance_data (by means of the key). RTI Connext will treat as if the dispose() operation is for the instance as indicated by the handle.

This operation may block and time out (DDS_RETCODE_TIMEOUT) under the same circumtances described for FooDataWriter_write().

If there are no instance resources left, this operation may fail with DDS_RETCODE_OUT_OF_RESOURCES. Calling FooDataWriter_unregister_instance may help freeing up some resources.

Parameters
self<<in>> Cannot be NULL.
instance_data<<in>> The data to dispose. If Foo has a key and instance_handle is DDS_HANDLE_NIL, only the fields that represent the key are examined by the function. Otherwise, instance_data is not used. If Foo has a key, instance_data can be NULL only if instance_handle is not DDS_HANDLE_NIL. Otherwise, this function will fail with DDS_RETCODE_BAD_PARAMETER.
instance_handle<<in>> Either the handle returned by a previous call to FooDataWriter_register_instance, or else the special value DDS_HANDLE_NIL. If Foo has a key and instance_handle is DDS_HANDLE_NIL, instance_handle is not used and instance is deduced from instance_data. If Foo has no key, instance_handle is not used. If handle is used, it must represent a registered instance of type Foo. Otherwise, this function fail with DDS_RETCODE_BAD_PARAMETER. This function will fail with DDS_RETCODE_BAD_PARAMETER if handle is NULL. If Foo has a key, instance_handle cannot be DDS_HANDLE_NIL if instance_data is NULL. Otherwise, this function will fail with DDS_RETCODE_BAD_PARAMETER.
Returns
One of the Standard Return Codes, DDS_RETCODE_TIMEOUT, DDS_RETCODE_OUT_OF_RESOURCES or DDS_RETCODE_NOT_ENABLED.
See Also
FooDataWriter_dispose_w_timestamp
RELATIONSHIP BETWEEN REGISTRATION, LIVELINESS and OWNERSHIP
DDS_ReturnCode_t FooDataWriter_dispose_w_timestamp ( FooDataWriter self,
const Foo instance_data,
const DDS_InstanceHandle_t instance_handle,
const struct DDS_Time_t source_timestamp 
)

Performs the same functions as dispose except that the application provides the value for the source_timestamp that is made available to DDS_DataReader objects by means of the source_timestamp attribute inside the DDS_SampleInfo.

The constraints on the values of the handle parameter and the corresponding error behavior are the same specified for the FooDataWriter_dispose operation.

This operation may block and time out (DDS_RETCODE_TIMEOUT) under the same circumtances described for FooDataWriter_write.

If there are no instance resources left, this operation may fail with DDS_RETCODE_OUT_OF_RESOURCES. Calling FooDataWriter_unregister_instance may help freeing up some resources.

Parameters
self<<in>> Cannot be NULL.
instance_data<<in>> The data to dispose. If Foo has a key and instance_handle is DDS_HANDLE_NIL, only the fields that represent the key are examined by the function. Otherwise, instance_data is not used. If Foo has a key, instance_data can be NULL only if instance_handle is not DDS_HANDLE_NIL. Otherwise, this function will fail with DDS_RETCODE_BAD_PARAMETER.
instance_handle<<in>> Either the handle returned by a previous call to FooDataWriter_register_instance, or else the special value DDS_HANDLE_NIL. If Foo has a key and instance_handle is DDS_HANDLE_NIL, instance_handle is not used and instance is deduced from instance_data. If Foo has no key, instance_handle is not used. If handle is used, it must represent a registered instance of type Foo. Otherwise, this function may fail with DDS_RETCODE_BAD_PARAMETER This function will fail with DDS_RETCODE_BAD_PARAMETER if handle is NULL. If Foo has a key, instance_handle cannot be DDS_HANDLE_NIL if instance_data is NULL. Otherwise, this function will fail with DDS_RETCODE_BAD_PARAMETER.
source_timestamp<<in>> The timestamp value must be greater than or equal to the timestamp value used in the last writer operation (used in a register, unregister, dispose, or write, with either the automatically supplied timestamp or the application provided timestamp). This timestamp may potentially affect the order in which readers observe events from multiple writers. This timestamp will be available to the DDS_DataReader objects by means of the source_timestamp attribute inside the DDS_SampleInfo. Cannot be NULL.
Returns
One of the Standard Return Codes, DDS_RETCODE_TIMEOUT, DDS_RETCODE_OUT_OF_RESOURCES or DDS_RETCODE_NOT_ENABLED.
See Also
FooDataWriter_dispose
DDS_ReturnCode_t FooDataWriter_dispose_w_params ( FooDataWriter self,
const Foo instance_data,
struct DDS_WriteParams_t params 
)

Performs the same function as FooDataWriter_dispose and FooDataWriter_dispose_w_timestamp except that it also provides the values contained in params.

See Also
FooDataWriter_write_w_params
DDS_ReturnCode_t FooDataWriter_get_key_value ( FooDataWriter self,
Foo key_holder,
const DDS_InstanceHandle_t handle 
)

Retrieve the instance key that corresponds to an instance handle.

Useful for keyed data types.

The operation will only fill the fields that form the key inside the key_holder instance. If Foo has no key, this function has no effect and exit with no error.

For keyed data types, this operation may fail with DDS_RETCODE_BAD_PARAMETER if the handle does not correspond to an existing data-object known to the DDS_DataWriter.

Parameters
self<<in>> Cannot be NULL.
key_holder<<inout>> a user data type specific key holder, whose key fields are filled by this operation. If Foo has no key, this function has no effect. This function will fail with DDS_RETCODE_BAD_PARAMETER if key_holder is NULL.
handle<<in>> the instance whose key is to be retrieved. If Foo has a key, handle must represent a registered instance of type Foo. Otherwise, this function will fail with DDS_RETCODE_BAD_PARAMETER. If Foo has a key and handle is DDS_HANDLE_NIL, this function will fail with DDS_RETCODE_BAD_PARAMETER. This function will fail with DDS_RETCODE_BAD_PARAMETER if handle is NULL.
Returns
One of the Standard Return Codes or DDS_RETCODE_NOT_ENABLED.
See Also
FooDataReader_get_key_value
DDS_InstanceHandle_t FooDataWriter_lookup_instance ( FooDataWriter self,
const Foo key_holder 
)

Retrieve the instance handle that corresponds to an instance key_holder.

Useful for keyed data types.

This operation takes as a parameter an instance and returns a handle that can be used in subsequent operations that accept an instance handle as an argument. The instance parameter is only used for the purpose of examining the fields that define the key. This operation does not register the instance in question. If the instance has not been previously registered, or if for any other reason RTI Connext is unable to provide an instance handle, RTI Connext will return the special value HANDLE_NIL.

Parameters
self<<in>> Cannot be NULL.
key_holder<<in>> a user data type specific key holder.
Returns
the instance handle associated with this instance. If Foo has no key, this function has no effect and returns DDS_HANDLE_NIL
DDS_ReturnCode_t DDS_OfferedDeadlineMissedStatus_initialize ( struct DDS_OfferedDeadlineMissedStatus self)

Initializer for new status instances.

New DDS_OfferedDeadlineMissedStatus instance on heap should be initialized with this function before they are passed to any function. This step ensures that those contained fields that use dynamic memory are properly initialized. This function does not allocate memory.

DDS_OfferedDeadlineMissedStatus_finalize should be called to free the contained fields that use dynamic memory:

Parameters
self<<in>> Cannot be NULL.
Returns
One of the Standard Return Codes
See Also
DDS_DataWriter_get_offered_deadline_missed_status
DDS_OfferedDeadlineMissedStatus_finalize
DDS_ReturnCode_t DDS_OfferedDeadlineMissedStatus_copy ( struct DDS_OfferedDeadlineMissedStatus self,
const struct DDS_OfferedDeadlineMissedStatus source 
)

Copy the contents of the given status into this status.

Status instances can use dynamic memory because of the sequences contained in some status. A shallow copy by assignment is therefore unsafe. This function performs a deep-copy, allocating memory if necessary.

Parameters
self<<in>> Cannot be NULL.
source<<in>>. Status to be copied from.
Returns
One of the Standard Return Codes
See Also
DDS_OfferedDeadlineMissedStatus_INITIALIZER
DDS_OfferedDeadlineMissedStatus_initialize
DDS_OfferedDeadlineMissedStatus_finalize
DDS_ReturnCode_t DDS_OfferedDeadlineMissedStatus_finalize ( struct DDS_OfferedDeadlineMissedStatus self)

Free any dynamic memory allocated by status instances.

some status may use dynamic memory (regardless of whether the status itself is in dynamic memory). This function frees that memory but otherwise leaves this status unchanged. It should be called on all instances before they are freed (or, in the case of stack-based instances, before they go out of scope).

Note that if this status instance is stored in heap memory, calling this function will not call free() on it; the user is responsible for explicitly freeing any heap-based status instance after calling this function.

Parameters
self<<in>> Cannot be NULL.
Returns
One of the Standard Return Codes
See Also
DDS_OfferedDeadlineMissedStatus_INITIALIZER
DDS_OfferedDeadlineMissedStatus_initialize
DDS_ReturnCode_t DDS_LivelinessLostStatus_initialize ( struct DDS_LivelinessLostStatus self)

Initializer for new status instances.

New DDS_LivelinessLostStatus instance on heap should be initialized with this function before they are passed to any function. This step ensures that those contained fields that use dynamic memory are properly initialized. This function does not allocate memory.

DDS_LivelinessLostStatus_finalize should be called to free the contained fields that use dynamic memory:

Parameters
self<<in>> Cannot be NULL.
Returns
One of the Standard Return Codes
See Also
DDS_DataWriter_get_liveliness_lost_status
DDS_LivelinessLostStatus_finalize
DDS_ReturnCode_t DDS_LivelinessLostStatus_copy ( struct DDS_LivelinessLostStatus self,
const struct DDS_LivelinessLostStatus source 
)

Copy the contents of the given status into this status.

Status instances can use dynamic memory because of the sequences contained in some status. A shallow copy by assignment is therefore unsafe. This function performs a deep-copy, allocating memory if necessary.

Parameters
self<<in>> Cannot be NULL.
source<<in>>. Status to be copied from.
Returns
One of the Standard Return Codes
See Also
DDS_LivelinessLostStatus_INITIALIZER
DDS_LivelinessLostStatus_initialize
DDS_LivelinessLostStatus_finalize
DDS_ReturnCode_t DDS_LivelinessLostStatus_finalize ( struct DDS_LivelinessLostStatus self)

Free any dynamic memory allocated by status instances.

some status may use dynamic memory (regardless of whether the status itself is in dynamic memory). This function frees that memory but otherwise leaves this status unchanged. It should be called on all instances before they are freed (or, in the case of stack-based instances, before they go out of scope).

Note that if this status instance is stored in heap memory, calling this function will not call free() on it; the user is responsible for explicitly freeing any heap-based status instance after calling this function.

Parameters
self<<in>> Cannot be NULL.
Returns
One of the Standard Return Codes
See Also
DDS_LivelinessLostStatus_INITIALIZER
DDS_LivelinessLostStatus_initialize
DDS_ReturnCode_t DDS_OfferedIncompatibleQosStatus_initialize ( struct DDS_OfferedIncompatibleQosStatus self)

Initializer for new status instances.

New DDS_OfferedIncompatibleQosStatus instance on heap should be initialized with this function before they are passed to any function. This step ensures that those contained fields that use dynamic memory are properly initialized. This function does not allocate memory.

DDS_OfferedIncompatibleQosStatus_finalize should be called to free the contained fields that use dynamic memory:

Parameters
self<<in>> Cannot be NULL.
Returns
One of the Standard Return Codes
See Also
DDS_DataWriter_get_offered_incompatible_qos_status
DDS_OfferedIncompatibleQosStatus_finalize
DDS_ReturnCode_t DDS_OfferedIncompatibleQosStatus_copy ( struct DDS_OfferedIncompatibleQosStatus self,
const struct DDS_OfferedIncompatibleQosStatus source 
)

Copy the contents of the given status into this status.

Status instances can use dynamic memory because of the sequences contained in some status. A shallow copy by assignment is therefore unsafe. This function performs a deep-copy, allocating memory if necessary.

Parameters
self<<in>> Cannot be NULL.
source<<in>>. Status to be copied from.
Returns
One of the Standard Return Codes
See Also
DDS_OfferedIncompatibleQosStatus_INITIALIZER
DDS_OfferedIncompatibleQosStatus_initialize
DDS_OfferedIncompatibleQosStatus_finalize
DDS_ReturnCode_t DDS_OfferedIncompatibleQosStatus_finalize ( struct DDS_OfferedIncompatibleQosStatus self)

Free any dynamic memory allocated by status instances.

some status may use dynamic memory (regardless of whether the status itself is in dynamic memory). This function frees that memory but otherwise leaves this status unchanged. It should be called on all instances before they are freed (or, in the case of stack-based instances, before they go out of scope).

Note that if this status instance is stored in heap memory, calling this function will not call free() on it; the user is responsible for explicitly freeing any heap-based status instance after calling this function.

Parameters
self<<in>> Cannot be NULL.
Returns
One of the Standard Return Codes
See Also
DDS_OfferedIncompatibleQosStatus_INITIALIZER
DDS_OfferedIncompatibleQosStatus_initialize
DDS_ReturnCode_t DDS_PublicationMatchedStatus_initialize ( struct DDS_PublicationMatchedStatus self)

Initializer for new status instances.

New DDS_PublicationMatchedStatus instance on heap should be initialized with this function before they are passed to any function. This step ensures that those contained fields that use dynamic memory are properly initialized. This function does not allocate memory.

DDS_PublicationMatchedStatus_finalize should be called to free the contained fields that use dynamic memory:

Parameters
self<<in>> Cannot be NULL.
Returns
One of the Standard Return Codes
See Also
DDS_DataWriter_get_publication_matched_status
DDS_PublicationMatchedStatus_finalize
DDS_ReturnCode_t DDS_PublicationMatchedStatus_copy ( struct DDS_PublicationMatchedStatus self,
const struct DDS_PublicationMatchedStatus source 
)

Copy the contents of the given status into this status.

Status instances can use dynamic memory because of the sequences contained in some status. A shallow copy by assignment is therefore unsafe. This function performs a deep-copy, allocating memory if necessary.

Parameters
self<<in>> Cannot be NULL.
source<<in>>. Status to be copied from.
Returns
One of the Standard Return Codes
See Also
DDS_PublicationMatchedStatus_INITIALIZER
DDS_PublicationMatchedStatus_initialize
DDS_PublicationMatchedStatus_finalize
DDS_ReturnCode_t DDS_PublicationMatchedStatus_finalize ( struct DDS_PublicationMatchedStatus self)

Free any dynamic memory allocated by status instances.

some status may use dynamic memory (regardless of whether the status itself is in dynamic memory). This function frees that memory but otherwise leaves this status unchanged. It should be called on all instances before they are freed (or, in the case of stack-based instances, before they go out of scope).

Note that if this status instance is stored in heap memory, calling this function will not call free() on it; the user is responsible for explicitly freeing any heap-based status instance after calling this function.

Parameters
self<<in>> Cannot be NULL.
Returns
One of the Standard Return Codes
See Also
DDS_PublicationMatchedStatus_INITIALIZER
DDS_PublicationMatchedStatus_initialize
DDS_ReturnCode_t DDS_ReliableWriterCacheChangedStatus_initialize ( struct DDS_ReliableWriterCacheChangedStatus self)

Initializer for new status instances.

New DDS_ReliableWriterCacheChangedStatus instance on heap should be initialized with this function before they are passed to any function. This step ensures that those contained fields that use dynamic memory are properly initialized. This function does not allocate memory.

DDS_ReliableWriterCacheChangedStatus_finalize should be called to free the contained fields that use dynamic memory:

Parameters
self<<in>> Cannot be NULL.
Returns
One of the Standard Return Codes
See Also
DDS_DataWriter_get_reliable_writer_cache_changed_status
DDS_ReliableWriterCacheChangedStatus_finalize
DDS_ReturnCode_t DDS_ReliableWriterCacheChangedStatus_copy ( struct DDS_ReliableWriterCacheChangedStatus self,
const struct DDS_ReliableWriterCacheChangedStatus source 
)

Copy the contents of the given status into this status.

Status instances can use dynamic memory because of the sequences contained in some status. A shallow copy by assignment is therefore unsafe. This function performs a deep-copy, allocating memory if necessary.

Parameters
self<<in>> Cannot be NULL.
source<<in>>. Status to be copied from.
Returns
One of the Standard Return Codes
See Also
DDS_ReliableWriterCacheChangedStatus_INITIALIZER
DDS_ReliableWriterCacheChangedStatus_initialize
DDS_ReliableWriterCacheChangedStatus_finalize
DDS_ReturnCode_t DDS_ReliableWriterCacheChangedStatus_finalize ( struct DDS_ReliableWriterCacheChangedStatus self)

Free any dynamic memory allocated by status instances.

some status may use dynamic memory (regardless of whether the status itself is in dynamic memory). This function frees that memory but otherwise leaves this status unchanged. It should be called on all instances before they are freed (or, in the case of stack-based instances, before they go out of scope).

Note that if this status instance is stored in heap memory, calling this function will not call free() on it; the user is responsible for explicitly freeing any heap-based status instance after calling this function.

Parameters
self<<in>> Cannot be NULL.
Returns
One of the Standard Return Codes
See Also
DDS_ReliableWriterCacheChangedStatus_INITIALIZER
DDS_ReliableWriterCacheChangedStatus_initialize
DDS_ReturnCode_t DDS_ReliableReaderActivityChangedStatus_initialize ( struct DDS_ReliableReaderActivityChangedStatus self)

Initializer for new status instances.

New DDS_ReliableReaderActivityChangedStatus instance on heap should be initialized with this function before they are passed to any function. This step ensures that those contained fields that use dynamic memory are properly initialized. This function does not allocate memory.

DDS_ReliableReaderActivityChangedStatus_finalize should be called to free the contained fields that use dynamic memory:

Returns
One of the Standard Return Codes
See Also
DDS_DataWriter_get_reliable_reader_activity_changed_status
DDS_ReliableReaderActivityChangedStatus_finalize
DDS_ReturnCode_t DDS_ReliableReaderActivityChangedStatus_copy ( struct DDS_ReliableReaderActivityChangedStatus self,
const struct DDS_ReliableReaderActivityChangedStatus source 
)

Copy the contents of the given status into this status.

Status instances can use dynamic memory because of the sequences contained in some status. A shallow copy by assignment is therefore unsafe. This function performs a deep-copy, allocating memory if necessary.

Parameters
self<<in>> Cannot be NULL.
source<<in>>. Status to be copied from.
Returns
One of the Standard Return Codes
See Also
DDS_ReliableReaderActivityChangedStatus_INITIALIZER
DDS_ReliableReaderActivityChangedStatus_initialize
DDS_ReliableReaderActivityChangedStatus_finalize
DDS_ReturnCode_t DDS_ReliableReaderActivityChangedStatus_finalize ( struct DDS_ReliableReaderActivityChangedStatus self)

Free any dynamic memory allocated by status instances.

some status may use dynamic memory (regardless of whether the status itself is in dynamic memory). This function frees that memory but otherwise leaves this status unchanged. It should be called on all instances before they are freed (or, in the case of stack-based instances, before they go out of scope).

Note that if this status instance is stored in heap memory, calling this function will not call free() on it; the user is responsible for explicitly freeing any heap-based status instance after calling this function.

Parameters
self<<in>> Cannot be NULL.
Returns
One of the Standard Return Codes
See Also
DDS_ReliableReaderActivityChangedStatus_INITIALIZER
DDS_ReliableReaderActivityChangedStatus_initialize
DDS_ReturnCode_t DDS_DataWriterCacheStatus_initialize ( struct DDS_DataWriterCacheStatus self)

Initializer for new status instances.

New DDS_DataWriterCacheStatus instance on heap should be initialized with this function before they are passed to any function. This step ensures that those contained fields that use dynamic memory are properly initialized. This function does not allocate memory.

DDS_DataWriterCacheStatus_finalize should be called to free the contained fields that use dynamic memory:

Returns
One of the Standard Return Codes
See Also
DDS_DataWriter_get_datawriter_cache_status
DDS_DataWriterCacheStatus_finalize
DDS_ReturnCode_t DDS_DataWriterCacheStatus_copy ( struct DDS_DataWriterCacheStatus self,
const struct DDS_DataWriterCacheStatus source 
)

Copy the contents of the given status into this status.

Status instances can use dynamic memory because of the sequences contained in some status. A shallow copy by assignment is therefore unsafe. This function performs a deep-copy, allocating memory if necessary.

Parameters
self<<in>> Cannot be NULL.
source<<in>>. Status to be copied from.
Returns
One of the Standard Return Codes
See Also
DDS_DataWriterCacheStatus_INITIALIZER
DDS_DataWriterCacheStatus_initialize
DDS_DataWriterCacheStatus_finalize
DDS_ReturnCode_t DDS_DataWriterCacheStatus_finalize ( struct DDS_DataWriterCacheStatus self)

Free any dynamic memory allocated by status instances.

some status may use dynamic memory (regardless of whether the status itself is in dynamic memory). This function frees that memory but otherwise leaves this status unchanged. It should be called on all instances before they are freed (or, in the case of stack-based instances, before they go out of scope).

Note that if this status instance is stored in heap memory, calling this function will not call free() on it; the user is responsible for explicitly freeing any heap-based status instance after calling this function.

Parameters
self<<in>> Cannot be NULL.
Returns
One of the Standard Return Codes
See Also
DDS_DataWriterCacheStatus_INITIALIZER
DDS_DataWriterCacheStatus_initialize
DDS_ReturnCode_t DDS_DataWriterProtocolStatus_initialize ( struct DDS_DataWriterProtocolStatus self)

Initializer for new status instances.

New DDS_DataWriterProtocolStatus instance on heap should be initialized with this function before they are passed to any function. This step ensures that those contained fields that use dynamic memory are properly initialized. This function does not allocate memory.

DDS_DataWriterProtocolStatus_finalize should be called to free the contained fields that use dynamic memory:

Returns
One of the Standard Return Codes
See Also
DDS_DataWriter_get_datawriter_protocol_status
DDS_DataWriterProtocolStatus_finalize
DDS_ReturnCode_t DDS_DataWriterProtocolStatus_copy ( struct DDS_DataWriterProtocolStatus self,
const struct DDS_DataWriterProtocolStatus source 
)

Copy the contents of the given status into this status.

Status instances can use dynamic memory because of the sequences contained in some status. A shallow copy by assignment is therefore unsafe. This function performs a deep-copy, allocating memory if necessary.

Parameters
self<<in>> Cannot be NULL.
source<<in>>. Status to be copied from.
Returns
One of the Standard Return Codes
See Also
DDS_DataWriterProtocolStatus_INITIALIZER
DDS_DataWriterProtocolStatus_initialize
DDS_DataWriterProtocolStatus_finalize
DDS_ReturnCode_t DDS_DataWriterProtocolStatus_finalize ( struct DDS_DataWriterProtocolStatus self)

Free any dynamic memory allocated by status instances.

some status may use dynamic memory (regardless of whether the status itself is in dynamic memory). This function frees that memory but otherwise leaves this status unchanged. It should be called on all instances before they are freed (or, in the case of stack-based instances, before they go out of scope).

Note that if this status instance is stored in heap memory, calling this function will not call free() on it; the user is responsible for explicitly freeing any heap-based status instance after calling this function.

Parameters
self<<in>> Cannot be NULL.
Returns
One of the Standard Return Codes
See Also
DDS_DataWriterProtocolStatus_INITIALIZER
DDS_DataWriterProtocolStatus_initialize
DDS_ReturnCode_t DDS_DataWriterQos_initialize ( struct DDS_DataWriterQos self)

Initializer for new QoS instances.

New DDS_DataWriterQos instances on heap should be initialized with this function before they are passed to any function. This step ensures that those contained QoS policies that use dynamic memory are properly initialized. This function does not allocate memory.

Calling this function is not a substitute for calling DDS_DataWriter_get_qos or DDS_Publisher_get_default_datawriter_qos; one of those should be called subsequently to setting the QoS of any new or existing entity. DDS_DataWriterQos_finalize should be called to free the contained QoS policies that use dynamic memory:

DDS_DataWriterQos *myQos = malloc(sizeof(struct DDS_DataWriterQos));
DDS_DataWriter_set_qos(myDataWriter, myQos);
free(myQos);
Parameters
self<<in>> Cannot be NULL.
Returns
One of the Standard Return Codes
See Also
DDS_Publisher_get_default_datawriter_qos
DDS_DataWriterQos_finalize
DDS_ReturnCode_t DDS_DataWriterQos_copy ( struct DDS_DataWriterQos self,
const struct DDS_DataWriterQos source 
)

Copy the contents of the given QoS into this QoS.

DDS_DataWriterQos instances can use dynamic memory because of the sequences contained in some QoS policies. A shallow copy by assignment is therefore unsafe. This function performs a deep-copy, allocating memory if necessary.

Parameters
self<<in>> Cannot be NULL.
source<<in>> The DDS_DataWriterQos to copy from.
Returns
One of the Standard Return Codes
See Also
DDS_DataWriterQos_INITIALIZER
DDS_DataWriterQos_initialize
DDS_DataWriterQos_finalize
DDS_ReturnCode_t DDS_DataWriterQos_finalize ( struct DDS_DataWriterQos self)

Free any dynamic memory allocated by the policies in this DDS_DataWriterQos.

Some QoS policies may use dynamic memory (regardless of whether the QoS itself is in dynamic memory). This function frees that memory but otherwise leaves this QoS unchanged. It should be called on all instances before they are freed (or, in the case of stack-based instances, before they go out of scope).

This function does not leave this object in an invalid state. It is permissable to clear a QoS and then subsequently allocate new dynamic memory in one or more of its QoS policies.

Note that if this QoS instance is stored in heap memory, calling this function will not call free() on it; the user is responsible for explicitly freeing any heap-based QoS instance after calling this function.

Parameters
self<<in>> Cannot be NULL.
Returns
One of the Standard Return Codes
See Also
DDS_DataWriterQos_INITIALIZER
DDS_DataWriterQos_initialize
DDS_Entity* DDS_DataWriter_as_entity ( DDS_DataWriter dataWriter)

Access a DDS_DataWriter's supertype instance.

Parameters
dataWriter<<in>> Cannot be NULL.
Returns
The DDS_Entity that is supertype instance of the datawriter.
DDS_ReturnCode_t DDS_DataWriter_assert_liveliness ( DDS_DataWriter self)

This operation manually asserts the liveliness of this DDS_DataWriter.

This is used in combination with the LIVELINESS policy to indicate to RTI Connext that the DDS_DataWriter remains active.

You only need to use this operation if the LIVELINESS setting is either DDS_MANUAL_BY_PARTICIPANT_LIVELINESS_QOS or DDS_MANUAL_BY_TOPIC_LIVELINESS_QOS. Otherwise, it has no effect.

Note: writing data via the FooDataWriter_write or FooDataWriter_write_w_timestamp operation asserts liveliness on the DDS_DataWriter itself, and its DDS_DomainParticipant. Consequently the use of assert_liveliness() is only needed if the application is not writing data regularly.

Parameters
self<<in>> Cannot be NULL.
Returns
One of the Standard Return Codes or DDS_RETCODE_NOT_ENABLED
See Also
DDS_LivelinessQosPolicy
DDS_ReturnCode_t DDS_DataWriter_get_matched_subscription_locators ( DDS_DataWriter self,
struct DDS_LocatorSeq locators 
)

<<eXtension>> Retrieve the list of locators for subscriptions currently "associated" with this DDS_DataWriter.

Matched subscription locators include locators for all those subscriptions in the same domain that have a matching DDS_Topic, compatible QoS and common partition that the DDS_DomainParticipant has not indicated should be "ignored" by means of the DDS_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 DDS_DataReader entities.

Parameters
self<<in>> Cannot be NULL.
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 function will fail with DDS_RETCODE_OUT_OF_RESOURCES. Cannot be NULL..

Returns
One of the Standard Return Codes, or DDS_RETCODE_OUT_OF_RESOURCES if the sequence is too small and the system can not resize it, or DDS_RETCODE_NOT_ENABLED
DDS_ReturnCode_t DDS_DataWriter_get_matched_subscriptions ( DDS_DataWriter self,
struct DDS_InstanceHandleSeq subscription_handles 
)

Retrieve the list of subscriptions currently "associated" with this DDS_DataWriter.

Matched subscriptions include all those in the same domain that have a matching DDS_Topic, compatible QoS and common partition that the DDS_DomainParticipant has not indicated should be "ignored" by means of the DDS_DomainParticipant_ignore_subscription operation.

The handles returned in the subscription_handles list are the ones that are used by the DDS implementation to locally identify the corresponding matched DDS_DataReader entities. These handles match the ones that appear in the DDS_SampleInfo::instance_handle field of the DDS_SampleInfo when reading the DDS_SUBSCRIPTION_TOPIC_NAME builtin topic.

Parameters
self<<in>> Cannot be NULL.
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 function will fail with DDS_RETCODE_OUT_OF_RESOURCES.

The maximum number of matches possible is configured with DDS_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..

Returns
One of the Standard Return Codes, or DDS_RETCODE_OUT_OF_RESOURCES if the sequence is too small and the system can not resize it, or DDS_RETCODE_NOT_ENABLED
DDS_ReturnCode_t DDS_DataWriter_get_matched_subscription_data ( DDS_DataWriter self,
struct DDS_SubscriptionBuiltinTopicData subscription_data,
const DDS_InstanceHandle_t subscription_handle 
)

This operation retrieves the information on a subscription that is currently "associated" with the DDS_DataWriter.

The subscription_handle must correspond to a subscription currently associated with the DDS_DataWriter. Otherwise, the operation will fail and fail with DDS_RETCODE_BAD_PARAMETER. Use DDS_DataWriter_get_matched_subscriptions to find the subscriptions that are currently matched with the DDS_DataWriter.

Note: This operation does not retrieve the following information in DDS_SubscriptionBuiltinTopicData:

The above information is available through DDS_DataReaderListener::on_data_available() (if a reader listener is installed on the DDS_SubscriptionBuiltinTopicDataDataReader).

Parameters
self<<in>> Cannot be NULL.
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 DDS_DataReader. Cannot be NULL.. Must correspond to a subscription currently associated with the DDS_DataWriter.
Returns
One of the Standard Return Codes, or DDS_RETCODE_NOT_ENABLED
DDS_ReturnCode_t DDS_DataWriter_get_matched_subscription_participant_data ( DDS_DataWriter self,
struct DDS_ParticipantBuiltinTopicData participant_data,
const DDS_InstanceHandle_t subscription_handle 
)

This operation retrieves the information on the discovered DDS_DomainParticipant associated with the subscription that is currently matching with the DDS_DataWriter.

The subscription_handle must correspond to a subscription currently associated with the DDS_DataWriter. Otherwise, the operation will fail with DDS_RETCODE_BAD_PARAMETER. The operation may also fail with DDS_RETCODE_PRECONDITION_NOT_MET if the subscription corresponds to the same DDS_DomainParticipant that the DataWriter belongs to. Use DDS_DataWriter_get_matched_subscriptions to find the subscriptions that are currently matched with the DDS_DataWriter.

Note: This operation does not retrieve the DDS_ParticipantBuiltinTopicData::property.

The above information is available through DDS_DataReaderListener::on_data_available() (if a reader listener is installed on the DDS_SubscriptionBuiltinTopicDataDataReader).

Parameters
self<<in>> Cannot be NULL.
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 DDS_DataReader. Cannot be NULL.. Must correspond to a subscription currently associated with the DDS_DataWriter.
Returns
One of the Standard Return Codes, or DDS_RETCODE_NOT_ENABLED
DDS_Topic* DDS_DataWriter_get_topic ( DDS_DataWriter self)

This operation returns the DDS_Topic associated with the DDS_DataWriter.

This is the same DDS_Topic that was used to create the DDS_DataWriter.

Parameters
self<<in>> Cannot be NULL.
Returns
DDS_Topic that was used to create the DDS_DataWriter.
DDS_Publisher* DDS_DataWriter_get_publisher ( DDS_DataWriter self)

This operation returns the DDS_Publisher to which the DDS_DataWriter belongs.

Parameters
self<<in>> Cannot be NULL.
Returns
DDS_Publisher to which the DDS_DataWriter belongs.
DDS_ReturnCode_t DDS_DataWriter_wait_for_acknowledgments ( DDS_DataWriter self,
const struct DDS_Duration_t max_wait 
)

Blocks the calling thread until all data written by reliable DDS_DataWriter entity is acknowledged, or until timeout expires.

This operation blocks the calling thread until either all data written by the reliable DDS_DataWriter entity is acknowledged by (a) all reliable DDS_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 DDS_DataWriter does not have DDS_ReliabilityQosPolicy kind set to RELIABLE, this operation will complete immediately with RETCODE_OK.

Parameters
self<<in>> Cannot be NULL.
max_wait<<in>> Specifies maximum time to wait for acknowledgements DDS_Duration_t .
Returns
One of the Standard Return Codes, DDS_RETCODE_NOT_ENABLED, DDS_RETCODE_TIMEOUT
DDS_ReturnCode_t DDS_DataWriter_wait_for_asynchronous_publishing ( DDS_DataWriter self,
const struct DDS_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 DDS_DataWriter is sent and acknowledged (if reliable) by all matched DDS_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 DDS_DataReader is complete in addition to what DDS_DataWriter_wait_for_acknowledgments provides.

If the DDS_DataWriter does not have DDS_PublishModeQosPolicy kind set to DDS_ASYNCHRONOUS_PUBLISH_MODE_QOS the operation will complete immediately with DDS_RETCODE_OK.

Parameters
self<<in>> Cannot be NULL.
max_wait<<in>> Specifies maximum time to wait for acknowledgements DDS_Duration_t .
Returns
One of the Standard Return Codes, DDS_RETCODE_NOT_ENABLED, DDS_RETCODE_TIMEOUT
DDS_ReturnCode_t DDS_DataWriter_get_liveliness_lost_status ( DDS_DataWriter self,
struct DDS_LivelinessLostStatus status 
)

Accesses the DDS_LIVELINESS_LOST_STATUS communication status.

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

Parameters
self<<in>> Cannot be NULL.
status<<inout>> DDS_LivelinessLostStatus to be filled in. Cannot be NULL.
Returns
One of the Standard Return Codes
DDS_ReturnCode_t DDS_DataWriter_get_offered_deadline_missed_status ( DDS_DataWriter self,
struct DDS_OfferedDeadlineMissedStatus status 
)

Accesses the DDS_OFFERED_DEADLINE_MISSED_STATUS communication status.

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

Parameters
self<<in>> Cannot be NULL.
status<<inout>> DDS_OfferedDeadlineMissedStatus to be filled in. Cannot be NULL.
Returns
One of the Standard Return Codes
DDS_ReturnCode_t DDS_DataWriter_get_offered_incompatible_qos_status ( DDS_DataWriter self,
struct DDS_OfferedIncompatibleQosStatus status 
)

Accesses the DDS_OFFERED_INCOMPATIBLE_QOS_STATUS communication status.

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

Parameters
self<<in>> Cannot be NULL.
status<<inout>> DDS_OfferedIncompatibleQosStatus to be filled in. Cannot be NULL.
Returns
One of the Standard Return Codes
DDS_ReturnCode_t DDS_DataWriter_get_publication_matched_status ( DDS_DataWriter self,
struct DDS_PublicationMatchedStatus status 
)

Accesses the DDS_PUBLICATION_MATCHED_STATUS communication status.

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

Parameters
self<<in>> Cannot be NULL.
status<<inout>> DDS_PublicationMatchedStatus to be filled in. Cannot be NULL.
Returns
One of the Standard Return Codes
DDS_ReturnCode_t DDS_DataWriter_get_reliable_writer_cache_changed_status ( DDS_DataWriter self,
struct DDS_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
self<<in>> Cannot be NULL.
status<<inout>> DDS_ReliableWriterCacheChangedStatus to be filled in. Cannot be NULL.
Returns
One of the Standard Return Codes
DDS_ReturnCode_t DDS_DataWriter_get_reliable_reader_activity_changed_status ( DDS_DataWriter self,
struct DDS_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
self<<in>> Cannot be NULL.
status<<inout>> DDS_ReliableReaderActivityChangedStatus to be filled in. Cannot be NULL.
Returns
One of the Standard Return Codes
DDS_ReturnCode_t DDS_DataWriter_get_datawriter_cache_status ( DDS_DataWriter self,
struct DDS_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
self<<in>> Cannot be NULL.
status<<inout>> DDS_DataWriterCacheStatus to be filled in. Cannot be NULL.
Returns
One of the Standard Return Codes or DDS_RETCODE_NOT_ENABLED.
DDS_ReturnCode_t DDS_DataWriter_get_datawriter_protocol_status ( DDS_DataWriter self,
struct DDS_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
self<<in>> Cannot be NULL.
status<<inout>> DDS_DataWriterProtocolStatus to be filled in. Cannot be NULL.
Returns
One of the Standard Return Codes or DDS_RETCODE_NOT_ENABLED.
DDS_ReturnCode_t DDS_DataWriter_get_matched_subscription_datawriter_protocol_status ( DDS_DataWriter self,
struct DDS_DataWriterProtocolStatus status,
const DDS_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
self<<in>> Cannot be NULL.
status<<inout>> DDS_DataWriterProtocolStatus to be filled in. Cannot be NULL.
subscription_handle<<in>> Handle to a specific subscription associated with the DDS_DataReader. Cannot be NULL.Must correspond to a subscription currently associated with the DDS_DataWriter.
Returns
One of the Standard Return Codes or DDS_RETCODE_NOT_ENABLED.
DDS_ReturnCode_t DDS_DataWriter_get_matched_subscription_datawriter_protocol_status_by_locator ( DDS_DataWriter self,
struct DDS_DataWriterProtocolStatus status,
const struct DDS_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
self<<in>> Cannot be NULL.
status<<inout>> DDS_DataWriterProtocolStatus to be filled in Cannot be NULL.
locator<<in>> Locator to a specific locator associated with the DDS_DataReader. Cannot be NULL.Must correspond to a locator of one or more subscriptions currently associated with the DDS_DataWriter.
Returns
One of the Standard Return Codes or DDS_RETCODE_NOT_ENABLED.
DDS_ReturnCode_t DDS_DataWriter_set_qos ( DDS_DataWriter self,
const struct DDS_DataWriterQos qos 
)

Sets the writer QoS.

This operation modifies the QoS of the DDS_DataWriter.

The DDS_DataWriterQos::user_data, DDS_DataWriterQos::deadline, DDS_DataWriterQos::latency_budget, DDS_DataWriterQos::ownership_strength, DDS_DataWriterQos::transport_priority, DDS_DataWriterQos::lifespan and DDS_DataWriterQos::writer_data_lifecycle can be changed. The other policies are immutable.

Parameters
self<<in>> Cannot be NULL.
qos<<in>> The DDS_DataWriterQos to be set to. Policies must be consistent. Immutable policies cannot be changed after DDS_DataWriter is enabled. The special value DDS_DATAWRITER_QOS_DEFAULT can be used to indicate that the QoS of the DDS_DataWriter should be changed to match the current default DDS_DataWriterQos set in the DDS_Publisher. Cannot be NULL.
Returns
One of the Standard Return Codes, DDS_RETCODE_IMMUTABLE_POLICY or DDS_RETCODE_INCONSISTENT_POLICY
See Also
DDS_DataWriterQos for rules on consistency among QoS
set_qos (abstract)
Operations Allowed in Listener Callbacks
DDS_ReturnCode_t DDS_DataWriter_set_qos_with_profile ( DDS_DataWriter self,
const char *  library_name,
const char *  profile_name 
)

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

This operation modifies the QoS of the DDS_DataWriter.

The DDS_DataWriterQos::user_data, DDS_DataWriterQos::deadline, DDS_DataWriterQos::latency_budget, DDS_DataWriterQos::ownership_strength, DDS_DataWriterQos::transport_priority, DDS_DataWriterQos::lifespan and DDS_DataWriterQos::writer_data_lifecycle can be changed. The other policies are immutable.

Parameters
self<<in>> Cannot be NULL.
library_name<<in>> Library name containing the XML QoS profile. If library_name is null RTI Connext will use the default library (see DDS_Publisher_set_default_library).
profile_name<<in>> XML QoS Profile name. If profile_name is null RTI Connext will use the default profile (see DDS_Publisher_set_default_profile).
Returns
One of the Standard Return Codes, DDS_RETCODE_IMMUTABLE_POLICY or DDS_RETCODE_INCONSISTENT_POLICY
See Also
DDS_DataWriterQos for rules on consistency among QoS
Operations Allowed in Listener Callbacks
DDS_ReturnCode_t DDS_DataWriter_get_qos ( DDS_DataWriter self,
struct DDS_DataWriterQos qos 
)

Gets the writer QoS.

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

Parameters
self<<in>> Cannot be NULL.
qos<<inout>> The DDS_DataWriterQos to be filled up. Cannot be NULL.
Returns
One of the Standard Return Codes
See Also
get_qos (abstract)
DDS_ReturnCode_t DDS_DataWriter_set_listener ( DDS_DataWriter self,
const struct DDS_DataWriterListener l,
DDS_StatusMask  mask 
)

Sets the writer listener.

Parameters
self<<in>> Cannot be NULL.
l<<in>> DDS_DataWriterListener to set to
mask<<in>> DDS_StatusMask associated with the DDS_DataWriterListener. The callback function on the listener cannot be NULL if the corresponding status is turned on in the mask.
Returns
One of the Standard Return Codes
See Also
set_listener (abstract)
struct DDS_DataWriterListener DDS_DataWriter_get_listener ( DDS_DataWriter self)
read

Get the writer listener.

Parameters
self<<in>> Cannot be NULL.
Returns
DDS_DataWriterListener of the DDS_DataWriter.
See Also
DDS_DataWriter_get_listenerX
get_listener (abstract)
DDS_ReturnCode_t DDS_DataWriter_get_listenerX ( DDS_DataWriter self,
struct DDS_DataWriterListener listener 
)

<<eXtension>> Get the writer listener.

An alternative form of get_listener that fills in an existing listener structure rather than returning one on the stack.

Parameters
self<<in>> Cannot be NULL.
listener<<inout>> DDS_DataWriterListener structure to be filled up. Cannot be NULL.
Returns
One of the Standard Return Codes
See Also
DDS_DataWriter_get_listener
get_listener (abstract)
DDS_ReturnCode_t DDS_DataWriter_flush ( DDS_DataWriter self)

<<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 DDS_DataWriter does not have DDS_PublishModeQosPolicy kind set to DDS_ASYNCHRONOUS_PUBLISH_MODE_QOS, the batch will be sent on the network immediately (in the context of the calling thread).

If the DDS_DataWriter does have DDS_PublishModeQosPolicy kind set to DDS_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 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 DDS_BatchQosPolicy::thread_safe_write is TRUE.
Parameters
self<<in>> Cannot be NULL.
Returns
One of the Standard Return Codes, DDS_RETCODE_TIMEOUT, DDS_RETCODE_OUT_OF_RESOURCES or DDS_RETCODE_NOT_ENABLED.

RTI Connext C API Version 5.1.0 Copyright © Mon Feb 3 2014 Real-Time Innovations, Inc