RTI Connext Traditional C++ API  Version 5.3.1
 All Classes Functions Variables Typedefs Enumerations Enumerator Groups Pages
DDSDataWriter Class Reference

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

Inheritance diagram for DDSDataWriter:
DDSDomainEntity DDSEntity DDSDynamicDataWriter DDSDynamicDataWriter DDSKeyedOctetsDataWriter DDSKeyedStringDataWriter DDSOctetsDataWriter DDSStringDataWriter FooDataWriter

Public Member Functions

virtual DDS_ReturnCode_t get_liveliness_lost_status (DDS_LivelinessLostStatus &status)
 Accesses the DDS_LIVELINESS_LOST_STATUS communication status.
 
virtual DDS_ReturnCode_t get_offered_deadline_missed_status (DDS_OfferedDeadlineMissedStatus &status)
 Accesses the DDS_OFFERED_DEADLINE_MISSED_STATUS communication status.
 
virtual DDS_ReturnCode_t get_offered_incompatible_qos_status (DDS_OfferedIncompatibleQosStatus &status)
 Accesses the DDS_OFFERED_INCOMPATIBLE_QOS_STATUS communication status.
 
virtual DDS_ReturnCode_t get_publication_matched_status (DDS_PublicationMatchedStatus &status)
 Accesses the DDS_PUBLICATION_MATCHED_STATUS communication status.
 
virtual DDS_ReturnCode_t get_reliable_writer_cache_changed_status (DDS_ReliableWriterCacheChangedStatus &status)
 <<extension>> Get the reliable cache status for this writer.
 
virtual DDS_ReturnCode_t get_reliable_reader_activity_changed_status (DDS_ReliableReaderActivityChangedStatus &status)
 <<extension>> Get the reliable reader activity changed status for this writer.
 
virtual DDS_ReturnCode_t get_datawriter_cache_status (DDS_DataWriterCacheStatus &status)
 <<extension>> Get the datawriter cache status for this writer.
 
virtual DDS_ReturnCode_t get_datawriter_protocol_status (DDS_DataWriterProtocolStatus &status)
 <<extension>> Get the datawriter protocol status for this writer.
 
virtual DDS_ReturnCode_t get_matched_subscription_datawriter_protocol_status (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.
 
virtual DDS_ReturnCode_t get_service_request_accepted_status (DDS_ServiceRequestAcceptedStatus &status)
 Accesses the DDS_SERVICE_REQUEST_ACCEPTED_STATUS communication status.
 
virtual DDS_ReturnCode_t get_matched_subscription_datawriter_protocol_status_by_locator (DDS_DataWriterProtocolStatus &status, const DDS_Locator_t &locator)
 <<extension>> Get the datawriter protocol status for this writer, per matched subscription identified by the locator.
 
virtual DDS_ReturnCode_t assert_liveliness ()
 This operation manually asserts the liveliness of this DDSDataWriter.
 
virtual DDS_ReturnCode_t get_matched_subscription_locators (DDS_LocatorSeq &locators)
 <<extension>> Retrieve the list of locators for subscriptions currently "associated" with this DDSDataWriter.
 
virtual DDS_ReturnCode_t get_matched_subscriptions (DDS_InstanceHandleSeq &subscription_handles)
 Retrieve the list of subscriptions currently "associated" with this DDSDataWriter.
 
virtual DDS_ReturnCode_t get_matched_subscription_data (DDS_SubscriptionBuiltinTopicData &subscription_data, const DDS_InstanceHandle_t &subscription_handle)
 This operation retrieves the information on a subscription that is currently "associated" with the DDSDataWriter.
 
virtual DDS_ReturnCode_t get_matched_subscription_participant_data (DDS_ParticipantBuiltinTopicData &participant_data, const DDS_InstanceHandle_t &subscription_handle)
 This operation retrieves the information on the discovered DDSDomainParticipant associated with the subscription that is currently matching with the DDSDataWriter.
 
virtual DDSTopicget_topic ()
 This operation returns the DDSTopic associated with the DDSDataWriter.
 
virtual DDSPublisherget_publisher ()
 This operation returns the DDSPublisher to which the DDSDataWriter belongs.
 
virtual DDS_ReturnCode_t wait_for_acknowledgments (const DDS_Duration_t &max_wait)
 Blocks the calling thread until all data written by reliable DDSDataWriter entity is acknowledged, or until timeout expires.
 
virtual DDS_ReturnCode_t is_sample_app_acknowledged (DDS_Boolean &is_app_ack, const struct DDS_SampleIdentity_t &identity)
 This method can be used to see if a sample has been application acknowledged.
 
virtual DDS_ReturnCode_t wait_for_asynchronous_publishing (const DDS_Duration_t &max_wait)
 <<extension>> Blocks the calling thread until asynchronous sending is complete.
 
virtual DDS_ReturnCode_t set_qos (const DDS_DataWriterQos &qos)
 Sets the writer QoS.
 
virtual DDS_ReturnCode_t set_qos_with_profile (const char *library_name, const char *profile_name)
 <<extension>> Change the QoS of this writer using the input XML QoS profile.
 
virtual DDS_ReturnCode_t get_qos (DDS_DataWriterQos &qos)
 Gets the writer QoS.
 
virtual DDS_ReturnCode_t set_listener (DDSDataWriterListener *l, DDS_StatusMask mask=DDS_STATUS_MASK_ALL)
 Sets the writer listener.
 
virtual DDSDataWriterListenerget_listener ()
 Get the writer listener.
 
virtual DDS_ReturnCode_t flush ()
 <<extension>> Flushes the batch in progress in the context of the calling thread.
 
virtual DDS_ReturnCode_t enable ()
 Enables the DDSEntity.
 
virtual DDSStatusConditionget_statuscondition ()
 Allows access to the DDSStatusCondition associated with the DDSEntity.
 
virtual DDS_StatusMask get_status_changes ()
 Retrieves the list of communication statuses in the DDSEntity that are triggered.
 
virtual DDS_InstanceHandle_t get_instance_handle ()
 Allows access to the DDS_InstanceHandle_t associated with the DDSEntity.
 

Detailed Description

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

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.
Listener:
DDSDataWriterListener

A DDSDataWriter is attached to exactly one DDSPublisher, that acts as a factory for it.

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

DDSDataWriter 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 DDSDataWriter.

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

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

See Also
FooDataWriter
Operations Allowed in Listener Callbacks
Examples:
HelloWorld_publisher.cxx, and HelloWorldSupport.cxx.

Member Function Documentation

virtual DDS_ReturnCode_t DDSDataWriter::get_liveliness_lost_status ( DDS_LivelinessLostStatus status)
inlinevirtual

Accesses the DDS_LIVELINESS_LOST_STATUS communication status.

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

Parameters
status<<inout>> DDS_LivelinessLostStatus to be filled in.
Returns
One of the Standard Return Codes
virtual DDS_ReturnCode_t DDSDataWriter::get_offered_deadline_missed_status ( DDS_OfferedDeadlineMissedStatus status)
inlinevirtual

Accesses the DDS_OFFERED_DEADLINE_MISSED_STATUS communication status.

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

Parameters
status<<inout>> DDS_OfferedDeadlineMissedStatus to be filled in.
Returns
One of the Standard Return Codes
virtual DDS_ReturnCode_t DDSDataWriter::get_offered_incompatible_qos_status ( DDS_OfferedIncompatibleQosStatus status)
inlinevirtual

Accesses the DDS_OFFERED_INCOMPATIBLE_QOS_STATUS communication status.

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

Parameters
status<<inout>> DDS_OfferedIncompatibleQosStatus to be filled in.
Returns
One of the Standard Return Codes
virtual DDS_ReturnCode_t DDSDataWriter::get_publication_matched_status ( DDS_PublicationMatchedStatus status)
inlinevirtual

Accesses the DDS_PUBLICATION_MATCHED_STATUS communication status.

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

Parameters
status<<inout>> DDS_PublicationMatchedStatus to be filled in.
Returns
One of the Standard Return Codes
virtual DDS_ReturnCode_t DDSDataWriter::get_reliable_writer_cache_changed_status ( DDS_ReliableWriterCacheChangedStatus status)
inlinevirtual

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

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

Parameters
status<<inout>> DDS_ReliableWriterCacheChangedStatus to be filled in.
Returns
One of the Standard Return Codes
virtual DDS_ReturnCode_t DDSDataWriter::get_reliable_reader_activity_changed_status ( DDS_ReliableReaderActivityChangedStatus status)
inlinevirtual

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

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

Parameters
status<<inout>> DDS_ReliableReaderActivityChangedStatus to be filled in.
Returns
One of the Standard Return Codes
virtual DDS_ReturnCode_t DDSDataWriter::get_datawriter_cache_status ( DDS_DataWriterCacheStatus status)
inlinevirtual

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

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

Parameters
status<<inout>> DDS_DataWriterCacheStatus to be filled in.
Returns
One of the Standard Return Codes or DDS_RETCODE_NOT_ENABLED.
virtual DDS_ReturnCode_t DDSDataWriter::get_datawriter_protocol_status ( DDS_DataWriterProtocolStatus status)
inlinevirtual

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

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

Parameters
status<<inout>> DDS_DataWriterProtocolStatus to be filled in.
Returns
One of the Standard Return Codes or DDS_RETCODE_NOT_ENABLED.
virtual DDS_ReturnCode_t DDSDataWriter::get_matched_subscription_datawriter_protocol_status ( DDS_DataWriterProtocolStatus status,
const DDS_InstanceHandle_t subscription_handle 
)
inlinevirtual

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

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

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

Parameters
status<<inout>> DDS_DataWriterProtocolStatus to be filled in.
subscription_handle<<in>> Handle to a specific subscription associated with the DDSDataReader. Must correspond to a subscription currently associated with the DDSDataWriter.
Returns
One of the Standard Return Codes or DDS_RETCODE_NOT_ENABLED.
virtual DDS_ReturnCode_t DDSDataWriter::get_service_request_accepted_status ( DDS_ServiceRequestAcceptedStatus status)
inlinevirtual

Accesses the DDS_SERVICE_REQUEST_ACCEPTED_STATUS communication status.

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

Parameters
status<<inout>> DDS_ServiceRequestAcceptedStatus to be filled in.
Returns
One of the Standard Return Codes
virtual DDS_ReturnCode_t DDSDataWriter::get_matched_subscription_datawriter_protocol_status_by_locator ( DDS_DataWriterProtocolStatus status,
const DDS_Locator_t locator 
)
inlinevirtual

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

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

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

Parameters
status<<inout>> DDS_DataWriterProtocolStatus to be filled in
locator<<in>> Locator to a specific locator associated with the DDSDataReader. Must correspond to a locator of one or more subscriptions currently associated with the DDSDataWriter.
Returns
One of the Standard Return Codes or DDS_RETCODE_NOT_ENABLED.
virtual DDS_ReturnCode_t DDSDataWriter::assert_liveliness ( )
inlinevirtual

This operation manually asserts the liveliness of this DDSDataWriter.

This is used in combination with the LIVELINESS policy to indicate to RTI Connext that the DDSDataWriter 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 DDSDataWriter itself, and its DDSDomainParticipant. Consequently the use of assert_liveliness() is only needed if the application is not writing data regularly.

Returns
One of the Standard Return Codes or DDS_RETCODE_NOT_ENABLED
See Also
DDS_LivelinessQosPolicy
virtual DDS_ReturnCode_t DDSDataWriter::get_matched_subscription_locators ( DDS_LocatorSeq locators)
inlinevirtual

<<extension>> Retrieve the list of locators for subscriptions currently "associated" with this DDSDataWriter.

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

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

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

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
virtual DDS_ReturnCode_t DDSDataWriter::get_matched_subscriptions ( DDS_InstanceHandleSeq subscription_handles)
inlinevirtual

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

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

The handles returned in the subscription_handles list are the ones that RTI Connext uses to locally identify the corresponding matched DDSDataReader 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
subscription_handles<<inout>>. Handles of all the matched subscriptions.

The sequence will be grown if the sequence has ownership and the system has the corresponding resources. Use a sequence without ownership to avoid dynamic memory allocation. If the sequence is too small to store all the matches and the system can not resize the sequence, this method will fail with 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. .

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
virtual DDS_ReturnCode_t DDSDataWriter::get_matched_subscription_data ( DDS_SubscriptionBuiltinTopicData subscription_data,
const DDS_InstanceHandle_t subscription_handle 
)
inlinevirtual

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

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

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

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

Parameters
subscription_data<<inout>>. The information to be filled in on the associated subscription. Cannot be NULL.
subscription_handle<<in>>. Handle to a specific subscription associated with the DDSDataReader. . Must correspond to a subscription currently associated with the DDSDataWriter.
Returns
One of the Standard Return Codes, or DDS_RETCODE_NOT_ENABLED
virtual DDS_ReturnCode_t DDSDataWriter::get_matched_subscription_participant_data ( DDS_ParticipantBuiltinTopicData participant_data,
const DDS_InstanceHandle_t subscription_handle 
)
inlinevirtual

This operation retrieves the information on the discovered DDSDomainParticipant associated with the subscription that is currently matching with the DDSDataWriter.

The subscription_handle must correspond to a subscription currently associated with the DDSDataWriter. 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 DDSDomainParticipant that the DataWriter belongs to. Use DDSDataWriter::get_matched_subscriptions to find the subscriptions that are currently matched with the DDSDataWriter.

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

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

Parameters
participant_data<<inout>>. The information to be filled in on the associated participant Cannot be NULL.
subscription_handle<<in>>. Handle to a specific subscription associated with the DDSDataReader. . Must correspond to a subscription currently associated with the DDSDataWriter.
Returns
One of the Standard Return Codes, or DDS_RETCODE_NOT_ENABLED
virtual DDSTopic* DDSDataWriter::get_topic ( )
inlinevirtual

This operation returns the DDSTopic associated with the DDSDataWriter.

This is the same DDSTopic that was used to create the DDSDataWriter.

Returns
DDSTopic that was used to create the DDSDataWriter.
virtual DDSPublisher* DDSDataWriter::get_publisher ( )
inlinevirtual

This operation returns the DDSPublisher to which the DDSDataWriter belongs.

Returns
DDSPublisher to which the DDSDataWriter belongs.
virtual DDS_ReturnCode_t DDSDataWriter::wait_for_acknowledgments ( const DDS_Duration_t max_wait)
inlinevirtual

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

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

Parameters
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
virtual DDS_ReturnCode_t DDSDataWriter::is_sample_app_acknowledged ( DDS_Boolean is_app_ack,
const struct DDS_SampleIdentity_t identity 
)
inlinevirtual

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

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

If a DataReader does not enable application acknowledgment (by setting DDS_ReliabilityQosPolicy::acknowledgment_kind to a value other than DDS_PROTOCOL_ACKNOWLEDGMENT_MODE), the sample is considered application acknowledged for that DataReader.

Parameters
is_app_ack<<out>> This value will be set to DDS_BOOLEAN_TRUE when the sample has been acknowledged.
identity<<in>> Sample identity.
Returns
One of the Standard Return Codes
virtual DDS_ReturnCode_t DDSDataWriter::wait_for_asynchronous_publishing ( const DDS_Duration_t max_wait)
inlinevirtual

<<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 DDSDataWriter is sent and acknowledged (if reliable) by all matched DDSDataReader 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 DDSDataReader is complete in addition to what DDSDataWriter::wait_for_acknowledgments provides.

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

Parameters
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
virtual DDS_ReturnCode_t DDSDataWriter::set_qos ( const DDS_DataWriterQos qos)
inlinevirtual

Sets the writer QoS.

This operation modifies the QoS of the DDSDataWriter.

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
qos<<in>> The DDS_DataWriterQos to be set to. Policies must be consistent. Immutable policies cannot be changed after DDSDataWriter is enabled. The special value DDS_DATAWRITER_QOS_DEFAULT can be used to indicate that the QoS of the DDSDataWriter should be changed to match the current default DDS_DataWriterQos set in the DDSPublisher.
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
virtual DDS_ReturnCode_t DDSDataWriter::set_qos_with_profile ( const char *  library_name,
const char *  profile_name 
)
inlinevirtual

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

This operation modifies the QoS of the DDSDataWriter.

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
library_name<<in>> Library name containing the XML QoS profile. If library_name is null RTI Connext will use the default library (see DDSPublisher::set_default_library).
profile_name<<in>> XML QoS Profile name. If profile_name is null RTI Connext will use the default profile (see DDSPublisher::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
virtual DDS_ReturnCode_t DDSDataWriter::get_qos ( DDS_DataWriterQos qos)
inlinevirtual

Gets the writer QoS.

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

Parameters
qos<<inout>> The DDS_DataWriterQos to be filled up.
Returns
One of the Standard Return Codes
See Also
get_qos (abstract)
virtual DDS_ReturnCode_t DDSDataWriter::set_listener ( DDSDataWriterListener l,
DDS_StatusMask  mask = DDS_STATUS_MASK_ALL 
)
inlinevirtual

Sets the writer listener.

Parameters
l<<in>> DDSDataWriterListener to set to
mask<<in>> DDS_StatusMask associated with the DDSDataWriterListener.
Returns
One of the Standard Return Codes
See Also
set_listener (abstract)
virtual DDSDataWriterListener* DDSDataWriter::get_listener ( )
inlinevirtual

Get the writer listener.

Returns
DDSDataWriterListener of the DDSDataWriter.
See Also
get_listener (abstract)
virtual DDS_ReturnCode_t DDSDataWriter::flush ( )
inlinevirtual

<<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 DDSDataWriter 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 DDSDataWriter 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.
Returns
One of the Standard Return Codes, DDS_RETCODE_TIMEOUT, DDS_RETCODE_OUT_OF_RESOURCES or DDS_RETCODE_NOT_ENABLED.
virtual DDS_ReturnCode_t DDSDataWriter::enable ( )
inlinevirtual

Enables the DDSEntity.

This operation enables the Entity. Entity objects can be created either enabled or disabled. This is controlled by the value of the ENTITY_FACTORY QoS policy on the corresponding factory for the DDSEntity.

By default, ENTITY_FACTORY is set so that it is not necessary to explicitly call DDSEntity::enable on newly created entities.

The DDSEntity::enable operation is idempotent. Calling enable on an already enabled Entity returns OK and has no effect.

If a DDSEntity has not yet been enabled, the following kinds of operations may be invoked on it:

Other operations may explicitly state that they may be called on disabled entities; those that do not will return the error DDS_RETCODE_NOT_ENABLED.

It is legal to delete an DDSEntity that has not been enabled by calling the proper operation on its factory.

Entities created from a factory Entity that is disabled are created disabled, regardless of the setting of the DDS_EntityFactoryQosPolicy.

Calling enable on an Entity whose factory Entity is not enabled will fail and return DDS_RETCODE_PRECONDITION_NOT_MET.

If DDS_EntityFactoryQosPolicy::autoenable_created_entities is TRUE, the enable operation on a factory will automatically enable all entities created from that factory (for example, enabling a DDSPublisher will enable all its contained DDSDataWriter objects)

Listeners associated with an entity are not called until the entity is enabled.

Conditions associated with a disabled entity are "inactive," that is, they have a trigger_value == FALSE.

Returns
One of the Standard Return Codes, Standard Return Codes or DDS_RETCODE_PRECONDITION_NOT_MET.

Implements DDSEntity.

virtual DDSStatusCondition* DDSDataWriter::get_statuscondition ( )
inlinevirtual

Allows access to the DDSStatusCondition associated with the DDSEntity.

The returned condition can then be added to a DDSWaitSet so that the application can wait for specific status changes that affect the DDSEntity.

Returns
the status condition associated with this entity.

Implements DDSEntity.

virtual DDS_StatusMask DDSDataWriter::get_status_changes ( )
inlinevirtual

Retrieves the list of communication statuses in the DDSEntity that are triggered.

That is, the list of statuses whose value has changed since the last time the application read the status using the get_*_status() method.

When the entity is first created or if the entity is not enabled, all communication statuses are in the "untriggered" state so the list returned by the get_status_changes operation will be empty.

The list of statuses returned by the get_status_changes operation refers to the status that are triggered on the Entity itself and does not include statuses that apply to contained entities.

Returns
list of communication statuses in the DDSEntity that are triggered.
See Also
Status Kinds

Implements DDSEntity.

virtual DDS_InstanceHandle_t DDSDataWriter::get_instance_handle ( )
inlinevirtual

Allows access to the DDS_InstanceHandle_t associated with the DDSEntity.

This operation returns the DDS_InstanceHandle_t that represents the DDSEntity.

Returns
the instance handle associated with this entity.

Implements DDSEntity.


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