00001
00002
00003
00004
00005
00006
00007
00008 #ifndef OPENDDS_DCPS_TRANSPORTINST_H
00009 #define OPENDDS_DCPS_TRANSPORTINST_H
00010
00011 #include <ace/config.h>
00012 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00013 #pragma once
00014 #endif
00015
00016 #include "dds/DCPS/dcps_export.h"
00017 #include "TransportDefs.h"
00018 #include "TransportImpl_rch.h"
00019 #include "TransportImpl.h"
00020 #include "dds/DCPS/RcObject_T.h"
00021
00022 #include "ace/Synch.h"
00023
00024 #include "dds/DCPS/PoolAllocator.h"
00025
00026 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00027 class ACE_Configuration_Heap;
00028 class ACE_Configuration_Section_Key;
00029 ACE_END_VERSIONED_NAMESPACE_DECL
00030
00031 namespace OpenDDS {
00032 namespace DCPS {
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050 class OpenDDS_Dcps_Export TransportInst : public RcObject<ACE_SYNCH_MUTEX> {
00051 public:
00052
00053 OPENDDS_STRING name() const { return name_; }
00054
00055
00056
00057 virtual int load(ACE_Configuration_Heap& cf,
00058 ACE_Configuration_Section_Key& sect);
00059
00060
00061 void dump();
00062 virtual OPENDDS_STRING dump_to_str();
00063
00064
00065
00066 static OPENDDS_STRING formatNameForDump(const char* name);
00067
00068 const OPENDDS_STRING transport_type_;
00069
00070
00071
00072 size_t queue_messages_per_pool_;
00073
00074
00075
00076 size_t queue_initial_pools_;
00077
00078
00079 ACE_UINT32 max_packet_size_;
00080
00081
00082 size_t max_samples_per_packet_;
00083
00084
00085 ACE_UINT32 optimum_packet_size_;
00086
00087
00088
00089 bool thread_per_connection_;
00090
00091
00092
00093 long datalink_release_delay_;
00094
00095
00096
00097 size_t datalink_control_chunks_;
00098
00099
00100 virtual bool is_reliable() const = 0;
00101
00102
00103 virtual bool requires_cdr() const { return false; }
00104
00105
00106 virtual size_t populate_locator(OpenDDS::DCPS::TransportLocator& trans_info) const = 0;
00107
00108 protected:
00109
00110 TransportInst(const char* type,
00111 const OPENDDS_STRING& name);
00112
00113 virtual ~TransportInst();
00114
00115 private:
00116
00117
00118
00119 void adjust_config_value();
00120
00121 friend class TransportRegistry;
00122 void shutdown();
00123
00124 friend class TransportClient;
00125 TransportImpl_rch impl();
00126 virtual TransportImpl* new_impl(const RcHandle<TransportInst>& inst) = 0;
00127
00128 const OPENDDS_STRING name_;
00129
00130 TransportImpl_rch impl_;
00131 ACE_SYNCH_MUTEX lock_;
00132 };
00133
00134 }
00135 }
00136
00137 #if defined(__ACE_INLINE__)
00138 #include "TransportInst.inl"
00139 #endif
00140
00141 #endif