OpenDDS  Snapshot(2023/04/28-20:55)
TransportInst.inl
Go to the documentation of this file.
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 
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);
36 }
37 
39 void
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  size_t old_value = max_samples_per_packet_;
45 
46  if ((2 * max_samples_per_packet_ + 1) > MAX_SEND_BLOCKS) {
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 }
#define ACE_DEBUG(X)
TransportInst(const char *type, const OPENDDS_STRING &name)
size_t max_samples_per_packet_
Max number of samples that should ever be in a single packet.
Definition: TransportInst.h:99
#define OPENDDS_STRING
LM_NOTICE
const char *const name
Definition: debug.cpp:60
ACE_TEXT("TCP_Factory")
#define DBG_ENTRY_LVL(CNAME, MNAME, DBG_LVL)
Definition: EntryExit.h:68
#define ACE_INLINE