MCPcopy Create free account
hub / github.com/OpenDDS/OpenDDS / enqueue

Method enqueue

dds/DCPS/WriteDataContainer.cpp:293–323  ·  view source on GitHub ↗

This method assumes that instance list has space for this sample.

Source from the content-addressed store, hash-verified

291
292// This method assumes that instance list has space for this sample.
293DDS::ReturnCode_t
294WriteDataContainer::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
325DDS::ReturnCode_t
326WriteDataContainer::reenqueue_all(const GUID_t& reader_id,

Callers

nothing calls this directly

Calls 1

enqueue_tailMethod · 0.80

Tested by

no test coverage detected