| 3188 | } |
| 3189 | |
| 3190 | DDS::ReturnCode_t DataWriterImpl::write_w_timestamp( |
| 3191 | const Sample& sample, |
| 3192 | DDS::InstanceHandle_t handle, |
| 3193 | const DDS::Time_t& source_timestamp) |
| 3194 | { |
| 3195 | // This operation assumes the provided handle is valid. The handle provided |
| 3196 | // will not be verified. |
| 3197 | |
| 3198 | if (handle == DDS::HANDLE_NIL) { |
| 3199 | DDS::InstanceHandle_t registered_handle = DDS::HANDLE_NIL; |
| 3200 | const DDS::ReturnCode_t ret = |
| 3201 | get_or_create_instance_handle(registered_handle, sample, source_timestamp); |
| 3202 | if (ret != DDS::RETCODE_OK) { |
| 3203 | if (log_level >= LogLevel::Notice) { |
| 3204 | ACE_ERROR((LM_NOTICE, "(%P|%t) NOTICE: %CDataWriterImpl::write_w_timestamp: " |
| 3205 | "register failed: %C\n", |
| 3206 | get_type_support()->name(), |
| 3207 | retcode_to_string(ret))); |
| 3208 | } |
| 3209 | return ret; |
| 3210 | } |
| 3211 | |
| 3212 | handle = registered_handle; |
| 3213 | } |
| 3214 | |
| 3215 | // list of reader GUID_ts that should not get data |
| 3216 | GUIDSeq_var filter_out; |
| 3217 | #ifndef OPENDDS_NO_CONTENT_FILTERED_TOPIC |
| 3218 | if (publisher_content_filter_) { |
| 3219 | ACE_GUARD_RETURN(ACE_Thread_Mutex, reader_info_guard, reader_info_lock_, DDS::RETCODE_ERROR); |
| 3220 | for (RepoIdToReaderInfoMap::iterator iter = reader_info_.begin(), |
| 3221 | end = reader_info_.end(); iter != end; ++iter) { |
| 3222 | const ReaderInfo& ri = iter->second; |
| 3223 | if (!ri.eval_.is_nil()) { |
| 3224 | if (!filter_out.ptr()) { |
| 3225 | filter_out = new OpenDDS::DCPS::GUIDSeq; |
| 3226 | } |
| 3227 | if (!sample.eval(*ri.eval_, ri.expression_params_)) { |
| 3228 | push_back(filter_out.inout(), iter->first); |
| 3229 | } |
| 3230 | } |
| 3231 | } |
| 3232 | } |
| 3233 | #endif |
| 3234 | |
| 3235 | return write_sample(sample, handle, source_timestamp, filter_out._retn()); |
| 3236 | } |
| 3237 | |
| 3238 | DDS::ReturnCode_t DataWriterImpl::write_sample( |
| 3239 | const Sample& sample, |
nothing calls this directly
no test coverage detected