00001
00002
00003
00004
00005
00006
00007
00008 #include "TransportDefs.h"
00009 #include "EntryExit.h"
00010
00011
00012 ACE_INLINE
00013 OpenDDS::DCPS::TransportInst::TransportInst(const char* type,
00014 const OPENDDS_STRING& name)
00015 : transport_type_(type),
00016 queue_messages_per_pool_(DEFAULT_CONFIG_QUEUE_MESSAGES_PER_POOL),
00017 queue_initial_pools_(DEFAULT_CONFIG_QUEUE_INITIAL_POOLS),
00018 max_packet_size_(DEFAULT_CONFIG_MAX_PACKET_SIZE),
00019 max_samples_per_packet_(DEFAULT_CONFIG_MAX_SAMPLES_PER_PACKET),
00020 optimum_packet_size_(DEFAULT_CONFIG_OPTIMUM_PACKET_SIZE),
00021 thread_per_connection_(0),
00022 datalink_release_delay_(10000),
00023 datalink_control_chunks_(32),
00024 name_(name)
00025 {
00026 DBG_ENTRY_LVL("TransportInst", "TransportInst", 6);
00027 this->adjust_config_value();
00028 }
00029
00030 ACE_INLINE
00031 void
00032 OpenDDS::DCPS::TransportInst::adjust_config_value()
00033 {
00034
00035
00036 size_t old_value = max_samples_per_packet_;
00037
00038 if ((2 * max_samples_per_packet_ + 1) > MAX_SEND_BLOCKS) {
00039 max_samples_per_packet_ = (MAX_SEND_BLOCKS + 1) / 2 - 1;
00040 ACE_DEBUG((LM_NOTICE,
00041 ACE_TEXT("(%P|%t) NOTICE: \"max_samples_per_packet\" is adjusted from %u to %u\n"),
00042 old_value, max_samples_per_packet_));
00043 }
00044 }