LCOV - code coverage report
Current view: top level - DCPS/transport/framework - TransportInst.inl (source / functions) Hit Total Coverage
Test: coverage.info Lines: 0 6 0.0 %
Date: 2023-04-30 01:32:43 Functions: 0 1 0.0 %

          Line data    Source code
       1             : /*
       2             :  *
       3             :  *
       4             :  * Distributed under the OpenDDS License.
       5             :  * See: http://www.opendds.org/license.html
       6             :  */
       7             : 
       8             : #include "TransportDefs.h"
       9             : #include "EntryExit.h"
      10             : 
      11             : 
      12             : ACE_INLINE
      13             : OpenDDS::DCPS::TransportInst::TransportInst(const char* type,
      14             :                                             const OPENDDS_STRING& name)
      15             :   : transport_type_(type)
      16             :   , queue_messages_per_pool_(DEFAULT_CONFIG_QUEUE_MESSAGES_PER_POOL)
      17             :   , queue_initial_pools_(DEFAULT_CONFIG_QUEUE_INITIAL_POOLS)
      18             :   , max_packet_size_(DEFAULT_CONFIG_MAX_PACKET_SIZE)
      19             :   , max_samples_per_packet_(DEFAULT_CONFIG_MAX_SAMPLES_PER_PACKET)
      20             :   , optimum_packet_size_(DEFAULT_CONFIG_OPTIMUM_PACKET_SIZE)
      21             :   , thread_per_connection_(0)
      22             :   , datalink_release_delay_(DEFAULT_DATALINK_RELEASE_DELAY)
      23             :   , datalink_control_chunks_(DEFAULT_DATALINK_CONTROL_CHUNKS)
      24             :   , fragment_reassembly_timeout_(300)
      25             :   , receive_preallocated_message_blocks_(0)
      26             :   , receive_preallocated_data_blocks_(0)
      27             :   , shutting_down_(false)
      28             :   , name_(name)
      29             :   , drop_messages_(false)
      30             :   , drop_messages_m_(0)
      31             :   , drop_messages_b_(0)
      32             :   , count_messages_(false)
      33             : {
      34             :   DBG_ENTRY_LVL("TransportInst", "TransportInst", 6);
      35             :   adjust_config_value();
      36             : }
      37             : 
      38             : ACE_INLINE
      39             : void
      40           0 : OpenDDS::DCPS::TransportInst::adjust_config_value()
      41             : {
      42             :   // Ensure that the number of samples put into the packet does
      43             :   // not exceed the allowed number of io vectors to be sent by the OS.
      44           0 :   size_t old_value = max_samples_per_packet_;
      45             : 
      46           0 :   if ((2 * max_samples_per_packet_ + 1) > MAX_SEND_BLOCKS) {
      47           0 :     max_samples_per_packet_ = (MAX_SEND_BLOCKS + 1) / 2 - 1;
      48           0 :     ACE_DEBUG((LM_NOTICE,
      49             :                ACE_TEXT("(%P|%t) NOTICE: \"max_samples_per_packet\" is adjusted from %u to %u\n"),
      50             :                old_value, max_samples_per_packet_));
      51             :   }
      52           0 : }

Generated by: LCOV version 1.16