DDS-PSM-C++ 1.0 ISO C++ API for OpenSplice DDS |
#include <DataWriter.hpp>
Public Types | |
typedef dds::pub::DataWriterListener < T > | Listener |
Additional Inherited Members | |
![]() | |
DELEGATE_REF_T | impl_ |
Definition at line 41 of file DataWriter.hpp.
typedef dds::pub::DataWriterListener<T> dds::pub::DataWriter< T, DELEGATE >::Listener |
Definition at line 44 of file DataWriter.hpp.
dds::pub::DataWriter< T, DELEGATE >::DataWriter | ( | const dds::pub::Publisher & | pub, |
const ::dds::topic::Topic< T > & | topic | ||
) |
Create a DataWriter
. The QoS will be set to pub.default_datawriter_qos().
pub | the publisher |
topic | the Topic associated with this DataWriter |
qos | the DataWriter qos. |
listener | the DataWriter listener. |
mask | the listener event mask. |
dds::pub::DataWriter< T, DELEGATE >::DataWriter | ( | const dds::pub::Publisher & | pub, |
const ::dds::topic::Topic< T > & | topic, | ||
const dds::pub::qos::DataWriterQos & | qos, | ||
dds::pub::DataWriterListener< T > * | listener = NULL , | ||
const dds::core::status::StatusMask & | mask = ::dds::core::status::StatusMask::all() | ||
) |
Create a DataWriter
.
pub | the publisher |
topic | the Topic associated with this DataWriter |
qos | the DataWriter qos. |
listener | the DataWriter listener. |
mask | the listener event mask. |
dds::pub::DataWriter< T, DELEGATE >::~DataWriter | ( | ) |
void dds::pub::DataWriter< T, DELEGATE >::assert_liveliness | ( | ) |
Mannually asserts the livelines of this DataWriter
DataWriter& dds::pub::DataWriter< T, DELEGATE >::dispose_instance | ( | const ::dds::core::InstanceHandle & | i | ) |
Dispose an instance.
i | the instance to dispose. |
DataWriter& dds::pub::DataWriter< T, DELEGATE >::dispose_instance | ( | const ::dds::core::InstanceHandle & | i, |
const dds::core::Time & | ts | ||
) |
Dispose an instance with a timestamp.
i | the instance to dispose. |
ts | the timestamp. |
dds::topic::TopicInstance<T>& dds::pub::DataWriter< T, DELEGATE >::key_value | ( | dds::topic::TopicInstance< T > & | i, |
const ::dds::core::InstanceHandle & | h | ||
) |
This operation can be used to retrieve the instance key that corresponds to an instance_handle. The operation will only fill the fields that form the key inside the key_holder instance. This operation may raise a BadParameter exception if the InstanceHandle does not correspond to an existing data-object known to the DataWriter. If the implementation is not able to check invalid handles, then the result in this situation is unspecified.
T& dds::pub::DataWriter< T, DELEGATE >::key_value | ( | T & | sample, |
const ::dds::core::InstanceHandle & | h | ||
) |
This operation can be used to retrieve the instance key that corresponds to an instance_handle. The operation will only fill the fields that form the key inside the key_holder instance. This operation may raise a BadParameter exception if the InstanceHandle does not correspond to an existing data-object known to the DataWriter. If the implementation is not able to check invalid handles, then the result in this situation is unspecified.
void dds::pub::DataWriter< T, DELEGATE >::listener | ( | DataWriterListener< T > * | the_listener, |
const ::dds::core::status::StatusMask & | mask | ||
) |
By virtue of extending Entity, a DataWriter can be attached to a Listener at creation time or later by using the listener operation. The attached Listener must be a DataWriterListener.
listener | the data writer listener |
mask | the event mask associated with this listener. |
DataWriterListener<T>* dds::pub::DataWriter< T, DELEGATE >::listener | ( | ) | const |
Return the listener currently associated with this DataWriter
.
DataWriterListener
. const ::dds::core::status::LivelinessLostStatus dds::pub::DataWriter< T, DELEGATE >::liveliness_lost_status | ( | ) |
Get the LivelinessLostStatus
.
dds::core::InstanceHandle dds::pub::DataWriter< T, DELEGATE >::lookup_instance | ( | const T & | key | ) |
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 the Service is unable to provide an instance handle, the Service will return a TopicInstance whose handle will be set to the HANDLE_NIL value.
const ::dds::core::status::OfferedDeadlineMissedStatus dds::pub::DataWriter< T, DELEGATE >::offered_deadlined_missed_status | ( | ) |
Get the OfferedDeadlineMissedStatus
.
const ::dds::core::status::OfferedIncompatibleQosStatus dds::pub::DataWriter< T, DELEGATE >::offered_incompatible_qos_staus | ( | ) |
Get the OfferedIncompatibleQosStatus
.
DataWriter& dds::pub::DataWriter< T, DELEGATE >::operator<< | ( | const T & | data | ) |
DataWriter& dds::pub::DataWriter< T, DELEGATE >::operator<< | ( | const std::pair< T, dds::core::Time > & | data | ) |
DataWriter& dds::pub::DataWriter< T, DELEGATE >::operator<< | ( | const std::pair< T,::dds::core::InstanceHandle > & | data | ) |
DataWriter& dds::pub::DataWriter< T, DELEGATE >::operator<< | ( | DataWriter< T, DELEGATE > &(*)(DataWriter< T, DELEGATE > &) | manipulator | ) |
DataWriter& dds::pub::DataWriter< T, DELEGATE >::operator<< | ( | const ::dds::pub::qos::DataWriterQos & | the_qos | ) |
Get the DataWriter
QoS.
const DataWriter& dds::pub::DataWriter< T, DELEGATE >::operator>> | ( | ::dds::pub::qos::DataWriterQos & | the_qos | ) | const |
Set the DataWriter
QoS.
the_qos | the new qos for this DataWriter . |
const ::dds::core::status::PublicationMatchedStatus dds::pub::DataWriter< T, DELEGATE >::publication_matched_status | ( | ) |
Get the PublicationMatchedStatus
.
const dds::pub::Publisher& dds::pub::DataWriter< T, DELEGATE >::publisher | ( | ) | const |
Get the Publisher
that owns this
DataWriter
.
const ::dds::pub::qos::DataWriterQos& dds::pub::DataWriter< T, DELEGATE >::qos | ( | ) | const |
Get the DataWriter
QoS.
void dds::pub::DataWriter< T, DELEGATE >::qos | ( | const ::dds::pub::qos::DataWriterQos & | the_qos | ) |
Set the DataWriter
QoS.
the_qos | the new qos for this DataWriter . |
const ::dds::core::InstanceHandle dds::pub::DataWriter< T, DELEGATE >::register_instance | ( | const T & | key | ) |
Register an instance.
key | the key of the instance to register. |
const ::dds::core::InstanceHandle dds::pub::DataWriter< T, DELEGATE >::register_instance | ( | const T & | key, |
const dds::core::Time & | ts | ||
) |
Register an instance with timestamp.
key | the key of the instance to register. |
timestamp | the timestamp used for registration. |
const dds::topic::Topic<T>& dds::pub::DataWriter< T, DELEGATE >::topic | ( | ) | const |
Get the Topic
associated with this DataWriter
DataWriter& dds::pub::DataWriter< T, DELEGATE >::unregister_instance | ( | const ::dds::core::InstanceHandle & | i | ) |
Unregister an instance.
i | the instance to unregister. |
DataWriter& dds::pub::DataWriter< T, DELEGATE >::unregister_instance | ( | const ::dds::core::InstanceHandle & | i, |
const dds::core::Time & | ts | ||
) |
Unregister an instance with timestamp.
i | the instance to unregister. |
timestamp | the timestamp used for registration. |
void dds::pub::DataWriter< T, DELEGATE >::wait_for_acknowledgments | ( | const dds::core::Duration & | timeout | ) |
This operation blocks the calling thread until either all data written by the reliable DataWriter entities is acknowledged by all matched reliable DataReader entities, or else the duration specified by the max_wait parameter elapses, whichever happens first. A normal return indicates that all the samples written have been acknowledged by all reliable matched data readers; A TimeoutError indicates that max_wait elapsed before all the data was acknowledged.
void dds::pub::DataWriter< T, DELEGATE >::write | ( | const T & | sample | ) |
Write a sample.
sample | the sample to be written. |
void dds::pub::DataWriter< T, DELEGATE >::write | ( | const T & | sample, |
const dds::core::Time & | timestamp | ||
) |
Write a sample with a given timestamp.
sample | the sample to be written. |
timestamp | the timestamp used for this sample. |
void dds::pub::DataWriter< T, DELEGATE >::write | ( | const T & | data, |
const ::dds::core::InstanceHandle & | instance | ||
) |
Write a sample by providing the instance handle. This is usually the most efficint way of writing a sample.
sample | the sample to be written. |
instance | the handle representing the instance written. |
void dds::pub::DataWriter< T, DELEGATE >::write | ( | const T & | data, |
const ::dds::core::InstanceHandle & | instance, | ||
const dds::core::Time & | timestamp | ||
) |
Write a sample, with a time-stamp, by providing the instance handle. This is usually the most efficient way of writing a sample.
sample | the sample to be written. |
instance | the handle representing the instance written. |
timestamp | the timestamp to use for this sample. |
void dds::pub::DataWriter< T, DELEGATE >::write | ( | const dds::topic::TopicInstance< T > & | i | ) |
Write a topic instance – a class that encapsulate the sample and its associated instance handle.
i | the instance to write. |
void dds::pub::DataWriter< T, DELEGATE >::write | ( | const dds::topic::TopicInstance< T > & | i, |
const dds::core::Time & | timestamp | ||
) |
Write a topic instance with time stamp.
i | the instance to write. |
timestamp | the timestamp for this sample. |
void dds::pub::DataWriter< T, DELEGATE >::write | ( | const FWIterator & | begin, |
const FWIterator & | end | ||
) |
Write a series of samples or TopicInstances (determined by the template specialization).
void dds::pub::DataWriter< T, DELEGATE >::write | ( | const FWIterator & | begin, |
const FWIterator & | end, | ||
const dds::core::Time & | timestamp | ||
) |
Write a series of samples or TopicInstances (determined by the template specialization) with timestamp.
void dds::pub::DataWriter< T, DELEGATE >::write | ( | const SamplesFWIterator & | data_begin, |
const SamplesFWIterator & | data_end, | ||
const HandlesFWIterator & | handle_begin, | ||
const HandlesFWIterator & | handle_end | ||
) |
Write a series of samples and their parallel instance handles.
void dds::pub::DataWriter< T, DELEGATE >::write | ( | const SamplesFWIterator & | data_begin, |
const SamplesFWIterator & | data_end, | ||
const HandlesFWIterator & | handle_begin, | ||
const HandlesFWIterator & | handle_end, | ||
const dds::core::Time & | timestamp | ||
) |
Write a series of samples and their parallel instance handles with a timestamp.