diff --git a/include/fastdds/dds/publisher/DataWriter.hpp b/include/fastdds/dds/publisher/DataWriter.hpp index f9316c0294a..2ab8dcaf71f 100644 --- a/include/fastdds/dds/publisher/DataWriter.hpp +++ b/include/fastdds/dds/publisher/DataWriter.hpp @@ -128,9 +128,9 @@ class DataWriter : public DomainEntity * Write data to the topic. * * @param data Pointer to the data - * @return True if correct, false otherwise + * @return RETCODE_OK if the data is correctly sent and RETCODE_ERROR otherwise. */ - FASTDDS_EXPORTED_API bool write( + FASTDDS_EXPORTED_API ReturnCode_t write( const void* const data); /** @@ -138,9 +138,9 @@ class DataWriter : public DomainEntity * * @param data Pointer to the data * @param params Extra write parameters. - * @return True if correct, false otherwise + * @return RETCODE_OK if the data is correctly sent and RETCODE_ERROR otherwise. */ - FASTDDS_EXPORTED_API bool write( + FASTDDS_EXPORTED_API ReturnCode_t write( const void* const data, fastdds::rtps::WriteParams& params); diff --git a/src/cpp/fastdds/publisher/DataWriter.cpp b/src/cpp/fastdds/publisher/DataWriter.cpp index a3d7ae1c9a2..f00eb6bb73f 100644 --- a/src/cpp/fastdds/publisher/DataWriter.cpp +++ b/src/cpp/fastdds/publisher/DataWriter.cpp @@ -78,13 +78,13 @@ ReturnCode_t DataWriter::discard_loan( return impl_->discard_loan(sample); } -bool DataWriter::write( +ReturnCode_t DataWriter::write( const void* const data) { return impl_->write(data); } -bool DataWriter::write( +ReturnCode_t DataWriter::write( const void* const data, fastdds::rtps::WriteParams& params) {