This method assumes that instance list has space for this sample.
| 291 | |
| 292 | // This method assumes that instance list has space for this sample. |
| 293 | DDS::ReturnCode_t |
| 294 | WriteDataContainer::enqueue( |
| 295 | DataSampleElement* sample, |
| 296 | DDS::InstanceHandle_t instance_handle) |
| 297 | { |
| 298 | if (shutdown_) { |
| 299 | return DDS::RETCODE_ERROR; |
| 300 | } |
| 301 | |
| 302 | // Get the PublicationInstance pointer from InstanceHandle_t. |
| 303 | PublicationInstance_rch instance = |
| 304 | get_handle_instance(instance_handle); |
| 305 | // Extract the instance queue. |
| 306 | InstanceDataSampleList& instance_list = instance->samples_; |
| 307 | |
| 308 | extend_deadline(instance); |
| 309 | |
| 310 | // |
| 311 | // Enqueue to the next_send_sample_ thread of unsent_data_ |
| 312 | // will link samples with the next_sample/previous_sample and |
| 313 | // also next_send_sample_. |
| 314 | // This would save time when we actually send the data. |
| 315 | |
| 316 | unsent_data_.enqueue_tail(sample); |
| 317 | |
| 318 | // |
| 319 | // Add this sample to the INSTANCE scope list. |
| 320 | instance_list.enqueue_tail(sample); |
| 321 | |
| 322 | return DDS::RETCODE_OK; |
| 323 | } |
| 324 | |
| 325 | DDS::ReturnCode_t |
| 326 | WriteDataContainer::reenqueue_all(const GUID_t& reader_id, |
nothing calls this directly
no test coverage detected