RTI Connext DDS Micro C++ API  2.4.14.2
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
DDSDataWriter Class Reference

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

Inheritance diagram for DDSDataWriter:
DDSEntity

List of all members.

Public Member Functions

virtual DDS_ReturnCode_t write_untyped (const void *instance_data, const DDS_InstanceHandle_t &handle)=0
 <<cert>> Modifies the value of a data instance.
virtual DDS_ReturnCode_t assert_liveliness ()=0
 <<cert>> This operation manually asserts the liveliness of this DDSDataWriter.
virtual DDSTopicget_topic ()=0
 <<cert>> This operation returns the DDSTopic associated with the DDSDataWriter.
virtual DDSPublisherget_publisher ()=0
 <<cert>> This operation returns the DDSPublisher to which the DDSDataWriter belongs.
virtual DDS_ReturnCode_t get_qos (DDS_DataWriterQos &qos)=0
 Gets the writer QoS.
virtual DDS_ReturnCode_t set_qos (const DDS_DataWriterQos &qos)=0
 Sets the writer QoS.
virtual DDS_ReturnCode_t set_listener (const DDSDataWriterListener *listener, DDS_StatusMask mask)=0
 Sets the writer listener.
virtual DDSDataWriterListenerget_listener ()=0
 Get the writer listener.
virtual DDS_InstanceHandle_t register_instance_untyped (const void *instance_data)=0
 <<cert>> Informs RTI Connext Micro that the application will be modifying a particular instance.
virtual DDS_InstanceHandle_t register_instance_w_timestamp_untyped (const void *instance_data, const DDS_Time_t &source_timestamp)=0
 <<cert>> Performs the same function as DDSDataWriter::register_instance_untyped except that it also provides the value for the source_timestamp.
virtual DDS_ReturnCode_t unregister_instance_untyped (const void *instance_data, const DDS_InstanceHandle_t &handle)=0
 <<cert>> Reverses the action of DDSDataWriter::register_instance_untyped.
virtual DDS_ReturnCode_t unregister_instance_w_timestamp_untyped (const void *instance_data, const DDS_InstanceHandle_t &handle, const DDS_Time_t &source_timestamp)=0
 <<cert>> Performs the same function as DDSDataWriter::unregister_instance_untyped except that it also provides the value for the source_timestamp.
virtual DDS_ReturnCode_t dispose_untyped (const void *instance_data, const DDS_InstanceHandle_t &handle)=0
 <<cert>> Requests the middleware to delete the data.
virtual DDS_ReturnCode_t dispose_w_timestamp_untyped (const void *instance_data, const DDS_InstanceHandle_t &handle, const DDS_Time_t &source_timestamp)=0
 <<cert>> Performs the same function as DDSDataWriter::dispose_untyped except that it also provides the value for the source_timestamp.
virtual DDS_ReturnCode_t write_w_timestamp_untyped (const void *instance_data, const DDS_InstanceHandle_t &handle, const DDS_Time_t &source_timestamp)=0
 <<cert>> Performs the same function as DDSDataWriter::write_untyped except that it also provides the value for the source_timestamp.
virtual DDS_ReturnCode_t get_publication_matched_status (DDS_PublicationMatchedStatus &status)=0
 <<cert>> Accesses the DDS_PUBLICATION_MATCHED_STATUS communication status.
virtual DDS_ReturnCode_t get_liveliness_lost_status (DDS_LivelinessLostStatus &status)=0
 <<cert>> Accesses the DDS_LIVELINESS_LOST_STATUS communication status.
virtual DDS_ReturnCode_t get_offered_deadline_missed_status (DDS_OfferedDeadlineMissedStatus &status)=0
 <<cert>> Accesses the DDS_OFFERED_DEADLINE_MISSED_STATUS communication status.
virtual DDS_ReturnCode_t get_offered_incompatible_qos_status (DDS_OfferedIncompatibleQosStatus &status)=0
 <<cert>> Accesses the DDS_OFFERED_INCOMPATIBLE_QOS_STATUS communication status.
- Public Member Functions inherited from DDSEntity
DDS_ReturnCode_t enable ()
 <<cert>> Enables the DDSEntity.
DDSStatusConditionget_statuscondition ()
 <<cert>> Return the DDSStatusCondition associated with a particular DDSEntity.
DDS_StatusMask get_status_changes ()
 <<cert>> Retrieves the list of communication statuses in the DDSEntity that are triggered.
DDS_InstanceHandle_t get_instance_handle ()
 <<cert>> Allows access to the DDS_InstanceHandle_t associated with the DDSEntity.

Detailed Description

<<interface>> <<cert>> 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;
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. 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.


Member Function Documentation

virtual DDS_ReturnCode_t DDSDataWriter::write_untyped ( const void *  instance_data,
const DDS_InstanceHandle_t handle 
)
pure virtual

<<cert>> Modifies the value of a data instance.

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

As a side effect, this operation asserts liveliness on the DDSDataWriter itself, the DDSPublisher and the DDSDomainParticipant.

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 Micro 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 Micro will treat as if the write() operation is for the instance as indicated by the handle.

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

Parameters:
instance_data<<in>> The data to write.
handle<<in>> Either the handle returned by a previous call to DDSDataWriter::register_instance_untyped, or else the special value DDS_HANDLE_NIL. If the data has a key and handle is not DDS_HANDLE_NIL, handle must represent a registered instance of the data. Otherwise, this method may 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.
MT Safety:
This operation is thread safe. However, note that the arguments are not protected from being modified by other threads and must not be modified until the call returns.
See also:
DDSDataReader
DDSDataWriter::write_w_timestamp_untyped
virtual DDS_ReturnCode_t DDSDataWriter::assert_liveliness ( )
pure virtual

<<cert>> This operation manually asserts the liveliness of this DDSDataWriter.

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

You only need to use this operation if the LIVELINESS setting is 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
MT Safety:
This operation is thread safe. However, note that the arguments are not protected from being modified by other threads and must not be modified until the call returns.
See also:
DDS_LivelinessQosPolicy
virtual DDSTopic* DDSDataWriter::get_topic ( )
pure virtual

<<cert>> 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.
MT Safety:
This operation is thread safe. However, note that the arguments are not protected from being modified by other threads and must not be modified until the call returns.
virtual DDSPublisher* DDSDataWriter::get_publisher ( )
pure virtual

<<cert>> This operation returns the DDSPublisher to which the DDSDataWriter belongs.

Returns:
DDSPublisher to which the DDSDataWriter belongs.
MT Safety:
This operation is thread safe. However, note that the arguments are not protected from being modified by other threads and must not be modified until the call returns.
virtual DDS_ReturnCode_t DDSDataWriter::get_qos ( DDS_DataWriterQos qos)
pure virtual

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_qos ( const DDS_DataWriterQos qos)
pure virtual

Sets the writer QoS.

This operation modifies the QoS of the DDSDataWriter.

The DDS_DataWriterQos::deadline and DDS_DataWriterQos::ownership_strength, can be changed. The other policies are immutable.

Parameters:
qos<<in>> The DDS_DataWriterQos to be set to. Policies must be consistent. 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)
virtual DDS_ReturnCode_t DDSDataWriter::set_listener ( const DDSDataWriterListener listener,
DDS_StatusMask  mask 
)
pure virtual

Sets the writer listener.

Parameters:
listener<<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 ( )
pure virtual

Get the writer listener.

Returns:
DDSDataWriterListener of the DDSDataWriter.
virtual DDS_InstanceHandle_t DDSDataWriter::register_instance_untyped ( const void *  instance_data)
pure virtual

<<cert>> Informs RTI Connext Micro 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 Micro 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 Micro will auto-register the instance.

For best performance, the operation should be invoked prior to calling any operation that modifies the instance, such as DDSDataWriter::write_untyped, DDSDataWriter::write_w_timestamp_untyped, DDSDataWriter::dispose_untyped and the handle used in conjunction with the data for those calls.

When this operation is used, RTI Connext Micro 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 DDSDataWriter has been enabled. Otherwise, DDS_HANDLE_NIL will be returned.

Parameters:
instance_data<<in>> The instance that should be registered. Of this instance, only the fields that represent the key are examined by the function. .
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.
MT Safety:
This operation is thread safe. However, note that the arguments are not protected from being modified by other threads and must not be modified until the call returns.
See also:
DDSDataWriter::unregister_instance_untyped
virtual DDS_InstanceHandle_t DDSDataWriter::register_instance_w_timestamp_untyped ( const void *  instance_data,
const DDS_Time_t source_timestamp 
)
pure virtual

<<cert>> Performs the same function as DDSDataWriter::register_instance_untyped except that it also provides the value for the source_timestamp.

Explicitly provides the timestamp that will be available to the DDSDataReader objects by means of the source_timestamp attribute inside the DDS_SampleInfo. (Refer to DDS_SampleInfo for details)

The constraints on the values of the parameters and the corresponding error behavior are the same specified for the DDSDataWriter::register_instance_untyped operation.

Parameters:
instance_data<<in>> The instance that should be registered. Of this instance, only the fields that represent the key are examined by the function. .
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 DDSDataReader objects by means of the source_timestamp attribute inside the DDS_SampleInfo.
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.
MT Safety:
This operation is thread safe. However, note that the arguments are not protected from being modified by other threads and must not be modified until the call returns.
See also:
DDSDataWriter::unregister_instance_untyped
virtual DDS_ReturnCode_t DDSDataWriter::unregister_instance_untyped ( const void *  instance_data,
const DDS_InstanceHandle_t handle 
)
pure virtual

<<cert>> Reverses the action of DDSDataWriter::register_instance_untyped.

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 DDSDataWriter::register_instance_untyped. 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 Micro will automatically supply the value of the source_timestamp that is used.

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

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 Micro 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 Micro will treat as if the unregister_instance() operation is for the instance as indicated by the handle.

If after a DDSDataWriter::unregister_instance_untyped, the application wants to modify (DDSDataWriter::write_untyped or DDSDataWriter::dispose_untyped) 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 DDSDataWriter::dispose_untyped). The operation DDSDataWriter::unregister_instance_untyped just indicates that the DDSDataWriter no longer has anything to say about the instance. DDSDataReader 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 DDSDataWriter objects writing that same instance.

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

Parameters:
instance_data<<in>> The instance that should be unregistered. If the data 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 method may fail with DDS_RETCODE_BAD_PARAMETER .
handle<<in>> represents the instance to be unregistered. If the data has a key and handle is DDS_HANDLE_NIL, handle is not used and instance is deduced from instance_data. If the data has no key, handle is not used. If handle is used, it must represent an instance that has been registered. Otherwise, this method may fail with DDS_RETCODE_BAD_PARAMETER.
Returns:
One of the Standard Return Codes, DDS_RETCODE_TIMEOUT or DDS_RETCODE_NOT_ENABLED
MT Safety:
This operation is thread safe. However, note that the arguments are not protected from being modified by other threads and must not be modified until the call returns.
See also:
DDSDataWriter::register_instance_untyped
virtual DDS_ReturnCode_t DDSDataWriter::unregister_instance_w_timestamp_untyped ( const void *  instance_data,
const DDS_InstanceHandle_t handle,
const DDS_Time_t source_timestamp 
)
pure virtual

<<cert>> Performs the same function as DDSDataWriter::unregister_instance_untyped except that it also provides the value for the source_timestamp.

Explicitly provides the timestamp that will be available to the DDSDataReader objects by means of the source_timestamp attribute inside the DDS_SampleInfo. (Refer to DDS_SampleInfo for details)

The constraints on the values of the parameters and the corresponding error behavior are the same specified for the DDSDataWriter::unregister_instance_untyped operation.

Parameters:
instance_data<<in>> The instance that should be unregistered. If the data 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 method may fail with DDS_RETCODE_BAD_PARAMETER .
handle<<in>> represents the instance to be unregistered. If the data has a key and handle is DDS_HANDLE_NIL, handle is not used and instance is deduced from instance_data. If the data has no key, handle is not used. If handle is used, it must represent an instance that has been registered. Otherwise, this method may fail with DDS_RETCODE_BAD_PARAMETER.
Parameters:
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 DDSDataReader objects by means of the source_timestamp attribute inside the DDS_SampleInfo.
Returns:
One of the Standard Return Codes, DDS_RETCODE_TIMEOUT or DDS_RETCODE_NOT_ENABLED
MT Safety:
This operation is thread safe. However, note that the arguments are not protected from being modified by other threads and must not be modified until the call returns.
See also:
DDSDataWriter::register_instance_untyped
virtual DDS_ReturnCode_t DDSDataWriter::dispose_untyped ( const void *  instance_data,
const DDS_InstanceHandle_t handle 
)
pure virtual

<<cert>> 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 DDSDataReader objects that already knew that instance. DDSDataReader 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 Micro will automatically supply the value of the source_timestamp that is made available to DDSDataReader 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 DDSDataWriter::unregister_instance_untyped 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 Micro 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 Micro 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 DDSDataWriter::write_untyped().

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

Parameters:
instance_data<<in>> The data to dispose. If the data 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.
handle<<in>> Either the handle returned by a previous call to DDSDataWriter::register_instance_untyped, or else the special value DDS_HANDLE_NIL. If the data has a key and instance_handle is DDS_HANDLE_NIL, instance_handle is not used and instance is deduced from instance_data. If the data has no key, instance_handle is not used. If handle is used, it must represent a registered instance of type the matching data type. Otherwise, this method 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.
MT Safety:
This operation is thread safe. However, note that the arguments are not protected from being modified by other threads and must not be modified until the call returns.
virtual DDS_ReturnCode_t DDSDataWriter::dispose_w_timestamp_untyped ( const void *  instance_data,
const DDS_InstanceHandle_t handle,
const DDS_Time_t source_timestamp 
)
pure virtual

<<cert>> Performs the same function as DDSDataWriter::dispose_untyped except that it also provides the value for the source_timestamp.

Explicitly provides the timestamp that will be available to the DDSDataReader objects by means of the source_timestamp attribute inside the DDS_SampleInfo. (Refer to DDS_SampleInfo for details)

The constraints on the values of the parameters and the corresponding error behavior are the same specified for the DDSDataWriter::dispose_untyped operation.

Parameters:
instance_data<<in>> The data to dispose. If the data 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.
handle<<in>> Either the handle returned by a previous call to DDSDataWriter::register_instance_untyped, or else the special value DDS_HANDLE_NIL. If the data has a key and instance_handle is DDS_HANDLE_NIL, instance_handle is not used and instance is deduced from instance_data. If the data has no key, instance_handle is not used. If handle is used, it must represent a registered instance of type the matching data type. Otherwise, this method 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 DDSDataReader objects by means of the source_timestamp attribute inside the DDS_SampleInfo.
Returns:
One of the Standard Return Codes, DDS_RETCODE_TIMEOUT, DDS_RETCODE_OUT_OF_RESOURCES or DDS_RETCODE_NOT_ENABLED.
MT Safety:
This operation is thread safe. However, note that the arguments are not protected from being modified by other threads and must not be modified until the call returns.
virtual DDS_ReturnCode_t DDSDataWriter::write_w_timestamp_untyped ( const void *  instance_data,
const DDS_InstanceHandle_t handle,
const DDS_Time_t source_timestamp 
)
pure virtual

<<cert>> Performs the same function as DDSDataWriter::write_untyped except that it also provides the value for the source_timestamp.

Explicitly provides the timestamp that will be available to the DDSDataReader objects by means of the source_timestamp attribute inside the DDS_SampleInfo. (Refer to DDS_SampleInfo for details)

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

If there are no instance resources left, this operation may fail with DDS_RETCODE_OUT_OF_RESOURCES. Calling DDSDataWriter::unregister_instance_untyped 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:
instance_data<<in>> The data to write.
handle<<in>> Either the handle returned by a previous call to DDSDataWriter::register_instance_untyped, or else the special value DDS_HANDLE_NIL. If the data has a key and handle is not DDS_HANDLE_NIL, handle must represent a registered instance of the matching data type. Otherwise, this method may 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 DDSDataReader objects by means of the source_timestamp attribute inside the DDS_SampleInfo.
Returns:
One of the Standard Return Codes, DDS_RETCODE_TIMEOUT, DDS_RETCODE_OUT_OF_RESOURCES or DDS_RETCODE_NOT_ENABLED.
MT Safety:
This operation is thread safe. However, note that the arguments are not protected from being modified by other threads and must not be modified until the call returns.
See also:
DDSDataWriter::write_untyped
DDSDataReader
virtual DDS_ReturnCode_t DDSDataWriter::get_publication_matched_status ( DDS_PublicationMatchedStatus status)
pure virtual

<<cert>> Accesses the DDS_PUBLICATION_MATCHED_STATUS communication status.

Parameters:
status<<inout>> DDS_PublicationMatchedStatus to be filled in.
Returns:
One of the Standard Return Codes
MT Safety:
This operation is thread safe. However, note that the arguments are not protected from being modified by other threads and must not be modified until the call returns.
virtual DDS_ReturnCode_t DDSDataWriter::get_liveliness_lost_status ( DDS_LivelinessLostStatus status)
pure virtual

<<cert>> Accesses the DDS_LIVELINESS_LOST_STATUS communication status.

Parameters:
status<<inout>> DDS_LivelinessLostStatus to be filled in.
Returns:
One of the Standard Return Codes
MT Safety:
This operation is thread safe. However, note that the arguments are not protected from being modified by other threads and must not be modified until the call returns.
virtual DDS_ReturnCode_t DDSDataWriter::get_offered_deadline_missed_status ( DDS_OfferedDeadlineMissedStatus status)
pure virtual

<<cert>> Accesses the DDS_OFFERED_DEADLINE_MISSED_STATUS communication status.

Parameters:
status<<inout>> DDS_OfferedDeadlineMissedStatus to be filled in.
Returns:
One of the Standard Return Codes
MT Safety:
This operation is thread safe. However, note that the arguments are not protected from being modified by other threads and must not be modified until the call returns.
virtual DDS_ReturnCode_t DDSDataWriter::get_offered_incompatible_qos_status ( DDS_OfferedIncompatibleQosStatus status)
pure virtual

<<cert>> Accesses the DDS_OFFERED_INCOMPATIBLE_QOS_STATUS communication status.

Parameters:
status<<inout>> DDS_OfferedIncompatibleQosStatus to be filled in.
Returns:
One of the Standard Return Codes
MT Safety:
This operation is thread safe. However, note that the arguments are not protected from being modified by other threads and must not be modified until the call returns.

RTI Connext DDS Micro C++ API 2.4.14.2 Copyright © Tue May 28 2024 Real-Time Innovations, Inc